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

Method runImpl

solr/core/src/java/org/apache/solr/cli/ZkLsTool.java:53–74  ·  view source on GitHub ↗
(CommandLine cli)

Source from the content-addressed store, hash-verified

51 }
52
53 @Override
54 public void runImpl(CommandLine cli) throws Exception {
55 String zkHost = CLIUtils.getZkHost(cli);
56 String znode = cli.getArgs()[0];
57
58 try (SolrZkClient zkClient = CLIUtils.getSolrZkClient(cli, zkHost)) {
59 echoIfVerbose("\nConnecting to ZooKeeper at " + zkHost + " ...");
60
61 boolean recursive = cli.hasOption(CommonCLIOptions.RECURSIVE_OPTION);
62 echoIfVerbose(
63 "Getting listing for ZooKeeper node "
64 + znode
65 + " from ZooKeeper at "
66 + zkHost
67 + " recursive: "
68 + recursive);
69 runtime.print(zkClient.listZnode(znode, recursive));
70 } catch (Exception e) {
71 log.error("Could not complete ls operation for reason: ", e);
72 throw (e);
73 }
74 }
75}

Callers

nothing calls this directly

Calls 7

getZkHostMethod · 0.95
getSolrZkClientMethod · 0.95
echoIfVerboseMethod · 0.80
getArgsMethod · 0.45
printMethod · 0.45
listZnodeMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected