mirror of https://github.com/apache/lucene.git
SOLR-6756: A first pass at making the cloud-dev scripts work again.
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1642963 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d7851a8c5f
commit
34bee4999d
|
@ -13,8 +13,8 @@ cd ..
|
|||
|
||||
for (( i=1; i <= $numServers; i++ ))
|
||||
do
|
||||
rm -r -f example$i
|
||||
rm -r -f server$i
|
||||
done
|
||||
|
||||
rm -r -f examplezk
|
||||
rm -r -f example-lastlogs
|
||||
rm -r -f serverzk
|
||||
rm -r -f server-lastlogs
|
|
@ -1,51 +1,53 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# TODO: !OUT OF DATE!
|
||||
|
||||
cd ..
|
||||
|
||||
rm -r -f example2
|
||||
rm -r -f example3
|
||||
rm -r -f example4
|
||||
rm -r -f example5
|
||||
rm -r -f example6
|
||||
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 example/solr/zoo_data
|
||||
rm -r -f example/solr/data
|
||||
rm -f example/example.log
|
||||
rm -r -f server/solr/zoo_data
|
||||
rm -r -f server/solr/data
|
||||
rm -f server/server.log
|
||||
|
||||
ant example dist
|
||||
|
||||
cp -r -f example example2
|
||||
cp -r -f example example3
|
||||
cp -r -f example example4
|
||||
cp -r -f example example5
|
||||
cp -r -f example example6
|
||||
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
|
||||
|
||||
# first try uploading a conf dir
|
||||
java -classpath lib/*:dist/*:build/lucene-libs/* org.apache.solr.cloud.ZkCLI -cmd upconfig -zkhost 127.0.0.1:9983 -confdir example/solr/collection1/conf -confname conf1 -solrhome example/solr -runzk 8983
|
||||
java -classpath lib/*:dist/*:build/lucene-libs/* org.apache.solr.cloud.ZkCLI -cmd upconfig -zkhost 127.0.0.1:9983 -confdir server/solr/collection1/conf -confname conf1 -solrhome server/solr -runzk 8983
|
||||
|
||||
# upload a second conf set so we avoid single conf auto linking
|
||||
java -classpath lib/*:dist/*:build/lucene-libs/* org.apache.solr.cloud.ZkCLI -cmd upconfig -zkhost 127.0.0.1:9983 -confdir example/solr/collection1/conf -confname conf2 -solrhome example/solr -runzk 8983
|
||||
java -classpath lib/*:dist/*:build/lucene-libs/* org.apache.solr.cloud.ZkCLI -cmd upconfig -zkhost 127.0.0.1:9983 -confdir server/solr/collection1/conf -confname conf2 -solrhome server/solr -runzk 8983
|
||||
|
||||
# now try linking a collection to a conf set
|
||||
java -classpath lib/*:dist/*:build/lucene-libs/* org.apache.solr.cloud.ZkCLI -cmd linkconfig -zkhost 127.0.0.1:9983 -collection collection1 -confname conf1 -solrhome example/solr -runzk 8983
|
||||
java -classpath lib/*:dist/*:build/lucene-libs/* org.apache.solr.cloud.ZkCLI -cmd linkconfig -zkhost 127.0.0.1:9983 -collection collection1 -confname conf1 -solrhome server/solr -runzk 8983
|
||||
|
||||
|
||||
cd example
|
||||
java -DzkRun -DnumShards=2 -DSTOP.PORT=7983 -DSTOP.KEY=key -jar start.jar 1>example.log 2>&1 &
|
||||
cd server
|
||||
java -DzkRun -DnumShards=2 -DSTOP.PORT=7983 -DSTOP.KEY=key -jar start.jar 1>server.log 2>&1 &
|
||||
|
||||
cd ../example2
|
||||
java -Djetty.port=7574 -DzkHost=localhost:9983 -DnumShards=2 -DSTOP.PORT=6574 -DSTOP.KEY=key -jar start.jar 1>example2.log 2>&1 &
|
||||
cd ../server2
|
||||
java -Djetty.port=7574 -DzkHost=localhost:9983 -DnumShards=2 -DSTOP.PORT=6574 -DSTOP.KEY=key -jar start.jar 1>server2.log 2>&1 &
|
||||
|
||||
cd ../example3
|
||||
java -Djetty.port=7575 -DzkHost=localhost:9983 -DnumShards=2 -DSTOP.PORT=6575 -DSTOP.KEY=key -jar start.jar 1>example3.log 2>&1 &
|
||||
cd ../server3
|
||||
java -Djetty.port=7575 -DzkHost=localhost:9983 -DnumShards=2 -DSTOP.PORT=6575 -DSTOP.KEY=key -jar start.jar 1>server3.log 2>&1 &
|
||||
|
||||
cd ../example4
|
||||
java -Djetty.port=7576 -DzkHost=localhost:9983 -DnumShards=2 -DSTOP.PORT=6576 -DSTOP.KEY=key -jar start.jar 1>example4.log 2>&1 &
|
||||
cd ../server4
|
||||
java -Djetty.port=7576 -DzkHost=localhost:9983 -DnumShards=2 -DSTOP.PORT=6576 -DSTOP.KEY=key -jar start.jar 1>server4.log 2>&1 &
|
||||
|
||||
cd ../example5
|
||||
java -Djetty.port=7577 -DzkHost=localhost:9983 -DnumShards=2 -DSTOP.PORT=6577 -DSTOP.KEY=key -jar start.jar 1>example5.log 2>&1 &
|
||||
cd ../server5
|
||||
java -Djetty.port=7577 -DzkHost=localhost:9983 -DnumShards=2 -DSTOP.PORT=6577 -DSTOP.KEY=key -jar start.jar 1>server5.log 2>&1 &
|
||||
|
||||
cd ../example6
|
||||
java -Djetty.port=7578 -DzkHost=localhost:9983 -DnumShards=2 -DSTOP.PORT=6578 -DSTOP.KEY=key -jar start.jar 1>example6.log 2>&1 &
|
||||
cd ../server6
|
||||
java -Djetty.port=7578 -DzkHost=localhost:9983 -DnumShards=2 -DSTOP.PORT=6578 -DSTOP.KEY=key -jar start.jar 1>server6.log 2>&1 &
|
||||
|
|
|
@ -9,8 +9,8 @@ rebuild() {
|
|||
cd ..
|
||||
rm -r -f dist
|
||||
rm -r -f build
|
||||
rm -r -f example/solr/zoo_data
|
||||
rm -f example/example.log
|
||||
rm -r -f server/solr/zoo_data
|
||||
rm -f server/server.log
|
||||
ant example dist
|
||||
}
|
||||
|
||||
|
@ -22,8 +22,8 @@ setports() {
|
|||
reinstall() {
|
||||
echo "Reinstalling instance $1"
|
||||
cd ..
|
||||
rm -rf example$1
|
||||
cp -r -f example example$1
|
||||
rm -rf server$1
|
||||
cp -r -f server server$1
|
||||
}
|
||||
|
||||
start() {
|
||||
|
@ -33,14 +33,14 @@ start() {
|
|||
echo "Starting instance $1"
|
||||
|
||||
setports $1
|
||||
cd ../example$1
|
||||
java $JAVA_OPTS -Djetty.port=$PORT $OPT -DSTOP.PORT=$STOP_PORT -DSTOP.KEY=key -jar start.jar 1>example$1.log 2>&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 &
|
||||
}
|
||||
|
||||
stop() {
|
||||
echo "Stopping instance $1"
|
||||
setports $1
|
||||
cd ../example$1
|
||||
cd ../server$1
|
||||
java -DSTOP.PORT=$STOP_PORT -DSTOP.KEY=key -jar start.jar --stop
|
||||
}
|
||||
|
||||
|
@ -61,13 +61,13 @@ status() {
|
|||
}
|
||||
|
||||
cleanlogs() {
|
||||
cd ../example$1
|
||||
mv example$1.log example$1.oldlog
|
||||
cd ../server$1
|
||||
mv server$1.log server$1.oldlog
|
||||
}
|
||||
|
||||
taillogs() {
|
||||
cd ../example$1
|
||||
tail -f example$1.log
|
||||
cd ../server$1
|
||||
tail -f server$1.log
|
||||
}
|
||||
|
||||
createshard() {
|
||||
|
|
|
@ -1,45 +1,47 @@
|
|||
#!/bin/bash
|
||||
|
||||
# TODO: !OUT OF DATE!
|
||||
|
||||
zkaddress = localhost:2181/solr
|
||||
|
||||
cd ..
|
||||
|
||||
rm -r -f example2
|
||||
rm -r -f example3
|
||||
rm -r -f example4
|
||||
rm -r -f example5
|
||||
rm -r -f example6
|
||||
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 example/solr/zoo_data
|
||||
rm -r -f example/solr/collection1/data
|
||||
rm -f example/example.log
|
||||
rm -r -f server/solr/zoo_data
|
||||
rm -r -f server/solr/collection1/data
|
||||
rm -f server/server.log
|
||||
|
||||
ant example dist
|
||||
|
||||
cp -r -f example example2
|
||||
cp -r -f example example3
|
||||
cp -r -f example example4
|
||||
cp -r -f example example5
|
||||
cp -r -f example example6
|
||||
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 "example/solr-webapp/webapp/WEB-INF/lib/*:example/lib/ext/" org.apache.solr.cloud.ZkController "$zkaddress" 8983 example/solr/conf conf1
|
||||
java -classpath "server/solr-webapp/webapp/WEB-INF/lib/*:server/lib/ext/" org.apache.solr.cloud.ZkController "$zkaddress" 8983 server/solr/conf conf1
|
||||
|
||||
cd example
|
||||
java -DzkHost="$zkaddress" -DnumShards=2 -DSTOP.PORT=7983 -DSTOP.KEY=key -jar start.jar 1>example.log 2>&1 &
|
||||
cd server
|
||||
java -DzkHost="$zkaddress" -DnumShards=2 -DSTOP.PORT=7983 -DSTOP.KEY=key -jar start.jar 1>server.log 2>&1 &
|
||||
|
||||
cd ../example2
|
||||
java -Djetty.port=7574 -DzkHost="$zkaddress" -DSTOP.PORT=6574 -DSTOP.KEY=key -jar start.jar 1>example2.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 ../example3
|
||||
java -Djetty.port=7575 -DzkHost="$zkaddress" -DSTOP.PORT=6575 -DSTOP.KEY=key -jar start.jar 1>example3.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 ../example4
|
||||
java -Djetty.port=7576 -DzkHost="$zkaddress" -DSTOP.PORT=6576 -DSTOP.KEY=key -jar start.jar 1>example4.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 ../example5
|
||||
java -Djetty.port=7577 -DzkHost="$zkaddress" -DSTOP.PORT=6577 -DSTOP.KEY=key -jar start.jar 1>example5.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 ../example6
|
||||
java -Djetty.port=7578 -DzkHost="$zkaddress" -DSTOP.PORT=6578 -DSTOP.KEY=key -jar start.jar 1>example6.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 &
|
||||
|
|
|
@ -1,45 +1,47 @@
|
|||
#!/bin/bash
|
||||
|
||||
# TODO: !OUT OF DATE!
|
||||
|
||||
# starts up the multicore example
|
||||
|
||||
cd ..
|
||||
|
||||
rm -r -f example2
|
||||
rm -r -f example3
|
||||
rm -r -f example4
|
||||
rm -r -f example5
|
||||
rm -r -f example6
|
||||
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 example/solr/zoo_data
|
||||
rm -r -f example/solr/collection1/data
|
||||
rm -f example/example.log
|
||||
rm -r -f server/solr/zoo_data
|
||||
rm -r -f server/solr/collection1/data
|
||||
rm -f server/server.log
|
||||
|
||||
ant example dist
|
||||
|
||||
cp -r -f example example2
|
||||
cp -r -f example example3
|
||||
cp -r -f example example4
|
||||
cp -r -f example example5
|
||||
cp -r -f example example6
|
||||
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 "example/solr-webapp/webapp/WEB-INF/lib/*:example/lib/ext/" org.apache.solr.cloud.ZkCLI -cmd upconf -zkhost 127.0.0.1:9983 -solrhome example/multicore -runzk 8983
|
||||
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 example
|
||||
java -DzkRun -DnumShards=2 -DSTOP.PORT=7983 -DSTOP.KEY=key -Dsolr.solr.home=multicore -jar start.jar 1>example.log 2>&1 &
|
||||
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 ../example2
|
||||
java -Djetty.port=7574 -DzkHost=localhost:9983 -DnumShards=2 -DSTOP.PORT=6574 -DSTOP.KEY=key -Dsolr.solr.home=multicore -jar start.jar 1>example2.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 ../example3
|
||||
java -Djetty.port=7575 -DzkHost=localhost:9983 -DnumShards=2 -DSTOP.PORT=6575 -DSTOP.KEY=key -Dsolr.solr.home=multicore -jar start.jar 1>example3.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 ../example4
|
||||
java -Djetty.port=7576 -DzkHost=localhost:9983 -DnumShards=2 -DSTOP.PORT=6576 -DSTOP.KEY=key -Dsolr.solr.home=multicore -jar start.jar 1>example4.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 ../example5
|
||||
java -Djetty.port=7577 -DzkHost=localhost:9983 -DnumShards=2 -DSTOP.PORT=6577 -DSTOP.KEY=key -Dsolr.solr.home=multicore -jar start.jar 1>example5.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 ../example6
|
||||
java -Djetty.port=7578 -DzkHost=localhost:9983 -DnumShards=2 -DSTOP.PORT=6578 -DSTOP.KEY=key -Dsolr.solr.home=multicore -jar start.jar 1>example6.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 &
|
||||
|
|
|
@ -17,20 +17,20 @@ die () {
|
|||
|
||||
cd ..
|
||||
|
||||
cd examplezk
|
||||
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>examplezk.log 2>&1 &
|
||||
# TODO: we could also remove the default core
|
||||
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 &
|
||||
|
||||
cd ..
|
||||
|
||||
cd example
|
||||
cd server
|
||||
|
||||
for (( i=1; i <= $numServers; i++ ))
|
||||
do
|
||||
echo "starting example$i"
|
||||
cd ../example$i
|
||||
echo "starting server$i"
|
||||
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>example$i.log 2>&1 &
|
||||
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 &
|
||||
done
|
||||
|
|
|
@ -25,52 +25,48 @@ cd ..
|
|||
|
||||
for (( i=1; i <= $numServers; i++ ))
|
||||
do
|
||||
rm -r -f example$i
|
||||
echo "try to remove existing directory: server$i"
|
||||
rm -r -f server$i
|
||||
done
|
||||
|
||||
|
||||
rm -r -f dist
|
||||
rm -r -f build
|
||||
rm -r -f example/solr/zoo_data
|
||||
rm -r -f example/solr/collection1/data
|
||||
rm -f example/example.log
|
||||
rm -r -f server/solr/zoo_data
|
||||
rm -f server/server.log
|
||||
|
||||
ant -f ../build.xml clean
|
||||
ant example dist
|
||||
|
||||
rm -r example/solr-webapp/*
|
||||
unzip example/webapps/solr.war -d example/solr-webapp/webapp
|
||||
rm -r server/solr-webapp/*
|
||||
unzip server/webapps/solr.war -d server/solr-webapp/webapp
|
||||
|
||||
for (( i=1; i <= $numServers; i++ ))
|
||||
do
|
||||
echo "create example$i"
|
||||
cp -r -f example example$i
|
||||
echo "create server$i"
|
||||
cp -r -f server server$i
|
||||
done
|
||||
|
||||
|
||||
rm -r -f examplezk
|
||||
cp -r -f example examplezk
|
||||
cp core/src/test-files/solr/solr-no-core.xml examplezk/solr/solr.xml
|
||||
rm -r -f examplezk/solr/collection1/core.properties
|
||||
cd examplezk
|
||||
rm -r -f serverzk
|
||||
cp -r -f server serverzk
|
||||
cp core/src/test-files/solr/solr-no-core.xml serverzk/solr/solr.xml
|
||||
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>examplezk.log 2>&1 &
|
||||
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 &
|
||||
cd ..
|
||||
|
||||
# upload config files
|
||||
java -classpath "example1/solr-webapp/webapp/WEB-INF/lib/*:example/lib/ext/*" $JAVA_OPTS org.apache.solr.cloud.ZkCLI -cmd bootstrap -zkhost $zkAddress -solrhome example1/solr
|
||||
java -classpath "server/solr-webapp/webapp/WEB-INF/lib/*:server/lib/ext/*" $JAVA_OPTS org.apache.solr.cloud.ZkCLI -zkhost $zkAddress -cmd upconfig --confdir server/solr/configsets/basic_configs --confname basic_configs
|
||||
|
||||
cd example
|
||||
cd server
|
||||
|
||||
for (( i=1; i <= $numServers; i++ ))
|
||||
do
|
||||
echo "starting example$i"
|
||||
cd ../example$i
|
||||
echo "starting server$i"
|
||||
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>example$i.log 2>&1 &
|
||||
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 &
|
||||
done
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -11,22 +11,22 @@ die () {
|
|||
|
||||
[ "$#" -eq 1 ] || die "1 argument required, $# provided, usage: stop.sh {numServers}"
|
||||
|
||||
cd ../example
|
||||
cd ../server
|
||||
|
||||
for (( i=1; i <= $numServers; i++ ))
|
||||
do
|
||||
stopPort=`expr $baseStopPort + $i`
|
||||
echo "stopping example$i, stop port is $stopPort"
|
||||
cd ../example$i
|
||||
echo "stopping server$i, stop port is $stopPort"
|
||||
cd ../server$i
|
||||
java -DSTOP.PORT=$stopPort -DSTOP.KEY=key -jar start.jar --stop
|
||||
done
|
||||
|
||||
|
||||
mkdir ../example-lastlogs
|
||||
mkdir ../server-lastlogs
|
||||
|
||||
for (( i=1; i <= $numServers; i++ ))
|
||||
do
|
||||
cd ../example$i
|
||||
cd ../server$i
|
||||
|
||||
jettyPort=`expr $baseJettyPort + $i`
|
||||
echo "Make sure jetty stops and wait for it: $jettyPort"
|
||||
|
@ -41,8 +41,8 @@ do
|
|||
fi
|
||||
|
||||
# save the last shutdown logs
|
||||
echo "copy example$i.log to lastlogs"
|
||||
cp -r -f example$i.log ../example-lastlogs/example-last$i.log
|
||||
echo "copy server$i.log to lastlogs"
|
||||
cp -r -f server$i.log ../server-lastlogs/server-last$i.log
|
||||
done
|
||||
|
||||
# stop zk runner
|
||||
|
|
Loading…
Reference in New Issue