From commits-return-106504-archive-asf-public=cust-asf.ponee.io@lucene.apache.org Wed Feb 13 15:51:56 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id EE87B180674 for ; Wed, 13 Feb 2019 16:51:55 +0100 (CET) Received: (qmail 34891 invoked by uid 500); 13 Feb 2019 15:51:55 -0000 Mailing-List: contact commits-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list commits@lucene.apache.org Received: (qmail 34882 invoked by uid 99); 13 Feb 2019 15:51:55 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Feb 2019 15:51:55 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 5901D82DDF; Wed, 13 Feb 2019 15:51:54 +0000 (UTC) Date: Wed, 13 Feb 2019 15:51:54 +0000 To: "commits@lucene.apache.org" Subject: [lucene-solr] branch branch_8x updated: SOLR-13241: Add 'autoscaling' tool to solr.cmd MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <155007311421.7783.3641889210510530169@gitbox.apache.org> From: gerlowskija@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: lucene-solr X-Git-Refname: refs/heads/branch_8x X-Git-Reftype: branch X-Git-Oldrev: 93288d7e285fe0cd9e93946d8bd6c5804ab43943 X-Git-Newrev: a6f9f53ce590238e0496415bb1e6ac7bc603d304 X-Git-Rev: a6f9f53ce590238e0496415bb1e6ac7bc603d304 X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated 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 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 ] [-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