lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gerlowsk...@apache.org
Subject [lucene-solr] branch branch_8x updated: SOLR-13241: Add 'autoscaling' tool to solr.cmd
Date Wed, 13 Feb 2019 15:51:54 GMT
This is an automated email from the ASF dual-hosted git repository.

gerlowskija pushed a commit to branch branch_8x
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/branch_8x by this push:
     new a6f9f53  SOLR-13241: Add 'autoscaling' tool to solr.cmd
a6f9f53 is described below

commit a6f9f53ce590238e0496415bb1e6ac7bc603d304
Author: Jason Gerlowski <gerlowskija@apache.org>
AuthorDate: Wed Feb 13 09:05:06 2019 -0500

    SOLR-13241: Add 'autoscaling' tool to solr.cmd
    
    Prior to this commit, SOLR-13155 added support for an 'autoscaling' tool
    to bin/solr, but not to the Windows equivalent bin/solr.cmd.  This
    commit adds the necessary plumbing to the Windows version of this
    script.  It also removes some dead help-text from the bin/solr script.
---
 solr/CHANGES.txt  |  2 ++
 solr/bin/solr     | 11 -----------
 solr/bin/solr.cmd | 10 +++++++++-
 3 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 4700db9..dd30fd2 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -186,6 +186,8 @@ New Features
 
 * SOLR-13155: Add command-line option for testing autoscaling configurations. (ab)
 
+* SOLR-13241: Add 'autoscaling' tool support to solr.cmd (Jason Gerlowski)
+
 Bug Fixes
 ----------------------
 
diff --git a/solr/bin/solr b/solr/bin/solr
index a61d493..8306609 100755
--- a/solr/bin/solr
+++ b/solr/bin/solr
@@ -632,17 +632,6 @@ function print_usage() {
     echo ""
     echo "  -V                                     Enable more verbose output."
     echo ""
-  elif [ "$CMD" == "autoscaling" ]; then
-    echo ""
-    echo "Usage: solr autoscaling [-z zkHost] [-a <autoscaling.json.file>] [-s] [-d]
[-n] [-r]"
-    echo ""
-    echo "  Calculate autoscaling policy suggestions and diagnostic information, using either
the deployed"
-    echo "  autoscaling configuration or the one supplied on the command line. This calculation
takes place"
-    echo "  on the client-side without affecting the running cluster except for fetching
the node and replica"
-    echo "  metrics from the cluster. For detailed usage instructions, do:"
-    echo ""
-    echo "    bin/solr autoscaling -help"
-    echo ""
   fi
 } # end print_usage
 
diff --git a/solr/bin/solr.cmd b/solr/bin/solr.cmd
index 774e721..34eaf66 100755
--- a/solr/bin/solr.cmd
+++ b/solr/bin/solr.cmd
@@ -208,6 +208,7 @@ IF "%1"=="version" goto get_version
 IF "%1"=="-v" goto get_version
 IF "%1"=="-version" goto get_version
 IF "%1"=="assert" goto run_assert
+IF "%1"=="autoscaling" goto run_autoscaling
 
 REM Only allow the command to be the first argument, assume start if not supplied
 IF "%1"=="start" goto set_script_cmd
@@ -284,7 +285,7 @@ goto done
 :script_usage
 @echo.
 @echo Usage: solr COMMAND OPTIONS
-@echo        where COMMAND is one of: start, stop, restart, healthcheck, create, create_core,
create_collection, delete, version, zk, auth, assert, config
+@echo        where COMMAND is one of: start, stop, restart, healthcheck, create, create_core,
create_collection, delete, version, zk, auth, assert, config, autoscaling
 @echo.
 @echo   Standalone server example (start Solr running in the background on port 8984):
 @echo.
@@ -1409,6 +1410,13 @@ if errorlevel 1 (
 )
 goto done
 
+:run_autoscaling
+"%JAVA%" %SOLR_SSL_OPTS% %AUTHC_OPTS% %SOLR_ZK_CREDS_AND_ACLS% -Dsolr.install.dir="%SOLR_TIP%"
^
+  -Dlog4j.configurationFile="file:///%DEFAULT_SERVER_DIR%\resources\log4j2-console.xml" ^
+  -classpath "%DEFAULT_SERVER_DIR%\solr-webapp\webapp\WEB-INF\lib\*;%DEFAULT_SERVER_DIR%\lib\ext\*"
^
+  org.apache.solr.util.SolrCLI %* 
+goto done
+
 :parse_config_args
 IF [%1]==[] goto run_config
 IF "%1"=="-z" goto set_config_zk


Mime
View raw message