Skip to content

Commit

Permalink
[FLINK-1405] [windows] Fix Windows scripts (flink.bat and start-local…
Browse files Browse the repository at this point in the history
….bat)

- Fix for paths with blank characters
- Fix for single entry wildcard classpaths (http:https://bugs.java.com, bugID: 7146578)
  • Loading branch information
fhueske committed Jan 15, 2015
1 parent 9fea951 commit 5634ee2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions flink-dist/src/main/flink-bin/bin/flink.bat
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
setlocal

SET bin=%~dp0
SET NEPHELE_ROOT_DIR=%bin%..
SET NEPHELE_LIB_DIR=%NEPHELE_ROOT_DIR%\lib
SET FLINK_ROOT_DIR=%bin%..
SET FLINK_LIB_DIR=%FLINK_ROOT_DIR%\lib

SET JVM_ARGS=-Xmx512m

SET NEPHELE_JM_CLASSPATH=%NEPHELE_LIB_DIR%\*
SET FLINK_JM_CLASSPATH=%FLINK_LIB_DIR%\*

java %JVM_ARGS% -cp "%NEPHELE_JM_CLASSPATH%" org.apache.flink.client.CliFrontend %*
java %JVM_ARGS% -cp "%FLINK_JM_CLASSPATH%"; org.apache.flink.client.CliFrontend %*

endlocal
6 changes: 3 additions & 3 deletions flink-dist/src/main/flink-bin/bin/start-local.bat
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ SET logname=flink-%username%-jobmanager-%computername%.log
SET log=%FLINK_LOG_DIR%\%logname%
SET outname=flink-%username%-jobmanager-%computername%.out
SET out=%FLINK_LOG_DIR%\%outname%
SET log_setting=-Dlog.file=%log% -Dlogback.configurationFile=file:%FLINK_CONF_DIR%/logback.xml -Dlog4j.configuration=file:%FLINK_CONF_DIR%/log4j.properties
SET log_setting=-Dlog.file="%log%" -Dlogback.configurationFile=file:"%FLINK_CONF_DIR%/logback.xml" -Dlog4j.configuration=file:"%FLINK_CONF_DIR%/log4j.properties"


:: Log rotation (quick and dirty)
CD %FLINK_LOG_DIR%
CD "%FLINK_LOG_DIR%"
for /l %%x in (5, -1, 1) do (
SET /A y = %%x+1
RENAME "%logname%.%%x" "%logname%.!y!" 2> nul
Expand All @@ -57,6 +57,6 @@ if not defined FOUND (
echo Starting Flink job manager. Webinterface by default on http:https://localhost:8081/.
echo Don't close this batch window. Stop job manager by pressing Ctrl+C.

java %JVM_ARGS% %log_setting% -cp %FLINK_JM_CLASSPATH% org.apache.flink.runtime.jobmanager.JobManager --executionMode local --configDir %FLINK_CONF_DIR% > "%out%" 2>&1
java %JVM_ARGS% %log_setting% -cp "%FLINK_JM_CLASSPATH%"; org.apache.flink.runtime.jobmanager.JobManager --executionMode local --configDir "%FLINK_CONF_DIR%" > "%out%" 2>&1

endlocal

0 comments on commit 5634ee2

Please sign in to comment.