Skip to content

Commit 4b9e539

Browse files
authored
SOLR-14673: Add bin/solr stream CLI (#2479)
* Allows you to run a streaming expression on the Solr server, using the /stream end point. * Allows you to run a streaming expression locally, by specifying --execution=local.
1 parent f6c5af9 commit 4b9e539

File tree

12 files changed

+1197
-16
lines changed

12 files changed

+1197
-16
lines changed

solr/CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ New Features
1212

1313
* SOLR-17467: Solr CLI bin/solr start defaults to starting Solr in Cloud mode, use --user-managed switch for User Managed (aka Standalone) mode. (Eric Pugh)
1414

15+
* SOLR-14673: Solr CLI now has bin/solr stream tool that executates streaming expressions via command line, either locally or on solr cluster. (Eric Pugh)
16+
1517
Improvements
1618
---------------------
1719

solr/bin/solr.cmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1175,9 +1175,9 @@ for %%a in (%*) do (
11751175
) else (
11761176
set "option!option!=%%a"
11771177
if "!option!" equ "-s" set "SOLR_HOME=%%a"
1178-
if "!option!" equ "--solr-home" set "SOLR_HOME=%%a"
1178+
if "!option!" equ "--solr-home" set "SOLR_HOME=%%a"
11791179
if "!option!" equ "-d" set "SOLR_SERVER_DIR=%%a"
1180-
if "!option!" equ "--server-dir" set "SOLR_SERVER_DIR=%%a"
1180+
if "!option!" equ "--server-dir" set "SOLR_SERVER_DIR=%%a"
11811181
if not "!option!" equ "-s" if not "!option!" equ "--solr-home" if not "!option!" equ "-d" if not "!option!" equ "--server-dir" (
11821182
set "AUTH_PARAMS=!AUTH_PARAMS! !option! %%a"
11831183
)

solr/core/src/java/org/apache/solr/cli/SolrCLI.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ private static Tool newTool(String toolType) throws Exception {
246246
else if ("post".equals(toolType)) return new PostTool();
247247
else if ("postlogs".equals(toolType)) return new PostLogsTool();
248248
else if ("version".equals(toolType)) return new VersionTool();
249+
else if ("stream".equals(toolType)) return new StreamTool();
249250
else if ("snapshot-create".equals(toolType)) return new SnapshotCreateTool();
250251
else if ("snapshot-delete".equals(toolType)) return new SnapshotDeleteTool();
251252
else if ("snapshot-list".equals(toolType)) return new SnapshotListTool();
@@ -511,8 +512,7 @@ private static void printHelp() {
511512
print("Usage: solr COMMAND OPTIONS");
512513
print(" where COMMAND is one of: start, stop, restart, status, ");
513514
print(
514-
" healthcheck, create, delete, auth, assert, config, export, api, package, post, ");
515-
515+
" healthcheck, create, delete, auth, assert, config, export, api, package, post, stream,");
516516
print(
517517
" zk ls, zk cp, zk rm , zk mv, zk mkroot, zk upconfig, zk downconfig,");
518518
print(

0 commit comments

Comments
 (0)