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

Method runImpl

solr/core/src/java/org/apache/solr/cli/ZkMkrootTool.java:72–87  ·  view source on GitHub ↗
(CommandLine cli)

Source from the content-addressed store, hash-verified

70 }
71
72 @Override
73 public void runImpl(CommandLine cli) throws Exception {
74 String zkHost = CLIUtils.getZkHost(cli);
75 String znode = cli.getArgs()[0];
76 boolean failOnExists = cli.hasOption(FAIL_ON_EXISTS_OPTION);
77
78 try (SolrZkClient zkClient = CLIUtils.getSolrZkClient(cli, zkHost)) {
79 echoIfVerbose("\nConnecting to ZooKeeper at " + zkHost + " ...");
80
81 echo("Creating ZooKeeper path " + znode + " on ZooKeeper at " + zkHost);
82 zkClient.makePath(znode, failOnExists);
83 } catch (Exception e) {
84 log.error("Could not complete mkroot operation for reason: ", e);
85 throw (e);
86 }
87 }
88}

Callers

nothing calls this directly

Calls 7

getZkHostMethod · 0.95
getSolrZkClientMethod · 0.95
echoIfVerboseMethod · 0.80
echoMethod · 0.80
makePathMethod · 0.65
getArgsMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected