MCPcopy Create free account
hub / github.com/apache/solr / getZkHost

Method getZkHost

solr/core/src/java/org/apache/solr/cli/CLIUtils.java:299–306  ·  view source on GitHub ↗

Get the ZooKeeper connection string from either the zk-host command-line option or if not configured, from the 'zkHost' system property aka the 'ZK_HOST' environment variable. If neither is configured, we attempt looking it up from a running Solr instance based on the solr-url option.

(CommandLine cli)

Source from the content-addressed store, hash-verified

297 }
298 return value;
299 }
300
301 /**
302 * Get the ZooKeeper connection string from either the zk-host command-line option or if not
303 * configured, from the 'zkHost' system property aka the 'ZK_HOST' environment variable. If
304 * neither is configured, we attempt looking it up from a running Solr instance based on the
305 * solr-url option.
306 */
307 public static String getZkHost(CommandLine cli) throws Exception {
308
309 String zkHost = getCliOptionOrPropValue(cli, CommonCLIOptions.ZK_HOST_OPTION, "zkHost", null);

Callers 15

runImplMethod · 0.95
runImplMethod · 0.95
runImplMethod · 0.95
runImplMethod · 0.95
createCollectionMethod · 0.95
runImplMethod · 0.95
runImplMethod · 0.95
runImplMethod · 0.95
runImplMethod · 0.95
runImplMethod · 0.95
runImplMethod · 0.95
handleBasicAuthMethod · 0.95

Calls 3

isBlankMethod · 0.80

Tested by 15

setUpMethod · 0.36
testDisconnectMethod · 0.36
setUpMethod · 0.36
testPutMethod · 0.36
testGetMethod · 0.36
testContainsMethod · 0.36
testRemoveMethod · 0.36
testSizeMethod · 0.36
testPutIfAbsentMethod · 0.36
testKeysMethod · 0.36
testClearMethod · 0.36