lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sar...@apache.org
Subject lucene-solr:branch_7x: 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 13:35:07 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/branch_7x 9ea1fa535 -> a66d49fbd


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/a66d49fb
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/a66d49fb
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/a66d49fb

Branch: refs/heads/branch_7x
Commit: a66d49fbd310f8d61bb411daee01e9c25de4af67
Parents: 9ea1fa5
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 09:34:58 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/a66d49fb/solr/bin/solr
----------------------------------------------------------------------
diff --git a/solr/bin/solr b/solr/bin/solr
index 43deb5c..115cec1 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/a66d49fb/solr/bin/solr.cmd
----------------------------------------------------------------------
diff --git a/solr/bin/solr.cmd b/solr/bin/solr.cmd
index 1ed9cb7..3fb20fa 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/a66d49fb/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