----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/52737/ -----------------------------------------------------------
(Updated okt. 15, 2016, 11:33 de) Review request for oozie, András Piros, Attila Sasvari, Peter Cseh, and Robert Kanter. Changes ------- Further changes: - no longer processing args[] is LauncherAM because they're unused - replaced FinalApplicationStatus usage, and a new enum has been introduced. Reason for the new enum: FinalAppStatus doesn't have RUNNING value. It's necessary when we submit MR jobs. So I created a new OozieActionResult which has RUNNING/SUCCEEDED/FAILED state. The responsibility of sending back "RUNNING" state was moved from LauncherAMCallbackNotifier to LauncherAM. Repository: oozie-git Description ------- This review contains a suggested approach for refactoring LauncherAM on the OYA branch. The main idea is to inject all dependencies of the class via the constructor. In some cases, this requires factory objects. Note that this is necessary because in unit tests, because we don't want to create actual resources such as UGI or async ResourceManager callback. In the tests, we can instantiate this class with mocks. The testability is greatly enhanced because various checks and verifications can be performed on the mocks. Tests are currently not in this review (see https://issues.apache.org/jira/browse/OOZIE-2685). Diffs (updated) ----- core/src/test/java/org/apache/oozie/action/hadoop/TestLauncherAM.java ed29299 core/src/test/java/org/apache/oozie/action/hadoop/TestLauncherAMCallbackNotifier.java 9ba04da sharelib/oozie/src/main/java/org/apache/oozie/action/hadoop/AMRMCallBackHandler.java PRE-CREATION sharelib/oozie/src/main/java/org/apache/oozie/action/hadoop/AMRMClientAsyncFactory.java PRE-CREATION sharelib/oozie/src/main/java/org/apache/oozie/action/hadoop/ErrorHolder.java PRE-CREATION sharelib/oozie/src/main/java/org/apache/oozie/action/hadoop/HdfsOperations.java PRE-CREATION sharelib/oozie/src/main/java/org/apache/oozie/action/hadoop/LauncherAM.java 85d78c6 sharelib/oozie/src/main/java/org/apache/oozie/action/hadoop/LauncherAMCallbackNotifier.java 23648b8 sharelib/oozie/src/main/java/org/apache/oozie/action/hadoop/LauncherAMCallbackNotifierFactory.java PRE-CREATION sharelib/oozie/src/main/java/org/apache/oozie/action/hadoop/LocalFsOperations.java PRE-CREATION sharelib/oozie/src/main/java/org/apache/oozie/action/hadoop/PrepareActionsDriver.java 4a51d48 sharelib/oozie/src/main/java/org/apache/oozie/action/hadoop/PrepareActionsHandler.java PRE-CREATION sharelib/oozie/src/main/java/org/apache/oozie/action/hadoop/SequenceFileWriterFactory.java PRE-CREATION Diff: https://reviews.apache.org/r/52737/diff/ Testing ------- Unit tests are being written right now. Thanks, Peter Bacsko
