Repository: falcon Updated Branches: refs/heads/master dca46a916 -> 3abefccf5
FALCON-2038 When all Optional input instances are missing, partition should not be suffixed. Updated code and UT. Author: Pallavi Rao <[email protected]> Reviewers: @PraveenAdlakha, @sandeepSamudrala, @peeyushb Closes #191 from pallavi-rao/2038 Project: http://git-wip-us.apache.org/repos/asf/falcon/repo Commit: http://git-wip-us.apache.org/repos/asf/falcon/commit/3abefccf Tree: http://git-wip-us.apache.org/repos/asf/falcon/tree/3abefccf Diff: http://git-wip-us.apache.org/repos/asf/falcon/diff/3abefccf Branch: refs/heads/master Commit: 3abefccf5d311e885051cf7abc6592c19af1b67d Parents: dca46a9 Author: Pallavi Rao <[email protected]> Authored: Tue Jun 21 10:27:56 2016 +0530 Committer: Pallavi Rao <[email protected]> Committed: Tue Jun 21 10:27:56 2016 +0530 ---------------------------------------------------------------------- .../main/java/org/apache/oozie/extensions/OozieELExtensions.java | 2 +- .../java/org/apache/oozie/extensions/TestOozieELExtensions.java | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/falcon/blob/3abefccf/oozie-el-extensions/src/main/java/org/apache/oozie/extensions/OozieELExtensions.java ---------------------------------------------------------------------- diff --git a/oozie-el-extensions/src/main/java/org/apache/oozie/extensions/OozieELExtensions.java b/oozie-el-extensions/src/main/java/org/apache/oozie/extensions/OozieELExtensions.java index a6ff487..f0cb7cd 100644 --- a/oozie-el-extensions/src/main/java/org/apache/oozie/extensions/OozieELExtensions.java +++ b/oozie-el-extensions/src/main/java/org/apache/oozie/extensions/OozieELExtensions.java @@ -100,7 +100,7 @@ public final class OozieELExtensions { String emptyDir = (String) eval.getVariable(dataInName + ".empty-dir"); XLog.getLog(OozieELExtensions.class).debug("No instances could be resolved. Passing empty dir : " + emptyDir); - uristr = emptyDir; + return emptyDir; } } catch (Exception e) { throw new RuntimeException("Failed to resolve instance range for " + dataInName, e); http://git-wip-us.apache.org/repos/asf/falcon/blob/3abefccf/oozie-el-extensions/src/test/java/org/apache/oozie/extensions/TestOozieELExtensions.java ---------------------------------------------------------------------- diff --git a/oozie-el-extensions/src/test/java/org/apache/oozie/extensions/TestOozieELExtensions.java b/oozie-el-extensions/src/test/java/org/apache/oozie/extensions/TestOozieELExtensions.java index b9bf594..2be8603 100644 --- a/oozie-el-extensions/src/test/java/org/apache/oozie/extensions/TestOozieELExtensions.java +++ b/oozie-el-extensions/src/test/java/org/apache/oozie/extensions/TestOozieELExtensions.java @@ -168,6 +168,8 @@ public class TestOozieELExtensions { "*/US", "_DONE", }, // With availability flag. All instances missing {"hdfs://localhost:8020/projects/falcon/staging/EMPTY_DIR_DONT_DELETE", "null", "_FINISH"}, + // With availability flag and partitions. All instances missing + {"hdfs://localhost:8020/projects/falcon/staging/EMPTY_DIR_DONT_DELETE", "*", "_FINISH"}, // No availability flag. One instance missing {"hdfs://localhost:8020/clicks/2009/09/02/09", "null", ""}, // With availability flag. One instance missing.
