From 1a7cf2fc856f67bed650df1bd51b2387fd069b58 Mon Sep 17 00:00:00 2001 From: Mark Robert Miller Date: Tue, 28 Apr 2015 14:32:55 +0000 Subject: [PATCH] SOLR-7349: Update cloud-dev scripts for Jetty 9. git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1676546 13f79535-47bb-0310-9956-ffa450edef68 --- solr/cloud-dev/functions.sh | 4 +- solr/cloud-dev/solrcloud-extzk-start.sh | 47 ---------------------- solr/cloud-dev/solrcloud-multi-start.sh | 47 ---------------------- solr/cloud-dev/solrcloud-start-existing.sh | 4 +- solr/cloud-dev/solrcloud-start.sh | 10 +++-- solr/cloud-dev/stop.sh | 4 +- 6 files changed, 12 insertions(+), 104 deletions(-) delete mode 100755 solr/cloud-dev/solrcloud-extzk-start.sh delete mode 100755 solr/cloud-dev/solrcloud-multi-start.sh diff --git a/solr/cloud-dev/functions.sh b/solr/cloud-dev/functions.sh index e7ab517d0f8..bde343299d1 100755 --- a/solr/cloud-dev/functions.sh +++ b/solr/cloud-dev/functions.sh @@ -34,14 +34,14 @@ start() { setports $1 cd ../server$1 - java $JAVA_OPTS -Djetty.port=$PORT $OPT -DSTOP.PORT=$STOP_PORT -DSTOP.KEY=key -jar start.jar 1>server$1.log 2>&1 & + java $JAVA_OPTS -Djetty.port=$PORT $OPT -jar start.jar --module=http STOP.PORT=$STOP_PORT STOP.KEY=key jetty.base=. 1>server$1.log 2>&1 & } stop() { echo "Stopping instance $1" setports $1 cd ../server$1 - java -DSTOP.PORT=$STOP_PORT -DSTOP.KEY=key -jar start.jar --stop + java -jar start.jar --module=http STOP.PORT=$STOP_PORT STOP.KEY=key --stop } do_kill() { diff --git a/solr/cloud-dev/solrcloud-extzk-start.sh b/solr/cloud-dev/solrcloud-extzk-start.sh deleted file mode 100755 index 419e0e1c582..00000000000 --- a/solr/cloud-dev/solrcloud-extzk-start.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash - -# TODO: !OUT OF DATE! - -zkaddress = localhost:2181/solr - -cd .. - -rm -r -f server2 -rm -r -f server3 -rm -r -f server4 -rm -r -f server5 -rm -r -f server6 - -rm -r -f dist -rm -r -f build -rm -r -f server/solr/zoo_data -rm -r -f server/solr/collection1/data -rm -f server/server.log - -ant server dist - -cp -r -f server server2 -cp -r -f server server3 -cp -r -f server server4 -cp -r -f server server5 -cp -r -f server server6 - -java -classpath "server/solr-webapp/webapp/WEB-INF/lib/*:server/lib/ext/" org.apache.solr.cloud.ZkController "$zkaddress" 8983 server/solr/conf conf1 - -cd server -java -DzkHost="$zkaddress" -DnumShards=2 -DSTOP.PORT=7983 -DSTOP.KEY=key -jar start.jar 1>server.log 2>&1 & - -cd ../server2 -java -Djetty.port=7574 -DzkHost="$zkaddress" -DSTOP.PORT=6574 -DSTOP.KEY=key -jar start.jar 1>server2.log 2>&1 & - -cd ../server3 -java -Djetty.port=7575 -DzkHost="$zkaddress" -DSTOP.PORT=6575 -DSTOP.KEY=key -jar start.jar 1>server3.log 2>&1 & - -cd ../server4 -java -Djetty.port=7576 -DzkHost="$zkaddress" -DSTOP.PORT=6576 -DSTOP.KEY=key -jar start.jar 1>server4.log 2>&1 & - -cd ../server5 -java -Djetty.port=7577 -DzkHost="$zkaddress" -DSTOP.PORT=6577 -DSTOP.KEY=key -jar start.jar 1>server5.log 2>&1 & - -cd ../server6 -java -Djetty.port=7578 -DzkHost="$zkaddress" -DSTOP.PORT=6578 -DSTOP.KEY=key -jar start.jar 1>server6.log 2>&1 & diff --git a/solr/cloud-dev/solrcloud-multi-start.sh b/solr/cloud-dev/solrcloud-multi-start.sh deleted file mode 100755 index 937f32ed09e..00000000000 --- a/solr/cloud-dev/solrcloud-multi-start.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash - -# TODO: !OUT OF DATE! - -# starts up the multicore example - -cd .. - -rm -r -f server2 -rm -r -f server3 -rm -r -f server4 -rm -r -f server5 -rm -r -f server6 - -rm -r -f dist -rm -r -f build -rm -r -f server/solr/zoo_data -rm -r -f server/solr/collection1/data -rm -f server/server.log - -ant server dist - -cp -r -f server server2 -cp -r -f server server3 -cp -r -f server server4 -cp -r -f server server5 -cp -r -f server server6 - -java -classpath "server/solr-webapp/webapp/WEB-INF/lib/*:server/lib/ext/" org.apache.solr.cloud.ZkCLI -cmd upconf -zkhost 127.0.0.1:9983 -solrhome example/multicore -runzk 8983 - -cd server -java -DzkRun -DnumShards=2 -DSTOP.PORT=7983 -DSTOP.KEY=key -Dsolr.solr.home=../example/multicore -jar start.jar 1>server.log 2>&1 & - -cd ../server2 -java -Djetty.port=7574 -DzkHost=localhost:9983 -DnumShards=2 -DSTOP.PORT=6574 -DSTOP.KEY=key -Dsolr.solr.home=multicore -jar start.jar 1>server2.log 2>&1 & - -cd ../server3 -java -Djetty.port=7575 -DzkHost=localhost:9983 -DnumShards=2 -DSTOP.PORT=6575 -DSTOP.KEY=key -Dsolr.solr.home=multicore -jar start.jar 1>server3.log 2>&1 & - -cd ../server4 -java -Djetty.port=7576 -DzkHost=localhost:9983 -DnumShards=2 -DSTOP.PORT=6576 -DSTOP.KEY=key -Dsolr.solr.home=multicore -jar start.jar 1>server4.log 2>&1 & - -cd ../server5 -java -Djetty.port=7577 -DzkHost=localhost:9983 -DnumShards=2 -DSTOP.PORT=6577 -DSTOP.KEY=key -Dsolr.solr.home=multicore -jar start.jar 1>server5.log 2>&1 & - -cd ../server6 -java -Djetty.port=7578 -DzkHost=localhost:9983 -DnumShards=2 -DSTOP.PORT=6578 -DSTOP.KEY=key -Dsolr.solr.home=multicore -jar start.jar 1>server6.log 2>&1 & diff --git a/solr/cloud-dev/solrcloud-start-existing.sh b/solr/cloud-dev/solrcloud-start-existing.sh index f601153f7ad..fc5ea7d73e5 100755 --- a/solr/cloud-dev/solrcloud-start-existing.sh +++ b/solr/cloud-dev/solrcloud-start-existing.sh @@ -20,7 +20,7 @@ cd .. cd serverzk stopPort=1313 jettyPort=8900 -exec -a jettyzk java -Xmx512m $JAVA_OPTS -Djetty.port=$jettyPort -DhostPort=$jettyPort -DzkRun -DzkHost=localhost:9900/$ZK_CHROOT -DzkRunOnly=true -DSTOP.PORT=$stopPort -DSTOP.KEY=key -jar start.jar 1>serverzk.log 2>&1 & +exec -a jettyzk java -Xmx512m $JAVA_OPTS -Djetty.port=$jettyPort -DhostPort=$jettyPort -DzkRun -DzkHost=localhost:9900/$ZK_CHROOT -DzkRunOnly=true -jar start.jar --module=http STOP.PORT=$stopPort STOP.KEY=key jetty.base=. 1>serverzk.log 2>&1 & cd .. @@ -32,5 +32,5 @@ do cd ../server$i stopPort=`expr $baseStopPort + $i` jettyPort=`expr $baseJettyPort + $i` - exec -a jetty java -Xmx1g $JAVA_OPTS -Djetty.port=$jettyPort -DzkHost=localhost:9900/$ZK_CHROOT -DSTOP.PORT=$stopPort -DSTOP.KEY=key -jar start.jar 1>server$i.log 2>&1 & + exec -a jetty java -Xmx1g $JAVA_OPTS -Djetty.port=$jettyPort -DzkHost=localhost:9900/$ZK_CHROOT -jar start.jar --module=http STOP.PORT=$stopPort STOP.KEY=key jetty.base=. 1>server$i.log 2>&1 & done diff --git a/solr/cloud-dev/solrcloud-start.sh b/solr/cloud-dev/solrcloud-start.sh index e0f2aa7f1e4..8371e95b224 100755 --- a/solr/cloud-dev/solrcloud-start.sh +++ b/solr/cloud-dev/solrcloud-start.sh @@ -1,5 +1,7 @@ #!/bin/bash +# These scripts are best effort developer scripts. No promises. + # To run on hdfs, try something along the lines of: # export JAVA_OPTS="-Dsolr.directoryFactory=solr.HdfsDirectoryFactory -Dsolr.lock.type=hdfs -Dsolr.hdfs.home=hdfs://localhost:8020/solr -Dsolr.hdfs.confdir=/etc/hadoop_conf/conf" @@ -35,8 +37,8 @@ rm -r -f build rm -r -f server/solr/zoo_data rm -f server/server.log -ant -f ../build.xml clean -ant server dist +#ant -f ../build.xml clean +#ant server dist rm -r server/solr-webapp/* unzip server/webapps/solr.war -d server/solr-webapp/webapp @@ -54,7 +56,7 @@ rm -r -f serverzk/solr/collection1/core.properties cd serverzk stopPort=1313 jettyPort=8900 -exec -a jettyzk java -Xmx512m $JAVA_OPTS -Djetty.port=$jettyPort -DhostPort=$jettyPort -DzkRun=localhost:9900/solr -DzkHost=$zkAddress -DzkRunOnly=true -DSTOP.PORT=$stopPort -DSTOP.KEY=key -jar start.jar 1>serverzk.log 2>&1 & +exec -a jettyzk java -Xmx512m $JAVA_OPTS -Djetty.port=$jettyPort -DhostPort=$jettyPort -DzkRun=localhost:9900/solr -DzkHost=$zkAddress -DzkRunOnly=true -jar start.jar --module=http STOP.PORT=$stopPort STOP.KEY=key jetty.base=. 1>serverzk.log 2>&1 & cd .. # upload config files @@ -68,5 +70,5 @@ do cd ../server$i stopPort=`expr $baseStopPort + $i` jettyPort=`expr $baseJettyPort + $i` - exec -a jetty java -Xmx1g $JAVA_OPTS -DnumShards=$numShards -Djetty.port=$jettyPort -DzkHost=$zkAddress -DSTOP.PORT=$stopPort -DSTOP.KEY=key -jar start.jar 1>server$i.log 2>&1 & + exec -a jetty java -Xmx1g $JAVA_OPTS -DnumShards=$numShards -Djetty.port=$jettyPort -DzkHost=$zkAddress -jar start.jar --module=http STOP.PORT=$stopPort STOP.KEY=key jetty.base=. 1>server$i.log 2>&1 & done diff --git a/solr/cloud-dev/stop.sh b/solr/cloud-dev/stop.sh index f7e6beeba60..650219943d1 100755 --- a/solr/cloud-dev/stop.sh +++ b/solr/cloud-dev/stop.sh @@ -18,7 +18,7 @@ do stopPort=`expr $baseStopPort + $i` echo "stopping server$i, stop port is $stopPort" cd ../server$i - java -DSTOP.PORT=$stopPort -DSTOP.KEY=key -jar start.jar --stop + java -jar start.jar --module=http STOP.PORT=$stopPort STOP.KEY=key --stop done @@ -46,7 +46,7 @@ do done # stop zk runner -java -DSTOP.PORT=1313 -DSTOP.KEY=key -jar start.jar --stop +java -jar start.jar --module=http STOP.PORT=1313 STOP.KEY=key --stop echo "wait for port to be available: $baseJettyPort"