-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58171/#review170968
-----------------------------------------------------------




sharelib/oozie/src/main/java/org/apache/oozie/action/hadoop/LauncherMain.java
Line 31 (original), 31 (patched)
<https://reviews.apache.org/r/58171/#comment243806>

    Please avoid "*" imports



sharelib/oozie/src/main/java/org/apache/oozie/action/hadoop/LauncherMain.java
Lines 59 (patched)
<https://reviews.apache.org/r/58171/#comment243807>

    Could you please add a comment here about what this properties actually is 
and why is it used? 
    
    Also, for me it's not evident what "auxiliary" means in this context. What 
about a name like "log4j-default.properties" ?



sharelib/oozie/src/main/resources/auxiliary-log4j.properties
Lines 1 (patched)
<https://reviews.apache.org/r/58171/#comment243808>

    Where does the contents of this file come from?


- Peter Bacsko


On ápr. 4, 2017, 10:37 de, András Piros wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58171/
> -----------------------------------------------------------
> 
> (Updated ápr. 4, 2017, 10:37 de)
> 
> 
> Review request for oozie and Peter Bacsko.
> 
> 
> Repository: oozie-git
> 
> 
> Description
> -------
> 
> 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.
> 
> 
> Diffs
> -----
> 
>   
> sharelib/distcp/src/main/java/org/apache/oozie/action/hadoop/DistcpMain.java 
> fcaadefd215368565fb126ca92515792e1f1a09b 
>   sharelib/hive/src/main/java/org/apache/oozie/action/hadoop/HiveMain.java 
> bc8ab29c25405806f40232d32254ba2a7f5271e4 
>   
> sharelib/oozie/src/main/java/org/apache/oozie/action/hadoop/LauncherMain.java 
> 7ae48e168a310b4d55feda7cbce8b2d29c2ec505 
>   sharelib/oozie/src/main/resources/auxiliary-log4j.properties PRE-CREATION 
>   
> sharelib/oozie/src/test/java/org/apache/oozie/action/hadoop/TestLauncherMain.java
>  PRE-CREATION 
>   sharelib/pig/src/main/java/org/apache/oozie/action/hadoop/PigMain.java 
> ba393eee53e92d144159f83893d4baab00737a44 
>   
> sharelib/pig/src/main/java/org/apache/oozie/action/hadoop/PigMainWithOldAPI.java
>  14ab65e7d00c426036ced3e80400c80deea0e282 
>   sharelib/spark/src/main/java/org/apache/oozie/action/hadoop/SparkMain.java 
> c24d95c88be0dbf6fe80241d887a70100a5e1b4a 
>   sharelib/sqoop/src/main/java/org/apache/oozie/action/hadoop/SqoopMain.java 
> cb8f56e9b66de0eb2799e68bc56d0ee36d4ba317 
> 
> 
> Diff: https://reviews.apache.org/r/58171/diff/1/
> 
> 
> Testing
> -------
> 
> Relevant unit tests run.
> 
> 
> Thanks,
> 
> András Piros
> 
>

Reply via email to