/** Construct a Configured. */ public Configured(Configuration conf) { setConf(conf); }
@Override public void setConf(Configuration conf) { super.setConf(conf); if (conf != null) { rpcTimeoutForChecks = conf.getInt( CommonConfigurationKeys.HA_FC_CLI_CHECK_TIMEOUT_KEY, CommonConfigurationKeys.HA_FC_CLI_CHECK_TIMEOUT_DEFAULT); } }
@Override public void setConf(Configuration conf) { super.setConf(conf); if (conf != null) { timeout = conf.getTimeDuration( CommonConfigurationKeys. HADOOP_SECURITY_GROUP_SHELL_COMMAND_TIMEOUT_KEY, CommonConfigurationKeys. HADOOP_SECURITY_GROUP_SHELL_COMMAND_TIMEOUT_DEFAULT, TimeUnit.MILLISECONDS); } }
@Override public void setConf(Configuration conf) { super.setConf(conf); }
@Override public void setConf(Configuration conf) { Configuration healSickConf = HadoopUtil.healSickConfig(conf); super.setConf(healSickConf); } }
@Override public void setConf(Configuration conf) { super.setConf(conf); if (conf != null) schema = AvroJob.getMapOutputSchema(conf); }
/** {@inheritDoc} */ @Override public void setConf(Configuration conf) { super.setConf(conf); if (null != conf) { // The MapReduce framework will be using this comparator to sort AvroKey objects // output from the map phase, so use the schema defined for the map output key // and the data model non-raw compare() implementation. mSchema = AvroJob.getMapOutputKeySchema(conf); mDataModel = AvroSerialization.createDataModel(conf); } }
@Override public void setConf(Configuration conf) { super.setConf(conf); if (conf != null) schema = Pair.getKeySchema(AvroJob.getMapOutputSchema(conf)); }
@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; } serverHostname = conf.get(REST_API_CLUSTER_MANAGER_HOSTNAME, DEFAULT_SERVER_HOSTNAME); serverUsername = conf.get(REST_API_CLUSTER_MANAGER_USERNAME, DEFAULT_SERVER_USERNAME); serverPassword = conf.get(REST_API_CLUSTER_MANAGER_PASSWORD, DEFAULT_SERVER_PASSWORD); clusterName = conf.get(REST_API_CLUSTER_MANAGER_CLUSTER_NAME, DEFAULT_CLUSTER_NAME); // Add filter to Client instance to enable server authentication. client.register(HttpAuthenticationFeature.basic(serverUsername, serverPassword)); }
@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))); }
@Override public void setConf(Configuration conf) { super.setConf(conf); if (conf != null) { rpcTimeoutForChecks = conf.getInt( CommonConfigurationKeys.HA_FC_CLI_CHECK_TIMEOUT_KEY, CommonConfigurationKeys.HA_FC_CLI_CHECK_TIMEOUT_DEFAULT); } }
@Override public void setConf(Configuration conf) { super.setConf(conf); if (conf != null) { rpcTimeoutForChecks = conf.getInt( CommonConfigurationKeys.HA_FC_CLI_CHECK_TIMEOUT_KEY, CommonConfigurationKeys.HA_FC_CLI_CHECK_TIMEOUT_DEFAULT); } }
@Override public void setConf(Configuration conf) { super.setConf(conf); if (conf == null) { return; } String regex = conf.get(REGEX); pattern = regex == null ? null : Pattern.compile(regex); } }
@Override public void setConf(Configuration conf) { super.setConf(conf); if (conf != null) { schema = (new Schema.Parser()).parse(conf.get("crunch.schema")); } }
@Override public void setConf( Configuration conf ) { super.setConf( conf ); if( conf != null ) defaultComparator = getDefaultComparator( conf ); }
@Override public void setConf(Configuration conf) { super.setConf(conf); if (conf != null && pipeline != null) { pipeline.setConfiguration(conf); } }
@Override public void setConf(Configuration conf) { if (conf != null) { conf = addSecurityConfiguration(conf); } super.setConf(conf); }
@Override public int build(Path src, Path dest, Configuration conf) throws IOException { super.setConf(conf); try { return run(new String[] { "-" + INPUT_OPTION + "=" + src.toString(), "-" + OUTPUT_FILE_OPTION + "=" + dest.toString() }); } catch (Exception e) { throw new IOException(e); } }
@SuppressWarnings("unchecked") @Override public void setConf(Configuration conf) { super.setConf(conf); if (conf != null) { JobConf jobConf = new JobConf(conf); comparator = WritableComparator.get(jobConf.getMapOutputKeyClass().asSubclass(WritableComparable.class)); } }
public RegistryCli(PrintStream sysout, PrintStream syserr) { Configuration conf = new Configuration(); super.setConf(conf); registry = RegistryOperationsFactory.createInstance(conf); registry.start(); this.sysout = sysout; this.syserr = syserr; }