Пример #1
0
  public String getS3EndPoint() {
    String region = getDC();

    String s3Url = null;

    if (US_EAST_1_REGION.equals(region)) {
      s3Url = config.get(CONFIG_US_EAST_1_S3_ENDPOINT);
      return StringUtils.isBlank(s3Url) ? DEFAULT_US_EAST_1_S3_ENDPOINT : s3Url;
    }

    if (US_WEST_1_REGION.equals(region)) {
      s3Url = config.get(CONFIG_US_WEST_1_S3_ENDPOINT);
      return StringUtils.isBlank(s3Url) ? DEFAULT_US_WEST_1_S3_ENDPOINT : s3Url;
    }

    if (US_WEST_2_REGION.equals(region)) {
      s3Url = config.get(CONFIG_US_WEST_2_S3_ENDPOINT);
      return StringUtils.isBlank(s3Url) ? DEFAULT_US_WEST_2_S3_ENDPOINT : s3Url;
    }

    if (EU_WEST_1_REGION.equals(region)) {
      s3Url = config.get(CONFIG_EU_WEST_1_S3_ENDPOINT);
      return StringUtils.isBlank(s3Url) ? DEFAULT_EU_WEST_1_S3_ENDPOINT : s3Url;
    }

    if (SA_EAST_1_REGION.equals(region)) {
      s3Url = config.get(CONFIG_SA_EAST_1_S3_ENDPOINT);
      return StringUtils.isBlank(s3Url) ? DEFAULT_SA_EAST_1_S3_ENDPOINT : s3Url;
    }

    return null;
  }
Пример #2
0
  @Override
  public void setRestoreKeySpaces(List<String> keyspaces) {
    if (keyspaces == null) return;

    StringBuilder sb = new StringBuilder();
    for (int i = 0; i < keyspaces.size(); i++) {
      if (i > 0) sb.append(",");

      sb.append(keyspaces.get(i));
    }

    config.set(CONFIG_RESTORE_KEYSPACES, sb.toString());
  }
Пример #3
0
 public String getYamlLocation() {
   return config.get(CONFIG_YAML_LOCATION, getCassHome() + "/conf/cassandra.yaml");
 }
Пример #4
0
 public String getExtraConfigParams() {
   return config.get(CONFIG_EXTRA_PARAMS);
 }
Пример #5
0
 public String getRpcServerType() {
   return config.get(CONFIG_RPC_SERVER_TYPE, DEFAULT_RPC_SERVER_TYPE);
 }
Пример #6
0
 public int getConcurrentWritesCnt() {
   return config.get(CONFIG_CONCURRENT_WRITES, 32);
 }
Пример #7
0
 public boolean isThriftEnabled() {
   return config.get(CONFIG_THRIFT_ENABLED, true);
 }
Пример #8
0
 public String getInternodeEncryption() {
   return config.get(CONFIG_INTERNODE_ENCRYPTION, "none");
 }
Пример #9
0
 @Override
 public void setRestorePrefix(String prefix) {
   config.set(CONFIG_RESTORE_PREFIX, prefix);
 }
Пример #10
0
 public String getInternodeCompression() {
   return config.get(CONFIG_INTERNODE_COMPRESSION, DEFAULT_INTERNODE_COMPRESSION);
 }
Пример #11
0
 @Override
 public boolean doesCassandraStartManually() {
   return config.get(CONFIG_CASS_MANUAL_START_ENABLE, false);
 }
Пример #12
0
 @Override
 public String getTargetCFName() {
   return config.get(CONFIG_TARGET_COLUMN_FAMILY_NAME);
 }
Пример #13
0
 public String getTargetKSName() {
   return config.get(CONFIG_TARGET_KEYSPACE_NAME);
 }
Пример #14
0
 public String getAuthorizer() {
   return config.get(CONFIG_AUTHORIZER, DEFAULT_AUTHORIZER);
 }
Пример #15
0
 public String getAuthenticator() {
   return config.get(CONFIG_AUTHENTICATOR, DEFAULT_AUTHENTICATOR);
 }
Пример #16
0
 @Override
 public boolean isBackingUpCommitLogs() {
   return config.get(CONFIG_COMMITLOG_BKUP_ENABLED, false);
 }
Пример #17
0
 public boolean isClientSslEnabled() {
   return config.get(CONFIG_CLIENT_SSL_ENABLED, false);
 }
Пример #18
0
 @Override
 public String getCommitLogBackupArchiveCmd() {
   return config.get(CONFIG_COMMITLOG_ARCHIVE_CMD, "/bin/ln %path /mnt/data/backup/%name");
 }
Пример #19
0
 public boolean isDynamicSnitchEnabled() {
   return config.get(CONFIG_DSNITCH_ENABLED, true);
 }
Пример #20
0
 @Override
 public String getCommitLogBackupRestoreCmd() {
   return config.get(CONFIG_COMMITLOG_RESTORE_CMD, "/bin/mv %from %to");
 }
Пример #21
0
 public boolean isNativeTransportEnabled() {
   return config.get(CONFIG_NATIVE_PROTOCOL_ENABLED, false);
 }
Пример #22
0
 @Override
 public String getCommitLogBackupRestoreFromDirs() {
   return config.get(CONFIG_COMMITLOG_RESTORE_DIRS, "/mnt/data/backup/commitlog/");
 }
Пример #23
0
 public int getConcurrentReadsCnt() {
   return config.get(CONFIG_CONCURRENT_READS, 32);
 }
Пример #24
0
 @Override
 public String getCommitLogBackupRestorePointInTime() {
   return config.get(CONFIG_COMMITLOG_RESTORE_POINT_IN_TIME, "");
 }
Пример #25
0
 public int getConcurrentCompactorsCnt() {
   int cpus = Runtime.getRuntime().availableProcessors();
   return config.get(CONFIG_CONCURRENT_COMPACTORS, cpus);
 }
Пример #26
0
 @Override
 public int maxCommitLogsRestore() {
   return config.get(CONFIG_COMMITLOG_RESTORE_MAX, 10);
 }
Пример #27
0
 public int getIndexInterval() {
   return config.get(CONFIG_INDEX_INTERVAL, DEFAULT_INDEX_INTERVAL);
 }
Пример #28
0
 @Override
 public boolean isVpcRing() {
   return config.get(CONFIG_VPC_RING, false);
 }
Пример #29
0
 public String getCassYamlVal(String priamKey) {
   return config.get(priamKey);
 }
Пример #30
0
 public int getNumTokens() {
   return config.get(CONFIG_VNODE_NUM_TOKENS, DEFAULT_VNODE_NUM_TOKENS);
 }