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