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

Method doLocalMode

solr/core/src/java/org/apache/solr/cli/StreamTool.java:297–308  ·  view source on GitHub ↗

Runs a streaming expression in the local process of the CLI. Running locally means that parallelization support or those expressions requiring access to internal Solr capabilities will not function. @param expr The streaming expression to be parsed and run in the context of the CLI process @par

(String expr, StreamFactory streamFactory)

Source from the content-addressed store, hash-verified

295 * locally.
296 */
297 private PushBackStream doLocalMode(String expr, StreamFactory streamFactory) throws Exception {
298
299 // stdin is ONLY available in the local mode, not in the remote mode as it
300 // requires access to System.in
301 streamFactory.withFunctionName("stdin", StandardInStream.class);
302
303 // LocalCatStream extends CatStream and disables the Solr cluster specific
304 // logic about where to read data from.
305 streamFactory.withFunctionName("cat", LocalCatStream.class);
306
307 return new PushBackStream(streamFactory.constructStream(expr));
308 }
309
310 /**
311 * Runs a streaming expression on a Solr collection via the /stream end point and returns the

Callers 1

runImplMethod · 0.95

Calls 2

withFunctionNameMethod · 0.45
constructStreamMethod · 0.45

Tested by

no test coverage detected