Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOLR-16823: remove the old backcompat formats for bin/solr zk -upconfig and -downconfig #1672

Merged
merged 3 commits into from
Jun 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions solr/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
15 changes: 5 additions & 10 deletions solr/bin/solr
Original file line number Diff line number Diff line change
Expand Up @@ -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'."
Expand Down Expand Up @@ -1337,15 +1337,10 @@ if [[ "$SCRIPT_CMD" == "zk" ]]; then
if [ $# -gt 0 ]; then
while true; do
case "${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=$1
shift 1
;;
;;
-z|-zkhost|-zkHost)
if [[ -z "$2" || "${2:0:1}" == "-" ]]; then
print_short_zk_usage "$SCRIPT_CMD" "ZooKeeper connection string is required when using the $1 option!"
Expand Down
17 changes: 3 additions & 14 deletions solr/bin/solr.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -550,9 +550,9 @@ echo overrides the 'ZK_HOST=...'' defined in solr.in
echo.
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 of
echo 'upconfig' and the source for 'downconfig'.
Expand Down Expand Up @@ -1769,14 +1769,10 @@ goto done

REM 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" (
Expand Down Expand Up @@ -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"
Expand Down