Apache Solr open-source search software
SOLR-16823: remove the old backcompat formats for bin/solr zk -upconfig and -downconfig (#1672)
Eric Pugha8b75159da8a
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex d21bcfec809..0db629d08f5 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -33,6 +33,8 @@ Deprecation Removals* SOLR-16661: Removed deprecated 'analytics' component (janhoy)+* SOLR-16823: Remove backcompatiblity of -upconfig and -downconfig for bin/solr zk upconfig and downconfig commands. (Eric Pugh)+Dependency Upgrades---------------------(No changes)diff --git a/solr/bin/solr b/solr/bin/solrindex 582431d6fcf..fbb4842f06b 100644--- a/solr/bin/solr+++ b/solr/bin/solr@@ -569,9 +569,9 @@ function print_usage() {echo ""echo " -V/-verbose Enable more verbose output for this script."echo ""- echo " upconfig uploads a configset from the local machine to Zookeeper. (Backcompat: -upconfig)"+ echo " upconfig uploads a configset from the local machine to Zookeeper."echo ""- echo " downconfig downloads a configset from Zookeeper to the local machine. (Backcompat: -downconfig)"+ echo " downconfig downloads a configset from Zookeeper to the local machine."echo ""echo " -n <configName> Name of the configset in Zookeeper that will be the destination of"echo " 'upconfig' and the source for 'downconfig'."@@ -1337,15 +1337,10 @@ if [[ "$SCRIPT_CMD" == "zk" ]]; thenif [ $# -gt 0 ]; thenwhile true; docase "${1:-}" in- -upconfig|upconfig|-downconfig|downconfig|cp|rm|mv|ls|mkroot)- if [ "${1:0:1}" == "-" ]; then- echo "The use of $1 is deprecated. Please use ${1:1} instead."- ZK_OP=${1:1}- else- ZK_OP=$1- fi+ upconfig|downconfig|cp|rm|mv|ls|mkroot)+ ZK_OP=$1shift 1- ;;+ ;;-z|-zkhost|-zkHost)if [[ -z "$2" || "${2:0:1}" == "-" ]]; thenprint_short_zk_usage "$SCRIPT_CMD" "ZooKeeper connection string is required when using the $1 option!"diff --git a/solr/bin/solr.cmd b/solr/bin/solr.cmdindex b6613cabe32..c28b8ef726d 100755--- a/solr/bin/solr.cmd+++ b/solr/bin/solr.cmd@@ -550,9 +550,9 @@ echo overrides the 'ZK_HOST=...'' defined in solr.inecho.echo -V Enable more verbose output.echo.-echo upconfig uploads a configset from the local machine to Zookeeper. (Backcompat: -upconfig)+echo upconfig uploads a configset from the local machine to Zookeeper.echo.-echo downconfig downloads a configset from Zookeeper to the local machine. (Backcompat: -downconfig)+echo downconfig downloads a configset from Zookeeper to the local machine.echo.echo -n configName Name of the configset in Zookeeper that will be the destination ofecho 'upconfig' and the source for 'downconfig'.@@ -1769,14 +1769,10 @@ goto doneREM Clumsy to do the state machine thing for -d and -n, but that's required for back-compat:parse_zk_args-IF "%1"=="-upconfig" (- goto set_zk_op-) ELSE IF "%1"=="-V" (+IF "%1"=="-V" (goto set_zk_verbose) ELSE IF "%1"=="upconfig" (goto set_zk_op-) ELSE IF "%1"=="-downconfig" (- goto set_zk_op) ELSE IF "%1"=="downconfig" (goto set_zk_op) ELSE IF "%1"=="cp" (@@ -1879,13 +1875,6 @@ IF "!ZK_HOST!"=="" (goto zk_short_usage)-IF "!ZK_OP!"=="-upconfig" (- set ZK_OP="upconfig"-)-IF "!ZK_OP!"=="-downconfig" (- set ZK_OP="downconfig"-)-IF "!ZK_OP!"=="upconfig" (IF "!CONFIGSET_NAME!"=="" (set ERROR_MSG="-n option must be set for upconfig"