storm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@apache.org
Subject [01/14] storm git commit: A fix for STORM-976.
Date Tue, 18 Aug 2015 15:50:19 GMT
Repository: storm
Updated Branches:
  refs/heads/master 6f37493e1 -> 3b1b3bfa5


A fix for STORM-976.


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

Branch: refs/heads/master
Commit: b737c2cceb9611ea10c99450c09fb1a4ad28ab02
Parents: d7155d7
Author: YvonneIronberg <Yvonne.Ironberg@gmail.com>
Authored: Thu Aug 13 13:24:26 2015 -0700
Committer: YvonneIronberg <Yvonne.Ironberg@gmail.com>
Committed: Thu Aug 13 13:24:26 2015 -0700

----------------------------------------------------------------------
 bin/storm-config.cmd                            |  4 ++--
 bin/storm.py                                    | 22 ++++++++++----------
 .../src/clj/backtype/storm/daemon/logviewer.clj |  2 +-
 .../clj/backtype/storm/daemon/supervisor.clj    |  8 +++----
 4 files changed, 18 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/b737c2cc/bin/storm-config.cmd
----------------------------------------------------------------------
diff --git a/bin/storm-config.cmd b/bin/storm-config.cmd
index 6794023..c0906e7 100644
--- a/bin/storm-config.cmd
+++ b/bin/storm-config.cmd
@@ -83,10 +83,10 @@ if not defined STORM_LOG_DIR (
 )
 
 @rem
-@rem retrieve storm.logback.conf.dir from conf file
+@rem retrieve storm.log4j2.conf.dir from conf file
 @rem
 
-"%JAVA%" -client -Dstorm.options= -Dstorm.conf.file= -cp "%CLASSPATH%" backtype.storm.command.config_value
storm.logback.conf.dir > %CMD_TEMP_FILE%
+"%JAVA%" -client -Dstorm.options= -Dstorm.conf.file= -cp "%CLASSPATH%" backtype.storm.command.config_value
storm.log4j2.conf.dir > %CMD_TEMP_FILE%
   
 FOR /F "delims=" %%i in (%CMD_TEMP_FILE%) do (
 	FOR /F "tokens=1,* delims= " %%a in ("%%i") do (

http://git-wip-us.apache.org/repos/asf/storm/blob/b737c2cc/bin/storm.py
----------------------------------------------------------------------
diff --git a/bin/storm.py b/bin/storm.py
index a6d08db..597426d 100755
--- a/bin/storm.py
+++ b/bin/storm.py
@@ -76,7 +76,7 @@ if (not os.path.isfile(os.path.join(USER_CONF_DIR, "storm.yaml"))):
 
 STORM_LIB_DIR = os.path.join(STORM_DIR, "lib")
 STORM_BIN_DIR = os.path.join(STORM_DIR, "bin")
-STORM_LOG4J_CONF_DIR = os.path.join(STORM_DIR, "log4j2")
+STORM_LOG4J2_CONF_DIR = os.path.join(STORM_DIR, "log4j2")
 
 init_storm_env()
 
@@ -362,12 +362,12 @@ def repl():
     cppaths = [CLUSTER_CONF_DIR]
     exec_storm_class("clojure.main", jvmtype="-client", extrajars=cppaths)
 
-def get_log4j_conf_dir():
+def get_log4j2_conf_dir():
     cppaths = [CLUSTER_CONF_DIR]
-    storm_log4j_conf_dir = confvalue("storm.logback.conf.dir", cppaths)
-    if(storm_log4j_conf_dir == None or storm_log4j_conf_dir == "nil"):
-        storm_log4j_conf_dir = STORM_LOG4J_CONF_DIR
-    return storm_log4j_conf_dir
+    storm_log4j2_conf_dir = confvalue("storm.log4j2.conf.dir", cppaths)
+    if(storm_log4j2_conf_dir == None or storm_log4j2_conf_dir == "nil"):
+        storm_log4j2_conf_dir = STORM_LOG4J2_CONF_DIR
+    return storm_log4j2_conf_dir
 
 def nimbus(klass="backtype.storm.daemon.nimbus"):
     """Syntax: [storm nimbus]
@@ -381,7 +381,7 @@ def nimbus(klass="backtype.storm.daemon.nimbus"):
     cppaths = [CLUSTER_CONF_DIR]
     jvmopts = parse_args(confvalue("nimbus.childopts", cppaths)) + [
         "-Dlogfile.name=nimbus.log",
-        "-Dlog4j.configurationFile=" + os.path.join(get_log4j_conf_dir(), "cluster.xml"),
+        "-Dlog4j.configurationFile=" + os.path.join(get_log4j2_conf_dir(), "cluster.xml"),
     ]
     exec_storm_class(
         klass,
@@ -402,7 +402,7 @@ def supervisor(klass="backtype.storm.daemon.supervisor"):
     cppaths = [CLUSTER_CONF_DIR]
     jvmopts = parse_args(confvalue("supervisor.childopts", cppaths)) + [
         "-Dlogfile.name=supervisor.log",
-        "-Dlog4j.configurationFile=" + os.path.join(get_log4j_conf_dir(), "cluster.xml"),
+        "-Dlog4j.configurationFile=" + os.path.join(get_log4j2_conf_dir(), "cluster.xml"),
     ]
     exec_storm_class(
         klass,
@@ -424,7 +424,7 @@ def ui():
     cppaths = [CLUSTER_CONF_DIR]
     jvmopts = parse_args(confvalue("ui.childopts", cppaths)) + [
         "-Dlogfile.name=ui.log",
-        "-Dlog4j.configurationFile=" + os.path.join(get_log4j_conf_dir(), "cluster.xml")
+        "-Dlog4j.configurationFile=" + os.path.join(get_log4j2_conf_dir(), "cluster.xml")
     ]
     exec_storm_class(
         "backtype.storm.ui.core",
@@ -446,7 +446,7 @@ def logviewer():
     cppaths = [CLUSTER_CONF_DIR]
     jvmopts = parse_args(confvalue("logviewer.childopts", cppaths)) + [
         "-Dlogfile.name=logviewer.log",
-        "-Dlog4j.configurationFile=" + os.path.join(get_log4j_conf_dir(), "cluster.xml")
+        "-Dlog4j.configurationFile=" + os.path.join(get_log4j2_conf_dir(), "cluster.xml")
     ]
     exec_storm_class(
         "backtype.storm.daemon.logviewer",
@@ -467,7 +467,7 @@ def drpc():
     cppaths = [CLUSTER_CONF_DIR]
     jvmopts = parse_args(confvalue("drpc.childopts", cppaths)) + [
         "-Dlogfile.name=drpc.log",
-        "-Dlog4j.configurationFile=" + os.path.join(get_log4j_conf_dir(), "cluster.xml")
+        "-Dlog4j.configurationFile=" + os.path.join(get_log4j2_conf_dir(), "cluster.xml")
     ]
     exec_storm_class(
         "backtype.storm.daemon.drpc",

http://git-wip-us.apache.org/repos/asf/storm/blob/b737c2cc/storm-core/src/clj/backtype/storm/daemon/logviewer.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/backtype/storm/daemon/logviewer.clj b/storm-core/src/clj/backtype/storm/daemon/logviewer.clj
index a981d94..6ebbbbd 100644
--- a/storm-core/src/clj/backtype/storm/daemon/logviewer.clj
+++ b/storm-core/src/clj/backtype/storm/daemon/logviewer.clj
@@ -218,7 +218,7 @@ Note that if anything goes wrong, this will throw an Error and exit."
     (if (and appender-name appender (instance? RollingFileAppender appender))
       (.getParent (File. (.getFileName appender)))
       (throw
-       (RuntimeException. "Log viewer could not find configured appender, or the appender
is not a FileAppender. Please check that the appender name configured in storm and logback
agree.")))))
+       (RuntimeException. "Log viewer could not find configured appender, or the appender
is not a FileAppender. Please check that the appender name configured in storm and log4j2
agree.")))))
 
 (defnk to-btn-link
   "Create a link that is formatted like a button"

http://git-wip-us.apache.org/repos/asf/storm/blob/b737c2cc/storm-core/src/clj/backtype/storm/daemon/supervisor.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/backtype/storm/daemon/supervisor.clj b/storm-core/src/clj/backtype/storm/daemon/supervisor.clj
index 4b6ac5d..cf0d936 100644
--- a/storm-core/src/clj/backtype/storm/daemon/supervisor.clj
+++ b/storm-core/src/clj/backtype/storm/daemon/supervisor.clj
@@ -661,8 +661,8 @@
           storm-conf-file (System/getProperty "storm.conf.file")
           storm-log-dir (or (System/getProperty "storm.log.dir") (str storm-home file-path-separator
"logs"))
           storm-conf (read-storm-config)
-          storm-log-conf-dir (storm-conf "storm.logback.conf.dir")
-          storm-logback-conf-dir (or storm-log-conf-dir (str storm-home file-path-separator
"log4j2"))
+          storm-log-conf-dir (storm-conf "storm.log4j2.conf.dir")
+          storm-log4j2-conf-dir (or storm-log-conf-dir (str storm-home file-path-separator
"log4j2"))
           stormroot (supervisor-stormdist-root conf storm-id)
           jlp (jlp stormroot conf)
           stormjar (supervisor-stormjar-path stormroot)
@@ -694,7 +694,7 @@
                      (str "-Dstorm.id=" storm-id)
                      (str "-Dworker.id=" worker-id)
                      (str "-Dworker.port=" port)
-                     (str "-Dlog4j.configurationFile=" storm-logback-conf-dir file-path-separator
"worker.xml")
+                     (str "-Dlog4j.configurationFile=" storm-log4j2-conf-dir file-path-separator
"worker.xml")
                      "backtype.storm.LogWriter"]
                     [(java-cmd) "-server"]
                     worker-childopts
@@ -707,7 +707,7 @@
                      (str "-Dstorm.options=" storm-options)
                      (str "-Dstorm.log.dir=" storm-log-dir)
                      (str "-Dlogging.sensitivity=" logging-sensitivity)
-                     (str "-Dlog4j.configurationFile=" storm-logback-conf-dir file-path-separator
"worker.xml")
+                     (str "-Dlog4j.configurationFile=" storm-log4j2-conf-dir file-path-separator
"worker.xml")
                      (str "-Dstorm.id=" storm-id)
                      (str "-Dworker.id=" worker-id)
                      (str "-Dworker.port=" port)


Mime
View raw message