----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/58171/#review171205 -----------------------------------------------------------
Ship it! Ship It! - Peter Bacsko On ápr. 5, 2017, 8:47 de, András Piros wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/58171/ > ----------------------------------------------------------- > > (Updated ápr. 5, 2017, 8:47 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 > f314bab3808c41f2576f8f64d9fdf8f34e578042 > > sharelib/oozie/src/main/java/org/apache/oozie/action/hadoop/LauncherMain.java > 7ae48e168a310b4d55feda7cbce8b2d29c2ec505 > sharelib/oozie/src/main/resources/default-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 > 88de5c4c614a5cc33c1f4760d2510928ba4b8ede > sharelib/sqoop/src/main/java/org/apache/oozie/action/hadoop/SqoopMain.java > cb8f56e9b66de0eb2799e68bc56d0ee36d4ba317 > > > Diff: https://reviews.apache.org/r/58171/diff/2/ > > > Testing > ------- > > Relevant unit tests run. > > > Thanks, > > András Piros > >
