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

Method runImpl

solr/core/src/java/org/apache/solr/cli/PostLogsTool.java:86–99  ·  view source on GitHub ↗
(CommandLine cli)

Source from the content-addressed store, hash-verified

84 }
85
86 @Override
87 public void runImpl(CommandLine cli) throws Exception {
88 String url;
89 if (CLIUtils.hasConnectionOption(cli)) {
90 url = CLIUtils.normalizeSolrUrl(cli) + "/solr/" + cli.getOptionValue(COLLECTION_NAME_OPTION);
91
92 } else {
93 throw new IllegalArgumentException(
94 "Must specify a connection target via -s/--solr-connection, --solr-url, or --zk-host.");
95 }
96 String rootDir = cli.getOptionValue(ROOT_DIR_OPTION);
97 String credentials = cli.getOptionValue(CommonCLIOptions.CREDENTIALS_OPTION);
98 runCommand(url, rootDir, credentials);
99 }
100
101 public void runCommand(String baseUrl, String root, String credentials) throws IOException {
102 if (URLUtil.isBaseUrl(baseUrl)) {

Callers

nothing calls this directly

Calls 3

hasConnectionOptionMethod · 0.95
normalizeSolrUrlMethod · 0.95
runCommandMethod · 0.95

Tested by

no test coverage detected