Parameter To Shutdown API to Terminate NC Services
POST to /admin/shutdown?all=true causes NC Services to exit as part of
cluster shutdown
Change-Id: Ic3009a13f4498f36dd18ea26f861506bf7d930e7
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1172
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Till Westmann <tillw@apache.org>
diff --git a/asterixdb/asterix-server/src/main/samples/local/bin/stop-sample-cluster.bat b/asterixdb/asterix-server/src/main/samples/local/bin/stop-sample-cluster.bat
index 7cbf107..dfd1ada 100644
--- a/asterixdb/asterix-server/src/main/samples/local/bin/stop-sample-cluster.bat
+++ b/asterixdb/asterix-server/src/main/samples/local/bin/stop-sample-cluster.bat
@@ -37,15 +37,12 @@
call %INSTALLDIR%\bin\${HELPER_COMMAND} get_cluster_state -quiet
if %ERRORLEVEL% EQU 0 (
- call %INSTALLDIR%\bin\${HELPER_COMMAND} shutdown_cluster
+ call %INSTALLDIR%\bin\${HELPER_COMMAND} shutdown_cluster_all
) else (
- echo WARNING: sample cluster does not appear to be running, will attempt to kill any running
- echo NCServices and wait for CCDriver to terminate if running.
+ echo WARNING: sample cluster does not appear to be running, will attempt to wait for
+ echo CCDriver to terminate if running.
)
echo.
-echo Terminating NC services...
-powershell "%JAVA_HOME%\bin\jps.exe -v | select-string -pattern ${NC_SERVICE_COMMAND} | %%{ $_.ToString().Split(' ')[0] } | %%{ Stop-Process $_ }"
-
powershell "Write-Host "Waiting for CCDriver to terminate..." -nonewline; do { if ($running) { Start-Sleep 1 }; %JAVA_HOME%\bin\jps.exe -v | select-string -pattern ${CC_COMMAND} -quiet -outvariable running | Out-Null; Write-Host "." -nonewline } while ($running)"
echo .done.
goto :END
diff --git a/asterixdb/asterix-server/src/main/samples/local/bin/stop-sample-cluster.sh b/asterixdb/asterix-server/src/main/samples/local/bin/stop-sample-cluster.sh
index 7451e4e..462d53d 100755
--- a/asterixdb/asterix-server/src/main/samples/local/bin/stop-sample-cluster.sh
+++ b/asterixdb/asterix-server/src/main/samples/local/bin/stop-sample-cluster.sh
@@ -43,13 +43,12 @@
if $INSTALLDIR/bin/${HELPER_COMMAND} get_cluster_state -quiet;
then
- $INSTALLDIR/bin/${HELPER_COMMAND} shutdown_cluster
+ $INSTALLDIR/bin/${HELPER_COMMAND} shutdown_cluster_all
else
- echo "WARNING: sample cluster does not appear to be running, will attempt to kill any running NCServices and"
- echo " wait for CCDriver to terminate if running."
+ echo "WARNING: sample cluster does not appear to be running, will attempt to wait for"
+ echo " CCDriver to terminate if running."
fi
-$JAVA_HOME/bin/jps | awk '/NCService/ { print $1 }' | xargs kill 2>/dev/null
first=1
while [ -n "$($JAVA_HOME/bin/jps | awk '/CCDriver/')" ]; do
if [ $first ]; then