diff --git a/dev-tools/scripts/cloud.sh b/dev-tools/scripts/cloud.sh index 3ab979d5ac3..9824fb3eea7 100755 --- a/dev-tools/scripts/cloud.sh +++ b/dev-tools/scripts/cloud.sh @@ -334,7 +334,7 @@ start(){ echo "Final NUM_NODES is $NUM_NODES" for i in `seq 1 $NUM_NODES`; do mkdir -p "${CLUSTER_WD}/n${i}" - argsArray=(-c -s $CLUSTER_WD_FULL/n${i} -z localhost:${ZK_PORT}/solr_${SAFE_DEST} -p 898${i} -m $MEMORY \ + argsArray=(-c --solr-home $CLUSTER_WD_FULL/n${i} -z localhost:${ZK_PORT}/solr_${SAFE_DEST} -p 898${i} -m $MEMORY \ -a "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=500${i} \ -Dsolr.log.dir=$CLUSTER_WD_FULL/n${i} $JVM_ARGS") FINAL_COMMAND="${SOLR}/bin/solr ${argsArray[@]}" diff --git a/solr/bin/solr b/solr/bin/solr index 040192548d8..62d77205189 100755 --- a/solr/bin/solr +++ b/solr/bin/solr @@ -367,7 +367,7 @@ function print_usage() { if [[ "$CMD" == "start" || "$CMD" == "restart" ]]; then echo "" - echo "Usage: solr $CMD [-f] [-c] [--host host] [-p port] [-d directory] [-z zkHost] [-m memory] [-e example] [-s solr.solr.home] [-t solr.data.home] [--jvm-opts \"jvm-opts\"] [-V]" + echo "Usage: solr $CMD [-f] [-c] [--host host] [-p port] [-d directory] [-z zkHost] [-m memory] [-e example] [--solr-home solr.solr.home] [-t solr.data.home] [--jvm-opts \"jvm-opts\"] [-V]" echo "" echo " -f Start Solr in foreground; default starts Solr in the background" echo " and sends stdout / stderr to solr-PORT-console.log" @@ -393,7 +393,7 @@ function print_usage() { echo " -m/--memory Sets the min (-Xms) and max (-Xmx) heap size for the JVM, such as: -m 4g" echo " results in: -Xms4g -Xmx4g; by default, this script sets the heap size to 512m" echo "" - echo " -s Sets the solr.solr.home system property; Solr will create core directories under" + echo " --solr-home Sets the solr.solr.home system property; Solr will create core directories under" echo " this directory. This allows you to run multiple Solr instances on the same host" echo " while reusing the same server directory set using the -d parameter. If set, the" echo " specified directory should contain a solr.xml file, unless solr.xml exists in Zookeeper." diff --git a/solr/bin/solr.cmd b/solr/bin/solr.cmd index ae51b74d8cf..71660352917 100755 --- a/solr/bin/solr.cmd +++ b/solr/bin/solr.cmd @@ -307,7 +307,7 @@ goto done :start_usage @echo. -@echo Usage: solr %SCRIPT_CMD% [-f] [-c] [--host hostname] [-p port] [-d directory] [-z zkHost] [-m memory] [-e example] [-s solr.solr.home] [-t solr.data.home] [--jvm-opts "jvm-opts"] [-V] +@echo Usage: solr %SCRIPT_CMD% [-f] [-c] [--host hostname] [-p port] [-d directory] [-z zkHost] [-m memory] [-e example] [--solr-home solr.solr.home] [-t solr.data.home] [--jvm-opts "jvm-opts"] [-V] @echo. @echo -f Start Solr in foreground; default starts Solr in the background @echo and sends stdout / stderr to solr-PORT-console.log @@ -333,7 +333,7 @@ goto done @echo -m memory Sets the min (-Xms) and max (-Xmx) heap size for the JVM, such as: -m 4g @echo results in: -Xms4g -Xmx4g; by default, this script sets the heap size to 512m @echo. -@echo -s dir Sets the solr.solr.home system property; Solr will create core directories under +@echo --solr.home dir Sets the solr.solr.home system property; Solr will create core directories under @echo this directory. This allows you to run multiple Solr instances on the same host @echo while reusing the same server directory set using the -d parameter. If set, the @echo specified directory should contain a solr.xml file, unless solr.xml exists in Zookeeper. diff --git a/solr/core/src/java/org/apache/solr/cli/AssertTool.java b/solr/core/src/java/org/apache/solr/cli/AssertTool.java index dabbe2aaa8d..3dabdb9eb6f 100644 --- a/solr/core/src/java/org/apache/solr/cli/AssertTool.java +++ b/solr/core/src/java/org/apache/solr/cli/AssertTool.java @@ -26,6 +26,7 @@ import java.util.List; import java.util.concurrent.TimeUnit; import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.DeprecatedAttributes; import org.apache.commons.cli.Option; import org.apache.solr.client.solrj.SolrClient; import org.apache.solr.client.solrj.SolrServerException; @@ -65,18 +66,40 @@ public List