if (config.containsKey(key)) return config.getString(key); else { if (config.containsKey( org.apache.accumulo.core.client.ClientConfiguration.ClientProperty.KERBEROS_SERVER_PRIMARY .getKey())) {
public String getInstanceName() { if (clientConf.containsKey(ClientProperty.INSTANCE_NAME.getKey())) { return clientConf.get(ClientProperty.INSTANCE_NAME); } String instanceName = conf.get(ACCUMULO_STANDALONE_INSTANCE_NAME_KEY); if (null == instanceName) { instanceName = ACCUMULO_STANDALONE_INSTANCE_NAME_DEFAULT; } return instanceName; }
public String getZooKeepers() { if (clientConf.containsKey(ClientProperty.INSTANCE_ZK_HOST.getKey())) { return clientConf.get(ClientProperty.INSTANCE_ZK_HOST); } String zookeepers = conf.get(ACCUMULO_STANDALONE_ZOOKEEPERS_KEY); if (null == zookeepers) { zookeepers = ACCUMULO_STANDALONE_ZOOKEEPERS_DEFAULT; } return zookeepers; }
this.clientConf = ClientConfiguration.fromFile(clientConfFile); if (!clientConf.containsKey(ClientProperty.INSTANCE_NAME.getKey())) { clientConf.withInstance(getInstanceName()); if (!clientConf.containsKey(ClientProperty.INSTANCE_ZK_HOST.getKey())) { clientConf.withZkHosts(getZooKeepers());
/** * Returns the value for prop, the default value if not present. * */ public String get(ClientProperty prop) { if (this.containsKey(prop.getKey())) return this.getString(prop.getKey()); else return prop.getDefaultValue(); }
/** * Get the ZooKeepers. Use the value passed in (if there was one), then fall back to the * ClientConf, finally trying the accumulo-site.xml. * * @param keepers * ZooKeepers passed to the shell * @param clientConfig * ClientConfiguration instance * @return The ZooKeepers to connect to */ static String getZooKeepers(String keepers, ClientConfiguration clientConfig) { if (null != keepers) { return keepers; } if (clientConfig.containsKey(ClientProperty.INSTANCE_ZK_HOST.getKey())) { return clientConfig.get(ClientProperty.INSTANCE_ZK_HOST); } return SiteConfiguration.getInstance().get(Property.INSTANCE_ZK_HOST); }
if (!clientConfig.containsKey(ClientProperty.INSTANCE_ZK_HOST.getKey())) { AccumuloConfiguration siteConf = SiteConfiguration.getInstance(); clientConfig.withZkHosts(siteConf.get(Property.INSTANCE_ZK_HOST));