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

Method getSolrZkClient

solr/core/src/java/org/apache/solr/cli/CLIUtils.java:341–352  ·  view source on GitHub ↗
(CommandLine cli, String zkHost)

Source from the content-addressed store, hash-verified

339 return solrConnection;
340 }
341 String zkHost = resolveZkHostFromCluster(cli);
342 if (zkHost == null) {
343 return null;
344 }
345 solrConnection = CloudSolrClient.CloudSolrClientConnection.parse(zkHost);
346 return solrConnection;
347 }
348
349 public static SolrZkClient getSolrZkClient(CommandLine cli, String zkHost) {
350 if (zkHost == null) {
351 throw new IllegalStateException(
352 "Solr at "
353 + cli.getOptionValue(CommonCLIOptions.SOLR_URL_OPTION)
354 + " is running in standalone server mode, this command can only be used when running in SolrCloud mode.\n");
355 }

Callers 8

runImplMethod · 0.95
runImplMethod · 0.95
runImplMethod · 0.95
runImplMethod · 0.95
runImplMethod · 0.95
runImplMethod · 0.95
handleBasicAuthMethod · 0.95
clearSecurityJsonMethod · 0.95

Calls 3

withTimeoutMethod · 0.80
withUrlMethod · 0.80
buildMethod · 0.65

Tested by

no test coverage detected