Repository: storm
Updated Branches:
  refs/heads/STORM-651 [created] 670936152


STORM-651: Rename "ui" service to "storm ui" and temp.txt should be in TEMP 
folder.Add jdk and jres bin and libs dirs to lib path.


Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/db1182d7
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/db1182d7
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/db1182d7

Branch: refs/heads/STORM-651
Commit: db1182d753a6cc911a220d2891c8efd2f093d77c
Parents: 8036109
Author: Parth Brahmbhatt <[email protected]>
Authored: Fri Oct 17 11:11:03 2014 -0700
Committer: Parth Brahmbhatt <[email protected]>
Committed: Tue Feb 10 14:07:31 2015 -0800

----------------------------------------------------------------------
 bin/storm-config.cmd | 14 +++++++-------
 bin/storm.cmd        | 33 ++++++++++++++++++++++-----------
 2 files changed, 29 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/db1182d7/bin/storm-config.cmd
----------------------------------------------------------------------
diff --git a/bin/storm-config.cmd b/bin/storm-config.cmd
index 5203241..e185495 100644
--- a/bin/storm-config.cmd
+++ b/bin/storm-config.cmd
@@ -86,13 +86,13 @@ if not defined STORM_LOG_DIR (
 @rem retrieve storm.logback.conf.dir from conf file
 @rem
 
-"%JAVA%" -client -Dstorm.options= -Dstorm.conf.file= -cp "%CLASSPATH%" 
backtype.storm.command.config_value storm.logback.conf.dir > temp.txt
+"%JAVA%" -client -Dstorm.options= -Dstorm.conf.file= -cp "%CLASSPATH%" 
backtype.storm.command.config_value storm.logback.conf.dir > %CMD_TEMP_FILE%
   
-FOR /F "delims=" %%i in (temp.txt) do (
+FOR /F "delims=" %%i in (%CMD_TEMP_FILE%) do (
        FOR /F "tokens=1,* delims= " %%a in ("%%i") do (
                if %%a == VALUE: (
                        set STORM_LOGBACK_CONFIGURATION_DIR=%%b
-                       del /F temp.txt)
+                       del /F %CMD_TEMP_FILE%)
                )
        )
 )              
@@ -113,9 +113,9 @@ if not defined STORM_LOGBACK_CONFIGURATION_FILE (
   set STORM_LOGBACK_CONFIGURATION_FILE=%STORM_HOME%\logback\cluster.xml
 )
 
-"%JAVA%" -client -Dstorm.options= -Dstorm.conf.file= -cp "%CLASSPATH%" 
backtype.storm.command.config_value java.library.path > temp.txt
+"%JAVA%" -client -Dstorm.options= -Dstorm.conf.file= -cp "%CLASSPATH%" 
backtype.storm.command.config_value java.library.path > %CMD_TEMP_FILE%
 
-FOR /F "delims=" %%i in (temp.txt) do (
+FOR /F "delims=" %%i in (%CMD_TEMP_FILE%) do (
     FOR /F "tokens=1,* delims= " %%a in ("%%i") do (
         if %%a == VALUE: (
           set JAVA_LIBRARY_PATH=%%b
@@ -125,10 +125,10 @@ FOR /F "delims=" %%i in (temp.txt) do (
 
 
 :storm_opts
- set STORM_OPTS=-Dstorm.options= -Dstorm.home=%STORM_HOME% 
-Djava.library.path=%JAVA_LIBRARY_PATH%
+ set STORM_OPTS=-Dstorm.options= -Dstorm.home=%STORM_HOME% 
-Djava.library.path=%JAVA_LIBRARY_PATH%;%JAVA_HOME%\bin;%JAVA_HOME%\lib;%JAVA_HOME%\jre\bin;%JAVA_HOME%\jre\lib
  set STORM_OPTS=%STORM_OPTS% 
-Dlogback.configurationFile=%STORM_LOGBACK_CONFIGURATION_FILE%
  set STORM_OPTS=%STORM_OPTS% -Dstorm.log.dir=%STORM_LOG_DIR%
- del /F temp.txt
+ del /F %CMD_TEMP_FILE%
 
 
 if not defined STORM_SERVER_OPTS (

http://git-wip-us.apache.org/repos/asf/storm/blob/db1182d7/bin/storm.cmd
----------------------------------------------------------------------
diff --git a/bin/storm.cmd b/bin/storm.cmd
index d9c28f6..3f1804d 100644
--- a/bin/storm.cmd
+++ b/bin/storm.cmd
@@ -114,8 +114,8 @@
 
 :drpc
   set CLASS=backtype.storm.daemon.drpc
-  "%JAVA%" -client -Dstorm.options= -Dstorm.conf.file= -cp "%CLASSPATH%" 
backtype.storm.command.config_value drpc.childopts > temp.txt
-  FOR /F "delims=" %%i in (temp.txt) do (
+  "%JAVA%" -client -Dstorm.options= -Dstorm.conf.file= -cp "%CLASSPATH%" 
backtype.storm.command.config_value drpc.childopts > %CMD_TEMP_FILE%
+  FOR /F "delims=" %%i in (%CMD_TEMP_FILE%) do (
      FOR /F "tokens=1,* delims= " %%a in ("%%i") do (
          if %%a == VALUE: (
           set CHILDOPTS=%%b
@@ -140,8 +140,8 @@
 
 :logviewer
   set CLASS=backtype.storm.daemon.logviewer
-   "%JAVA%" -client -Dstorm.options= -Dstorm.conf.file= -cp "%CLASSPATH%" 
backtype.storm.command.config_value logviewer.childopts > temp.txt
-  FOR /F "delims=" %%i in (temp.txt) do (
+   "%JAVA%" -client -Dstorm.options= -Dstorm.conf.file= -cp "%CLASSPATH%" 
backtype.storm.command.config_value logviewer.childopts > %CMD_TEMP_FILE%
+  FOR /F "delims=" %%i in (%CMD_TEMP_FILE%) do (
      FOR /F "tokens=1,* delims= " %%a in ("%%i") do (
          if %%a == VALUE: (
           set CHILDOPTS=%%b
@@ -152,8 +152,8 @@
 
 :nimbus
   set CLASS=backtype.storm.daemon.nimbus
-  "%JAVA%" -client -Dstorm.options= -Dstorm.conf.file= -cp "%CLASSPATH%" 
backtype.storm.command.config_value nimbus.childopts > temp.txt
-  FOR /F "delims=" %%i in (temp.txt) do (
+  "%JAVA%" -client -Dstorm.options= -Dstorm.conf.file= -cp "%CLASSPATH%" 
backtype.storm.command.config_value nimbus.childopts > %CMD_TEMP_FILE%
+  FOR /F "delims=" %%i in (%CMD_TEMP_FILE%) do (
      FOR /F "tokens=1,* delims= " %%a in ("%%i") do (
          if %%a == VALUE: (
           set CHILDOPTS=%%b
@@ -184,8 +184,8 @@
   
 :supervisor
   set CLASS=backtype.storm.daemon.supervisor
-  "%JAVA%" -client -Dstorm.options= -Dstorm.conf.file= -cp "%CLASSPATH%" 
backtype.storm.command.config_value supervisor.childopts > temp.txt
-  FOR /F "delims=" %%i in (temp.txt) do (
+  "%JAVA%" -client -Dstorm.options= -Dstorm.conf.file= -cp "%CLASSPATH%" 
backtype.storm.command.config_value supervisor.childopts > %CMD_TEMP_FILE%
+  FOR /F "delims=" %%i in (%CMD_TEMP_FILE%) do (
      FOR /F "tokens=1,* delims= " %%a in ("%%i") do (
          if %%a == VALUE: (
           set CHILDOPTS=%%b
@@ -197,8 +197,8 @@
 :ui
   set CLASS=backtype.storm.ui.core
   set CLASSPATH=%CLASSPATH%;%STORM_HOME%
-  "%JAVA%" -client -Dstorm.options= -Dstorm.conf.file= -cp "%CLASSPATH%" 
backtype.storm.command.config_value ui.childopts > temp.txt
-  FOR /F "delims=" %%i in (temp.txt) do (
+  "%JAVA%" -client -Dstorm.options= -Dstorm.conf.file= -cp "%CLASSPATH%" 
backtype.storm.command.config_value ui.childopts > %CMD_TEMP_FILE%
+  FOR /F "delims=" %%i in (%CMD_TEMP_FILE%) do (
      FOR /F "tokens=1,* delims= " %%a in ("%%i") do (
          if %%a == VALUE: (
           set CHILDOPTS=%%b
@@ -212,6 +212,17 @@
   set STORM_OPTS=%STORM_CLIENT_OPTS% %STORM_OPTS%
   goto :eof
 
+:makeServiceXml
+  set arguments=%*
+  @echo ^<service^>
+  @echo   ^<id^>storm_%storm-command%^</id^>
+  @echo   ^<name^>storm_%storm-command%^</name^>
+  @echo   ^<description^>This service runs Storm 
%storm-command%^</description^>
+  @echo   ^<executable^>%JAVA%^</executable^>
+  @echo   ^<arguments^>%arguments%^</arguments^>
+  @echo ^</service^>
+  goto :eof
+
 :make_command_arguments
   if "%2" == "" goto :eof
   set _count=0
@@ -231,7 +242,7 @@
   
 :set_childopts
   set STORM_OPTS=%STORM_SERVER_OPTS% %STORM_OPTS% %CHILDOPTS%
-  del /F temp.txt
+  del /F %CMD_TEMP_FILE%
   goto :eof
 
 :print_usage

Reply via email to