Repository: falcon Updated Branches: refs/heads/master 5dbcec155 -> 794f93087
FALCON-1409 Update API throws NullPointerException. Contributed by Sandeep Samudrala. Project: http://git-wip-us.apache.org/repos/asf/falcon/repo Commit: http://git-wip-us.apache.org/repos/asf/falcon/commit/794f9308 Tree: http://git-wip-us.apache.org/repos/asf/falcon/tree/794f9308 Diff: http://git-wip-us.apache.org/repos/asf/falcon/diff/794f9308 Branch: refs/heads/master Commit: 794f930873650fd423e99c3038f0088ac9984274 Parents: 5dbcec1 Author: Ajay Yadava <[email protected]> Authored: Thu Aug 20 14:52:09 2015 +0530 Committer: Ajay Yadava <[email protected]> Committed: Thu Aug 20 14:52:09 2015 +0530 ---------------------------------------------------------------------- CHANGES.txt | 2 ++ .../resource/proxy/SchedulableEntityManagerProxy.java | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/falcon/blob/794f9308/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index 15ee65a..2a1d0a6 100755 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -89,6 +89,8 @@ Trunk (Unreleased) (Suhas Vasu) BUG FIXES + FALCON-1409 Update API throws NullPointerException(Sandeep Samudrala via Ajay Yadava) + FALCON-1407 Temporarily disable failing tests in ClusterEntityValidationIT(Ajay Yadava) FALCON-1392 FalconUnit tests fail(Pavan Kumar Kolamuri via Ajay Yadava) http://git-wip-us.apache.org/repos/asf/falcon/blob/794f9308/prism/src/main/java/org/apache/falcon/resource/proxy/SchedulableEntityManagerProxy.java ---------------------------------------------------------------------- diff --git a/prism/src/main/java/org/apache/falcon/resource/proxy/SchedulableEntityManagerProxy.java b/prism/src/main/java/org/apache/falcon/resource/proxy/SchedulableEntityManagerProxy.java index aa7fd0c..d22e8a3 100644 --- a/prism/src/main/java/org/apache/falcon/resource/proxy/SchedulableEntityManagerProxy.java +++ b/prism/src/main/java/org/apache/falcon/resource/proxy/SchedulableEntityManagerProxy.java @@ -257,6 +257,7 @@ public class SchedulableEntityManagerProxy extends AbstractSchedulableEntityMana oldColos.removeAll(mergedColos); //Old colos where delete should be called Map<String, APIResult> results = new HashMap<String, APIResult>(); + boolean result = true; if (!oldColos.isEmpty()) { results.put(FALCON_TAG + "/delete", new EntityProxy(type, entityName) { @Override @@ -299,8 +300,14 @@ public class SchedulableEntityManagerProxy extends AbstractSchedulableEntityMana }.execute()); } + for (APIResult apiResult : results.values()) { + if (apiResult.getStatus() != APIResult.Status.SUCCEEDED) { + result = false; + } + } + // update only if all are updated - if (!embeddedMode && results.get(FALCON_TAG).getStatus() == APIResult.Status.SUCCEEDED) { + if (!embeddedMode && result) { results.put(PRISM_TAG, super.update(bufferedRequest, type, entityName, currentColo)); }
