[ 
https://issues.apache.org/jira/browse/OOZIE-1560?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Kanter updated OOZIE-1560:
---------------------------------

    Attachment: OOZIE-1560.patch

To put the server in the log messages consistently, I had to use an env var and 
put that in the oozie-log4j.properties directly.  After discussing offline with 
Alejandro, we decided that it would be best to add a new {{OOZIE_INSTANCE_ID}} 
env var for this, and remove the {{oozie.zookeeper.oozie.id}} config property.  

The patch adds the new env var, updates the log4j config, and replaces using 
the {{oozie.zookeeper.oozie.id}} with the {{OOZIE_INSTANCE_ID}} env var.  It 
also updates the documentation.  The default value of {{OOZIE_INSTANCE_ID}} is 
{{OOZIE_HTTP_HOSTNAME}}.

I verified that everything still works, including the log streaming, with a 
single Oozie and with a group of Oozies in HA.  

> Log messages should have a way of identifying which server they came from 
> when using HA
> ---------------------------------------------------------------------------------------
>
>                 Key: OOZIE-1560
>                 URL: https://issues.apache.org/jira/browse/OOZIE-1560
>             Project: Oozie
>          Issue Type: Improvement
>          Components: HA
>    Affects Versions: trunk
>            Reporter: Robert Kanter
>            Assignee: Robert Kanter
>         Attachments: OOZIE-1560.patch
>
>
> When using HA, the only way to know which server is processing a specific job 
> is to go into each server's log file and look for log messages about that 
> job; when looking at the logs from the API, there is no way to know.  
> This information can be useful, so it would be good to add the server name as 
> part of the log message.  This can either be done for logs permanently or can 
> be done when a server is aggregating/collating logs from the other servers.  
> The former is probably more efficient than the latter.  If we go with the 
> former, I'd say that we should always do it, regardless of HA so the log 
> formatting is consistent and in case that server is added to an HA group 
> later.
> For example, instead of this:
> {noformat}
> 2013-09-29 16:46:20,182 WARN org.apache.oozie.command.wf.ActionStartXCommand: 
> USER[root] GROUP[-] TOKEN[] APP[demo-wf] 
> JOB[0000000-130925230553293-oozie-oozi-W] 
> ACTION[0000000-130925230553293-oozie-oozi-W@streaming-node] 
> [***0000000-130925230553293-oozie-oozi-W@streaming-node***]Action 
> status=RUNNING
> {noformat}
> we can have this:
> {noformat}
> 2013-09-29 16:46:20,182 WARN org.apache.oozie.command.wf.ActionStartXCommand: 
> USER[root] GROUP[-] SERVER[oozieA] TOKEN[] APP[demo-wf] 
> JOB[0000000-130925230553293-oozie-oozi-W] 
> ACTION[0000000-130925230553293-oozie-oozi-W@streaming-node] 
> [***0000000-130925230553293-oozie-oozi-W@streaming-node***]Action 
> status=RUNNING
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to