Repository: asterixdb Updated Branches: refs/heads/master 0d52ae1b9 -> ce39cc777
Allow spaces in sample script folder for Windows Change-Id: I74da9e032ccf9d5f13f6352b6f5d48650b9ab63b Reviewed-on: https://asterix-gerrit.ics.uci.edu/1545 Sonar-Qube: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Tested-by: Jenkins <jenk...@fulliautomatix.ics.uci.edu> BAD: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Reviewed-by: Michael Blow <mb...@apache.org> Integration-Tests: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/ce39cc77 Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/ce39cc77 Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/ce39cc77 Branch: refs/heads/master Commit: ce39cc7775fa9e1c61fd169337b97d7ece284699 Parents: 0d52ae1 Author: Ian Maxon <ima...@apache.org> Authored: Tue Mar 7 11:19:37 2017 -0800 Committer: Ian Maxon <ima...@apache.org> Committed: Tue Mar 7 16:15:46 2017 -0800 ---------------------------------------------------------------------- .../main/opt/local/bin/start-sample-cluster.bat | 26 ++++++++++---------- .../main/opt/local/bin/stop-sample-cluster.bat | 9 ++++--- 2 files changed, 18 insertions(+), 17 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ce39cc77/asterixdb/asterix-server/src/main/opt/local/bin/start-sample-cluster.bat ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-server/src/main/opt/local/bin/start-sample-cluster.bat b/asterixdb/asterix-server/src/main/opt/local/bin/start-sample-cluster.bat index 74ca87e..fce27a9 100644 --- a/asterixdb/asterix-server/src/main/opt/local/bin/start-sample-cluster.bat +++ b/asterixdb/asterix-server/src/main/opt/local/bin/start-sample-cluster.bat @@ -64,17 +64,17 @@ echo CLUSTERDIR=%CLUSTERDIR% echo INSTALLDIR=%INSTALLDIR% echo LOGSDIR=%LOGSDIR% echo. -cd %CLUSTERDIR% -if NOT EXIST %LOGSDIR% ( - mkdir %LOGSDIR% +cd "%CLUSTERDIR%" +if NOT EXIST "%LOGSDIR%" ( + mkdir "%LOGSDIR%" ) -call %INSTALLDIR%\bin\${HELPER_COMMAND} get_cluster_state -quiet +call "%INSTALLDIR%\bin\${HELPER_COMMAND}" get_cluster_state -quiet IF %ERRORLEVEL% EQU 0 ( echo ERROR: sample cluster address [localhost:${LISTEN_PORT}] already in use goto :ERROR ) -set tempfile="%TEMP%\start-sample-cluster-%random%" +set tempfile=%TEMP%\start-sample-cluster-%random% wmic process where ^ "name='java.exe' and CommandLine like '%%org.codehaus.mojo.appassembler.booter.AppassemblerBooter%%' and (CommandLine like '%%app.name=\"%%[cn]c\"%%' or CommandLine like '%%app.name=\"%%ncservice\"%%')" ^ @@ -102,24 +102,24 @@ if "%found%" == "1" ( goto :post_timestamp :timestamp -if "%1" == "" exit /B 0 echo "--------------------------" >> %1 echo "%date% %time%" >> %1 echo "--------------------------" >> %1 -shift -goto :timestamp +exit /B 0 :post_timestamp echo Starting sample cluster... -call :timestamp %LOGSDIR%\blue-service.log %LOGSDIR%\red-service.log %LOGSDIR%\cc.log +call :timestamp "%LOGSDIR%\blue-service.log" +call :timestamp "%LOGSDIR%\red-service.log" +call :timestamp "%LOGSDIR%\cc.log" -start /MIN "blue-nc" cmd /c "echo See output in %LOGSDIR%\blue-service.log && %INSTALLDIR%\bin\${NC_SERVICE_COMMAND} -logdir - -config-file %CLUSTERDIR%\conf\blue.conf >> %LOGSDIR%\blue-service.log 2>&1" -start /MIN "red-nc" cmd /c "echo See output in %LOGSDIR%\red-service.log && %INSTALLDIR%\bin\${NC_SERVICE_COMMAND} -logdir - >> %LOGSDIR%\red-service.log 2>&1" -start /MIN "cc" cmd /c "echo See output in %LOGSDIR%\cc.log && %INSTALLDIR%\bin\${CC_COMMAND} -config-file %CLUSTERDIR%\conf\cc.conf >>%LOGSDIR%\cc.log 2>&1" +start /MIN "blue-nc" cmd /c "echo See output in %LOGSDIR%\blue-service.log && "%INSTALLDIR%\bin\${NC_SERVICE_COMMAND}" -logdir - -config-file "%CLUSTERDIR%\conf\blue.conf" >> "%LOGSDIR%\blue-service.log" 2>&1" +start /MIN "red-nc" cmd /c "echo See output in %LOGSDIR%\red-service.log && "%INSTALLDIR%\bin\${NC_SERVICE_COMMAND}" -logdir - >> "%LOGSDIR%\red-service.log" 2>&1" +start /MIN "cc" cmd /c "echo See output in %LOGSDIR%\cc.log && "%INSTALLDIR%\bin\${CC_COMMAND}" -config-file "%CLUSTERDIR%\conf\cc.conf" >>"%LOGSDIR%\cc.log" 2>&1" echo. -call %INSTALLDIR%\bin\${HELPER_COMMAND} wait_for_cluster -timeout 30 +call "%INSTALLDIR%\bin\${HELPER_COMMAND}" wait_for_cluster -timeout 30 if %ERRORLEVEL% EQU 0 ( goto :END ) http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ce39cc77/asterixdb/asterix-server/src/main/opt/local/bin/stop-sample-cluster.bat ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-server/src/main/opt/local/bin/stop-sample-cluster.bat b/asterixdb/asterix-server/src/main/opt/local/bin/stop-sample-cluster.bat index 6b02174..d71c3b4 100644 --- a/asterixdb/asterix-server/src/main/opt/local/bin/stop-sample-cluster.bat +++ b/asterixdb/asterix-server/src/main/opt/local/bin/stop-sample-cluster.bat @@ -23,7 +23,7 @@ goto opts :usage echo. -echo Usage: %~nx0 [-f[orce]] +echo Usage: %~nx0 [-f[orce]]: echo. echo -f[orce] : Forcibly terminates any running ${PRODUCT} processes (after shutting down cluster, if running) exit /B 0 @@ -67,13 +67,13 @@ set INSTALLDIR=%cd% set tempfile="%TEMP%\stop-sample-cluster-%random%" -call %INSTALLDIR%\bin\${HELPER_COMMAND} get_cluster_state -quiet +call "%INSTALLDIR%\bin\${HELPER_COMMAND}" get_cluster_state -quiet if %ERRORLEVEL% EQU 1 ( echo WARNING: sample cluster does not appear to be running goto :post_shutdown ) -call %INSTALLDIR%\bin\${HELPER_COMMAND} shutdown_cluster_all -echo INFO: Waiting up for cluster to shutdown... +call "%INSTALLDIR%\bin\${HELPER_COMMAND}" shutdown_cluster_all +echo INFO: Waiting for cluster to shutdown... set tries=0 :wait_loop @@ -122,3 +122,4 @@ exit /B 1 :END popd +