From 80809a15bd46173415de4e07f2c8b9a266cc9d76 Mon Sep 17 00:00:00 2001 From: Murali Ramasami Date: Tue, 3 May 2016 14:27:28 +0530 Subject: [PATCH 1/3] FALCON-1930 : testProcessInstanceRerunFailedWorkflowAction failed with NULLPOINTEREXCEPTION --- .../org/apache/falcon/regression/core/util/OozieUtil.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/OozieUtil.java b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/OozieUtil.java index 4c609b3f3..a66fbc55c 100644 --- a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/OozieUtil.java +++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/OozieUtil.java @@ -4,7 +4,7 @@ * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance + * "License"); you may not use this file except in compliancegetActionStatus * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 @@ -714,7 +714,9 @@ public static String getActionStatus(OozieClient oozieClient, String workflowId, List wfAction = oozieClient.getJobInfo(workflowId).getActions(); for (WorkflowAction wf : wfAction) { if (wf.getName().contains(actionName)) { - return wf.getExternalStatus(); + if (wf.getExternalStatus() != null) { + return wf.getExternalStatus(); + } } } return ""; From 11c3f9eadd8fca0c7b398c9d41734d2a697da9c2 Mon Sep 17 00:00:00 2001 From: Murali Ramasami Date: Tue, 3 May 2016 14:28:18 +0530 Subject: [PATCH 2/3] Update OozieUtil.java --- .../java/org/apache/falcon/regression/core/util/OozieUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/OozieUtil.java b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/OozieUtil.java index a66fbc55c..9a0c85503 100644 --- a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/OozieUtil.java +++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/OozieUtil.java @@ -4,7 +4,7 @@ * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliancegetActionStatus + * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 From 7756371e7b6e843a09c8e749e7c9052bafd3a3ca Mon Sep 17 00:00:00 2001 From: Murali Ramasami Date: Tue, 3 May 2016 14:54:30 +0530 Subject: [PATCH 3/3] FALCON-1930 : Addressing review comments --- .../org/apache/falcon/regression/core/util/OozieUtil.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/OozieUtil.java b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/OozieUtil.java index 9a0c85503..1bbcf362c 100644 --- a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/OozieUtil.java +++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/OozieUtil.java @@ -713,10 +713,8 @@ public static String getActionStatus(OozieClient oozieClient, String workflowId, throws OozieClientException { List wfAction = oozieClient.getJobInfo(workflowId).getActions(); for (WorkflowAction wf : wfAction) { - if (wf.getName().contains(actionName)) { - if (wf.getExternalStatus() != null) { - return wf.getExternalStatus(); - } + if ((wf.getName().contains(actionName)) && (wf.getExternalStatus() != null)) { + return wf.getExternalStatus(); } } return "";