Java 类org.apache.hadoop.hbase.util.RetryCounter.RetryConfig 实例源码

项目:ditb    文件:HBaseClusterManager.java   
@Override
public void setConf(Configuration conf) {
  super.setConf(conf);
  if (conf == null) {
    // Configured gets passed null before real conf. Why? I don't know.
    return;
  }
  sshUserName = conf.get("hbase.it.clustermanager.ssh.user", "");
  String extraSshOptions = conf.get("hbase.it.clustermanager.ssh.opts", "");
  sshOptions = System.getenv("HBASE_SSH_OPTS");
  if (!extraSshOptions.isEmpty()) {
    sshOptions = StringUtils.join(new Object[] { sshOptions, extraSshOptions }, " ");
  }
  sshOptions = (sshOptions == null) ? "" : sshOptions;
  tunnelCmd = conf.get("hbase.it.clustermanager.ssh.cmd", DEFAULT_TUNNEL_CMD);
  // Print out ssh special config if any.
  if ((sshUserName != null && sshUserName.length() > 0) ||
      (sshOptions != null && sshOptions.length() > 0)) {
    LOG.info("Running with SSH user [" + sshUserName + "] and options [" + sshOptions + "]");
  }

  this.retryCounterFactory = new RetryCounterFactory(new RetryConfig()
      .setMaxAttempts(conf.getInt(RETRY_ATTEMPTS_KEY, DEFAULT_RETRY_ATTEMPTS))
      .setSleepInterval(conf.getLong(RETRY_SLEEP_INTERVAL_KEY, DEFAULT_RETRY_SLEEP_INTERVAL)));
}
项目:HIndex    文件:HBaseClusterManager.java   
@Override
public void setConf(Configuration conf) {
  super.setConf(conf);
  if (conf == null) {
    // Configured gets passed null before real conf. Why? I don't know.
    return;
  }
  sshUserName = conf.get("hbase.it.clustermanager.ssh.user", "");
  String extraSshOptions = conf.get("hbase.it.clustermanager.ssh.opts", "");
  sshOptions = System.getenv("HBASE_SSH_OPTS");
  if (!extraSshOptions.isEmpty()) {
    sshOptions = StringUtils.join(new Object[] { sshOptions, extraSshOptions }, " ");
  }
  sshOptions = (sshOptions == null) ? "" : sshOptions;
  tunnelCmd = conf.get("hbase.it.clustermanager.ssh.cmd", DEFAULT_TUNNEL_CMD);
  // Print out ssh special config if any.
  if ((sshUserName != null && sshUserName.length() > 0) ||
      (sshOptions != null && sshOptions.length() > 0)) {
    LOG.info("Running with SSH user [" + sshUserName + "] and options [" + sshOptions + "]");
  }

  this.retryCounterFactory = new RetryCounterFactory(new RetryConfig()
      .setMaxAttempts(conf.getInt(RETRY_ATTEMPTS_KEY, DEFAULT_RETRY_ATTEMPTS))
      .setSleepInterval(conf.getLong(RETRY_SLEEP_INTERVAL_KEY, DEFAULT_RETRY_SLEEP_INTERVAL)));
}
项目:hbase    文件:HBaseClusterManager.java   
@Override
public void setConf(Configuration conf) {
  super.setConf(conf);
  if (conf == null) {
    // Configured gets passed null before real conf. Why? I don't know.
    return;
  }
  sshUserName = conf.get("hbase.it.clustermanager.ssh.user", "");
  String extraSshOptions = conf.get("hbase.it.clustermanager.ssh.opts", "");
  sshOptions = System.getenv("HBASE_SSH_OPTS");
  if (!extraSshOptions.isEmpty()) {
    sshOptions = StringUtils.join(new Object[] { sshOptions, extraSshOptions }, " ");
  }
  sshOptions = (sshOptions == null) ? "" : sshOptions;
  sshUserName = (sshUserName == null) ? "" : sshUserName;
  tunnelCmd = conf.get("hbase.it.clustermanager.ssh.cmd", DEFAULT_TUNNEL_CMD);
  // Print out ssh special config if any.
  if ((sshUserName != null && sshUserName.length() > 0) ||
      (sshOptions != null && sshOptions.length() > 0)) {
    LOG.info("Running with SSH user [" + sshUserName + "] and options [" + sshOptions + "]");
  }

  this.retryCounterFactory = new RetryCounterFactory(new RetryConfig()
      .setMaxAttempts(conf.getInt(RETRY_ATTEMPTS_KEY, DEFAULT_RETRY_ATTEMPTS))
      .setSleepInterval(conf.getLong(RETRY_SLEEP_INTERVAL_KEY, DEFAULT_RETRY_SLEEP_INTERVAL)));
}
项目:PyroDB    文件:HBaseClusterManager.java   
@Override
public void setConf(Configuration conf) {
  super.setConf(conf);
  if (conf == null) {
    // Configured gets passed null before real conf. Why? I don't know.
    return;
  }
  sshUserName = conf.get("hbase.it.clustermanager.ssh.user", "");
  String extraSshOptions = conf.get("hbase.it.clustermanager.ssh.opts", "");
  sshOptions = System.getenv("HBASE_SSH_OPTS");
  if (!extraSshOptions.isEmpty()) {
    sshOptions = StringUtils.join(new Object[] { sshOptions, extraSshOptions }, " ");
  }
  sshOptions = (sshOptions == null) ? "" : sshOptions;
  tunnelCmd = conf.get("hbase.it.clustermanager.ssh.cmd", DEFAULT_TUNNEL_CMD);
  // Print out ssh special config if any.
  if ((sshUserName != null && sshUserName.length() > 0) ||
      (sshOptions != null && sshOptions.length() > 0)) {
    LOG.info("Running with SSH user [" + sshUserName + "] and options [" + sshOptions + "]");
  }

  this.retryCounterFactory = new RetryCounterFactory(new RetryConfig()
      .setMaxAttempts(conf.getInt(RETRY_ATTEMPTS_KEY, DEFAULT_RETRY_ATTEMPTS))
      .setSleepInterval(conf.getLong(RETRY_SLEEP_INTERVAL_KEY, DEFAULT_RETRY_SLEEP_INTERVAL)));
}
项目:ditb    文件:RetryCounterFactory.java   
public RetryCounterFactory(int maxAttempts, int sleepIntervalMillis, int maxSleepTime) {
  this(new RetryConfig(
    maxAttempts,
    sleepIntervalMillis,
    maxSleepTime,
    TimeUnit.MILLISECONDS,
    new ExponentialBackoffPolicyWithLimit()));
}
项目:pbase    文件:RetryCounterFactory.java   
public RetryCounterFactory(int maxAttempts, int sleepIntervalMillis) {
  this(new RetryConfig(
    maxAttempts,
    sleepIntervalMillis,
    -1,
    TimeUnit.MILLISECONDS,
    new ExponentialBackoffPolicy()));
}
项目:HIndex    文件:RetryCounterFactory.java   
public RetryCounterFactory(int maxAttempts, int sleepIntervalMillis) {
  this(new RetryConfig(
    maxAttempts,
    sleepIntervalMillis,
    -1,
    TimeUnit.MILLISECONDS,
    new ExponentialBackoffPolicy()));
}
项目:hbase    文件:RetryCounterFactory.java   
public RetryCounterFactory(int maxAttempts, int sleepIntervalMillis, int maxSleepTime) {
  this(new RetryConfig(
    maxAttempts,
    sleepIntervalMillis,
    maxSleepTime,
    TimeUnit.MILLISECONDS,
    new ExponentialBackoffPolicyWithLimit()));
}
项目:PyroDB    文件:RetryCounterFactory.java   
public RetryCounterFactory(int maxAttempts, int sleepIntervalMillis) {
  this(new RetryConfig(
    maxAttempts,
    sleepIntervalMillis,
    -1,
    TimeUnit.MILLISECONDS,
    new ExponentialBackoffPolicy()));
}
项目:c5    文件:RetryCounterFactory.java   
public RetryCounterFactory(int maxAttempts, int sleepIntervalMillis) {
  this(new RetryConfig(
    maxAttempts,
    sleepIntervalMillis,
    -1,
    TimeUnit.MILLISECONDS,
    new ExponentialBackoffPolicy()));
}
项目:ditb    文件:RetryCounterFactory.java   
public RetryCounterFactory(RetryConfig retryConfig) {
  this.retryConfig = retryConfig;
}
项目:pbase    文件:RetryCounterFactory.java   
public RetryCounterFactory(RetryConfig retryConfig) {
  this.retryConfig = retryConfig;
}
项目:HIndex    文件:RetryCounterFactory.java   
public RetryCounterFactory(RetryConfig retryConfig) {
  this.retryConfig = retryConfig;
}
项目:hbase    文件:RetryCounterFactory.java   
public RetryCounterFactory(RetryConfig retryConfig) {
  this.retryConfig = retryConfig;
}
项目:PyroDB    文件:RetryCounterFactory.java   
public RetryCounterFactory(RetryConfig retryConfig) {
  this.retryConfig = retryConfig;
}
项目:c5    文件:RetryCounterFactory.java   
public RetryCounterFactory(RetryConfig retryConfig) {
  this.retryConfig = retryConfig;
}