(CommandLine cli, String zkHost)
| 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 | } |
no test coverage detected