Apache Solr open-source search software
SOLR-13241: Add 'autoscaling' tool to solr.cmd
Jason Gerlowskia084cc1e3304
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex 460daaedde8..b0e4a3f24c8 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -203,6 +203,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/solrindex a61d493c7b8..8306609ca60 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_usagediff --git a/solr/bin/solr.cmd b/solr/bin/solr.cmdindex 774e7211a65..34eaf66b4c6 100755--- a/solr/bin/solr.cmd+++ b/solr/bin/solr.cmd@@ -208,6 +208,7 @@ IF "%1"=="version" goto get_versionIF "%1"=="-v" goto get_versionIF "%1"=="-version" goto get_versionIF "%1"=="assert" goto run_assert+IF "%1"=="autoscaling" goto run_autoscalingREM Only allow the command to be the first argument, assume start if not suppliedIF "%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_argsIF [%1]==[] goto run_configIF "%1"=="-z" goto set_config_zk