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

Method execute

solr/core/src/java/org/apache/solr/cli/PostTool.java:327–349  ·  view source on GitHub ↗

After initialization, call execute to start the post job. This method delegates to the correct mode method.

(String mode)

Source from the content-addressed store, hash-verified

325 * mode method.
326 */
327 public void execute(String mode) throws SolrServerException, IOException {
328 final RTimer timer = new RTimer();
329 switch (mode) {
330 case PostTool.DATA_MODE_FILES -> doFilesMode();
331 case DATA_MODE_ARGS -> doArgsMode(args);
332 case PostTool.DATA_MODE_WEB -> doWebMode();
333 case DATA_MODE_STDIN -> doStdinMode();
334 case null -> {
335 return;
336 }
337 default -> {
338 return;
339 }
340 }
341
342 if (optimize) {
343 // optimize does a commit under the covers.
344 optimize();
345 } else if (commit) {
346 commit();
347 }
348 displayTiming((long) timer.getTime());
349 }
350
351 private void doFilesMode() throws IOException {
352 currentDepth = 0;

Callers 1

runImplMethod · 0.95

Calls 8

doFilesModeMethod · 0.95
doArgsModeMethod · 0.95
doWebModeMethod · 0.95
doStdinModeMethod · 0.95
optimizeMethod · 0.95
commitMethod · 0.95
displayTimingMethod · 0.95
getTimeMethod · 0.95

Tested by

no test coverage detected