You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ja...@apache.org on 2014/11/11 22:27:22 UTC

svn commit: r1638428 - in /lucene/dev/branches/branch_5x/solr: ./ CHANGES.txt bin/ bin/solr bin/solr.cmd bin/solr.in.cmd bin/solr.in.sh

Author: janhoy
Date: Tue Nov 11 21:27:21 2014
New Revision: 1638428

URL: http://svn.apache.org/r1638428
Log:
SOLR-6697: bin/solr start scripts allow setting SOLR_OPTS in solr.in.* (backport)

Modified:
    lucene/dev/branches/branch_5x/solr/   (props changed)
    lucene/dev/branches/branch_5x/solr/CHANGES.txt   (contents, props changed)
    lucene/dev/branches/branch_5x/solr/bin/   (props changed)
    lucene/dev/branches/branch_5x/solr/bin/solr
    lucene/dev/branches/branch_5x/solr/bin/solr.cmd
    lucene/dev/branches/branch_5x/solr/bin/solr.in.cmd
    lucene/dev/branches/branch_5x/solr/bin/solr.in.sh

Modified: lucene/dev/branches/branch_5x/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/CHANGES.txt?rev=1638428&r1=1638427&r2=1638428&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/CHANGES.txt (original)
+++ lucene/dev/branches/branch_5x/solr/CHANGES.txt Tue Nov 11 21:27:21 2014
@@ -356,6 +356,8 @@ Other Changes
   References to zkCredentialProvider in System properties or configurations should be
   changed to zkCredentialsProvider.  (Gregory Chanan)
 
+* SOLR-6697: bin/solr start scripts allow setting SOLR_OPTS in solr.in.* (janhoy)
+
 ==================  4.10.3 ==================
 
 Bug Fixes

Modified: lucene/dev/branches/branch_5x/solr/bin/solr
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/bin/solr?rev=1638428&r1=1638427&r2=1638428&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/bin/solr (original)
+++ lucene/dev/branches/branch_5x/solr/bin/solr Tue Nov 11 21:27:21 2014
@@ -1012,6 +1012,9 @@ function launch_solr() {
     echo -e "    CLOUD_MODE_OPTS = $CLOUD_MODE_OPTS"
     echo -e "    SOLR_TIMEZONE   = $SOLR_TIMEZONE"
     
+    if [ "$SOLR_OPTS" != "" ]; then
+      echo -e "    SOLR_OPTS        = $SOLR_OPTS"
+    fi
     if [ "$SOLR_ADDL_ARGS" != "" ]; then
       echo -e "    SOLR_ADDL_ARGS   = $SOLR_ADDL_ARGS"
     fi
@@ -1032,7 +1035,8 @@ $SOLR_HOST_ARG -Djetty.port=$SOLR_PORT \
 -Dsolr.solr.home=$SOLR_HOME \
 -Dsolr.install.dir=$SOLR_TIP \
 -Duser.timezone=$SOLR_TIMEZONE \
--Djava.net.preferIPv4Stack=true"
+-Djava.net.preferIPv4Stack=true \
+$SOLR_OPTS"
   
   if [ "$SOLR_MODE" == "solrcloud" ]; then
     IN_CLOUD_MODE=" in SolrCloud mode"

Modified: lucene/dev/branches/branch_5x/solr/bin/solr.cmd
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/bin/solr.cmd?rev=1638428&r1=1638427&r2=1638428&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/bin/solr.cmd (original)
+++ lucene/dev/branches/branch_5x/solr/bin/solr.cmd Tue Nov 11 21:27:21 2014
@@ -617,6 +617,12 @@ IF "%verbose%"=="1" (
     @echo     REMOTE_JMX_OPTS = %REMOTE_JMX_OPTS%
     @echo     CLOUD_MODE_OPTS = %CLOUD_MODE_OPTS%
     @echo     SOLR_TIMEZONE   = %SOLR_TIMEZONE%
+    IF NOT "%SOLR_OPTS%"=="" (
+      @echo     SOLR_OPTS       = %SOLR_OPTS%
+    )
+    IF NOT "%SOLR_ADDL_ARGS%"=="" (
+      @echo     SOLR_ADDL_ARGS  = %SOLR_ADDL_ARGS%
+    )
 )
 
 set START_OPTS=-Duser.timezone=%SOLR_TIMEZONE% -Djava.net.preferIPv4Stack=true
@@ -625,6 +631,7 @@ IF NOT "!CLOUD_MODE_OPTS!"=="" set START
 IF NOT "%REMOTE_JMX_OPTS%"=="" set START_OPTS=%START_OPTS% %REMOTE_JMX_OPTS%
 IF NOT "%SOLR_ADDL_ARGS%"=="" set START_OPTS=%START_OPTS% %SOLR_ADDL_ARGS%
 IF NOT "%SOLR_HOST_ARG%"=="" set START_OPTS=%START_OPTS% %SOLR_HOST_ARG%
+IF NOT "%SOLR_OPTS%"=="" set START_OPTS=%START_OPTS% %SOLR_OPTS%
 
 cd "%SOLR_SERVER_DIR%"
 @echo.

Modified: lucene/dev/branches/branch_5x/solr/bin/solr.in.cmd
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/bin/solr.in.cmd?rev=1638428&r1=1638427&r2=1638428&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/bin/solr.in.cmd (original)
+++ lucene/dev/branches/branch_5x/solr/bin/solr.in.cmd Tue Nov 11 21:27:21 2014
@@ -67,3 +67,10 @@ REM JMX savvy tools like VisualVM remote
 REM (recommended in production environments)
 set ENABLE_REMOTE_JMX_OPTS=true
 
+REM Anything you add to the SOLR_OPTS variable will be included in the java
+REM start command line as-is, in ADDITION to other options. If you specify the
+REM -a option on start script, those options will be appended as well. Examples:
+REM set SOLR_OPTS=%SOLR_OPTS% -Dsolr.autoSoftCommit.maxTime=3000
+REM set SOLR_OPTS=%SOLR_OPTS% -Dsolr.autoCommit.maxTime=60000
+REM set SOLR_OPTS=%SOLR_OPTS% -Dsolr.clustering.enabled=true
+

Modified: lucene/dev/branches/branch_5x/solr/bin/solr.in.sh
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/bin/solr.in.sh?rev=1638428&r1=1638427&r2=1638428&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/bin/solr.in.sh (original)
+++ lucene/dev/branches/branch_5x/solr/bin/solr.in.sh Tue Nov 11 21:27:21 2014
@@ -60,3 +60,10 @@ GC_TUNE="-XX:NewRatio=3 \
 # JMX savvy tools like VisualVM remotely, set to "false" to disable that behavior
 # (recommended in production environments)
 ENABLE_REMOTE_JMX_OPTS="true"
+
+# Anything you add to the SOLR_OPTS variable will be included in the java
+# start command line as-is, in ADDITION to other options. If you specify the
+# -a option on start script, those options will be appended as well. Examples:
+#SOLR_OPTS="$SOLR_OPTS -Dsolr.autoSoftCommit.maxTime=3000"
+#SOLR_OPTS="$SOLR_OPTS -Dsolr.autoCommit.maxTime=60000"
+#SOLR_OPTS="$SOLR_OPTS -Dsolr.clustering.enabled=true"