Andras Piros created OOZIE-2844:
-----------------------------------
Summary: Increase stability of Oozie actions when log4j.properties
is missing or not readable
Key: OOZIE-2844
URL: https://issues.apache.org/jira/browse/OOZIE-2844
Project: Oozie
Issue Type: Improvement
Components: action
Affects Versions: 4.3.0
Reporter: Andras Piros
In several Oozie actions we face the problem that if {{log4j.properties}} is
not readable by current thread, or not present on the classpath, while taking
an {{URL.openStream()}} call afterwards, an {{IOException}} is thrown and the
action won't run.
Such actions are:
*
[*{{DistcpMain}}*|https://github.com/apache/oozie/blob/master/sharelib/distcp/src/main/java/org/apache/oozie/action/hadoop/DistcpMain.java#L135]
*
[*{{HiveMain}}*|https://github.com/apache/oozie/blob/master/sharelib/hive/src/main/java/org/apache/oozie/action/hadoop/HiveMain.java#L146]
*
[*{{PigMain}}*|https://github.com/apache/oozie/blob/master/sharelib/pig/src/main/java/org/apache/oozie/action/hadoop/PigMain.java#L173]
*
[*{{PigMainWithOldApi}}*|https://github.com/apache/oozie/blob/master/sharelib/pig/src/main/java/org/apache/oozie/action/hadoop/PigMainWithOldAPI.java#L160]
*
[*{{SparkMain}}*|https://github.com/apache/oozie/blob/master/sharelib/spark/src/main/java/org/apache/oozie/action/hadoop/SparkMain.java#L430]
*
[*{{SqoopMain}}*|https://github.com/apache/oozie/blob/master/sharelib/sqoop/src/main/java/org/apache/oozie/action/hadoop/SqoopMain.java#L124]
Extend
[*{{LauncherMain.run()}}*|https://github.com/apache/oozie/blob/master/sharelib/oozie/src/main/java/org/apache/oozie/action/hadoop/LauncherMain.java#L62-L65]
by a convenience method that loads Hadoop's {{log4j.properties}} in
beforehand. In case {{URL.openStream()}} would throw {{IOException}} we resort
to a call to a new file {{hadoop-default-log4j.properties}} on the classpath
(packaged along w/ {{LauncherMain.class}}) that has the same contents as the
{{log4j.properties}} that is not accessible / readable / present.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)