lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sar...@apache.org
Subject [5/5] lucene-solr:branch_7_4: SOLR-12434: Fix standalone mode 'bin/solr config' to not pass in empty -z ZK_HOST param; revert accidental ZK_HOST definition in solr.in.cmd
Date Wed, 13 Jun 2018 17:35:42 GMT
SOLR-12434: Fix standalone mode 'bin/solr config' to not pass in empty -z ZK_HOST param; revert
accidental ZK_HOST definition in solr.in.cmd


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/578316d9
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/578316d9
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/578316d9

Branch: refs/heads/branch_7_4
Commit: 578316d9641a69f3ff51bf1b0d3a0d1acaafaa4b
Parents: 21ec661
Author: Steve Rowe <sarowe@apache.org>
Authored: Wed Jun 13 09:34:36 2018 -0400
Committer: Steve Rowe <sarowe@apache.org>
Committed: Wed Jun 13 13:34:06 2018 -0400

----------------------------------------------------------------------
 solr/bin/solr        | 8 +++++++-
 solr/bin/solr.cmd    | 5 ++++-
 solr/bin/solr.in.cmd | 2 +-
 3 files changed, 12 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/578316d9/solr/bin/solr
----------------------------------------------------------------------
diff --git a/solr/bin/solr b/solr/bin/solr
index e54ff9a..1497868 100755
--- a/solr/bin/solr
+++ b/solr/bin/solr
@@ -940,7 +940,13 @@ if [[ "$SCRIPT_CMD" == "config" ]]; then
       esac
     done
   fi
-  run_tool config -zkHost "$ZK_HOST" -scheme "$SOLR_URL_SCHEME" "${CONFIG_PARAMS[@]}"
+  if [[ -n "$ZK_HOST" ]]; then
+    CONFIG_PARAMS+=("-z" "$ZK_HOST")
+  fi
+  if [[ -n "$SOLR_URL_SCHEME" ]]; then
+    CONFIG_PARAMS+=("-scheme" "$SOLR_URL_SCHEME")
+  fi
+  run_tool config "${CONFIG_PARAMS[@]}"
   exit $?
 fi
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/578316d9/solr/bin/solr.cmd
----------------------------------------------------------------------
diff --git a/solr/bin/solr.cmd b/solr/bin/solr.cmd
index 0e86fad..d6d2745 100755
--- a/solr/bin/solr.cmd
+++ b/solr/bin/solr.cmd
@@ -1426,10 +1426,13 @@ SHIFT
 goto parse_config_args
 
 :run_config
+IF NOT "!ZK_HOST!"=="" SET "CONFIG_ARGS=!CONFIG_ARGS! -z !ZK_HOST!"
+IF NOT "!SOLR_URL_SCHEME!"=="" SET "CONFIG_ARGS=!CONFIG_ARGS! -scheme !SOLR_URL_SCHEME!"
+
 "%JAVA%" %SOLR_SSL_OPTS% %AUTHC_OPTS% %SOLR_ZK_CREDS_AND_ACLS% -Dsolr.install.dir="%SOLR_TIP%"
^
   -Dlog4j.configurationFile="file:%DEFAULT_SERVER_DIR%\scripts\cloud-scripts\log4j2.xml"
^
   -classpath "%DEFAULT_SERVER_DIR%\solr-webapp\webapp\WEB-INF\lib\*;%DEFAULT_SERVER_DIR%\lib\ext\*"
^
-  org.apache.solr.util.SolrCLI config -zkHost !ZK_HOST! -scheme !SOLR_URL_SCHEME! !CONFIG_ARGS!
+  org.apache.solr.util.SolrCLI config !CONFIG_ARGS!
 if errorlevel 1 (
    exit /b 1
 )

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/578316d9/solr/bin/solr.in.cmd
----------------------------------------------------------------------
diff --git a/solr/bin/solr.in.cmd b/solr/bin/solr.in.cmd
index 226201e..86ad708 100755
--- a/solr/bin/solr.in.cmd
+++ b/solr/bin/solr.in.cmd
@@ -39,7 +39,7 @@ REM set GC_TUNE=-XX:NewRatio=3 -XX:SurvivorRatio=4     etc.
 REM Set the ZooKeeper connection string if using an external ZooKeeper ensemble
 REM e.g. host1:2181,host2:2181/chroot
 REM Leave empty if not using SolrCloud
-set ZK_HOST=localhost:2181
+REM set ZK_HOST=
 
 REM Set the ZooKeeper client timeout (for SolrCloud mode)
 REM set ZK_CLIENT_TIMEOUT=15000


Mime
View raw message