Repository: falcon Updated Branches: refs/heads/master ac8b7aaa9 -> e9e4ba4b6
FALCON-1024 Updating tags and pipeline elements of the feed/process definition resubmits a new Oozie bundle. Contributed by Pallavi Rao Project: http://git-wip-us.apache.org/repos/asf/falcon/repo Commit: http://git-wip-us.apache.org/repos/asf/falcon/commit/e9e4ba4b Tree: http://git-wip-us.apache.org/repos/asf/falcon/tree/e9e4ba4b Diff: http://git-wip-us.apache.org/repos/asf/falcon/diff/e9e4ba4b Branch: refs/heads/master Commit: e9e4ba4b683064b4044accc133f9a4c92400c8bf Parents: ac8b7aa Author: Suhas Vasu <[email protected]> Authored: Thu Mar 5 17:25:55 2015 +0530 Committer: Suhas Vasu <[email protected]> Committed: Thu Mar 5 17:25:55 2015 +0530 ---------------------------------------------------------------------- CHANGES.txt | 3 +++ .../main/java/org/apache/falcon/update/UpdateHelper.java | 5 +++-- .../java/org/apache/falcon/update/UpdateHelperTest.java | 10 ++++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/falcon/blob/e9e4ba4b/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index 0de4226..453e44c 100755 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,9 @@ Trunk (Unreleased) FALCON-949 Force update feature (pavan kumar kolamuri via Suhas Vasu) IMPROVEMENTS + FALCON-1024 Updating tags and pipeline elements of the feed/process definition + resubmits a new Oozie bundle (Pallavi Rao via Suhas Vasu) + FALCON-555 API response from instance "params" having multiple "entry" key (Pallavi Rao via Suhas Vasu) http://git-wip-us.apache.org/repos/asf/falcon/blob/e9e4ba4b/common/src/main/java/org/apache/falcon/update/UpdateHelper.java ---------------------------------------------------------------------- diff --git a/common/src/main/java/org/apache/falcon/update/UpdateHelper.java b/common/src/main/java/org/apache/falcon/update/UpdateHelper.java index d0af011..54d799c 100644 --- a/common/src/main/java/org/apache/falcon/update/UpdateHelper.java +++ b/common/src/main/java/org/apache/falcon/update/UpdateHelper.java @@ -42,13 +42,14 @@ public final class UpdateHelper { private static final Logger LOG = LoggerFactory.getLogger(UpdateHelper.class); private static final String[] FEED_FIELDS = new String[]{"partitions", "groups", "lateArrival.cutOff", - "schema.location", "schema.provider", + "schema.location", "schema.provider", "tags", "group", "owner", "permission", }; private static final String[] PROCESS_FIELDS = new String[]{"retry.policy", "retry.delay", "retry.attempts", "lateProcess.policy", "lateProcess.delay", "lateProcess.lateInputs[\\d+].input", "lateProcess.lateInputs[\\d+].workflowPath", - "owner", "group", "permission", }; + "owner", "group", "permission", "tags", + "pipelines", }; private UpdateHelper() {} http://git-wip-us.apache.org/repos/asf/falcon/blob/e9e4ba4b/common/src/test/java/org/apache/falcon/update/UpdateHelperTest.java ---------------------------------------------------------------------- diff --git a/common/src/test/java/org/apache/falcon/update/UpdateHelperTest.java b/common/src/test/java/org/apache/falcon/update/UpdateHelperTest.java index 73791d3..716552d 100644 --- a/common/src/test/java/org/apache/falcon/update/UpdateHelperTest.java +++ b/common/src/test/java/org/apache/falcon/update/UpdateHelperTest.java @@ -101,6 +101,10 @@ public class UpdateHelperTest extends AbstractTestBase { Path feedPath = EntityUtil.getNewStagingPath(clusterEntity, oldFeed); Assert.assertFalse(UpdateHelper.isEntityUpdated(oldFeed, newFeed, cluster, feedPath)); + //Add tags and ensure isEntityUpdated returns false + newFeed.setTags("category=test"); + Assert.assertFalse(UpdateHelper.isEntityUpdated(oldFeed, newFeed, cluster, feedPath)); + newFeed.setGroups("newgroups"); Assert.assertFalse(UpdateHelper.isEntityUpdated(oldFeed, newFeed, cluster, feedPath)); newFeed.getLateArrival().setCutOff(Frequency.fromString("hours(8)")); @@ -130,6 +134,12 @@ public class UpdateHelperTest extends AbstractTestBase { newProcess.getClusters().getClusters().add(procCluster); Assert.assertFalse(UpdateHelper.isEntityUpdated(oldProcess, newProcess, cluster, procPath)); + //change pipelines and ensure it doesn't cause an update + oldProcess.setPipelines("test"); + newProcess.setPipelines("newTest"); + newProcess.setTags("category=test"); + Assert.assertFalse(UpdateHelper.isEntityUpdated(oldProcess, newProcess, cluster, procPath)); + //In the case of incomplete update, where new entity is scheduled but still not updated in config store, //another update call shouldn't cause update in workflow engine newProcess.setFrequency(Frequency.fromString("days(1)"));
