[ 
https://issues.apache.org/jira/browse/STORM-248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14249851#comment-14249851
 ] 

Frantz Mazoyer commented on STORM-248:
--------------------------------------

Thanks a lot for answering my question and for your comments :-)

So this is my understanding of the behaviour of storm.py :
{code}
  storm nimbus|supervisor|...
{code}
will eventually run :
{code}
  java ... -Dlogback.configurationFile=<path>/cluster.xml ...
{code}
As far as the daemons (nimbus, supervisor...) are concerned, this {code} 
-Dlogback.configurationFile {code} is 'opaquely' passed on to the JVM and 
processed by the logback library directly.
The supervisor process itself is no exception to the rule, except that 
supervisor.clj forks the worker daemons, with the following parameter:
{code}
(str "-Dlogback.configurationFile=" storm-home file-path-separator "logback" 
file-path-separator "worker.xml")
{code}
If we keep the same mechanism, we have to somehow provide the path to the 
logback configuration directory (that would be the same as the one where 
cluster.xml is, that's right).

In any case, I guess we will agree on the fact that:
  - We need to get the storm.logback.conf.dir from storm.yaml in storm.py, 
let's call it {code} get_logback_conf_dir() {code}
  - For each daemon, we can pass on to the JVM: {code} 
"-Dlogback.configurationFile=" + get_logback_conf_dir() + "/cluster.xml" {code}

Now we may disagree on that :-):
   - For the supervisor daemon, pass on to the JVM: 
   {code}  
   "-Dstorm.logback.conf.dir=" + get_logback_conf_dir(),
   "-Dlogback.configurationFile=" + get_logback_conf_dir() + "/cluster.xml"
   {code}
  - In launch-worker in supervisor.clj, add the following lines:
   {code}
          ...
          (let ...
              storm-logback-conf-dir (or (System/getProperty 
"storm.logback.conf.dir") (str storm-home file-path-separator "logback"))
          ...
          command (concat ...
          ...
              (str "-Dlogback.configurationFile=" storm-logback-conf-dir 
file-path-separator "worker.xml")
          ...
    {code}

Hope I'm not leaving anything out.

What do you reckon ?
Thanks a lot for your time :-)

> cluster.xml location is hardcoded for workers.
> ----------------------------------------------
>
>                 Key: STORM-248
>                 URL: https://issues.apache.org/jira/browse/STORM-248
>             Project: Apache Storm
>          Issue Type: Bug
>            Reporter: Edward Goslin
>            Assignee: Frantz Mazoyer
>            Priority: Trivial
>
> when the supervisor spawns a worker process, it assumes the cluster.xml is in
> -Dlogback.configurationFile=" storm-home "/logback/cluster.xml"
> It should take the VM arguement for the supervisor and pass it down to the 
> worker.
> System.get("logback.configurationFile", storm-home + "/logback/cluster.xml)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to