You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by jl...@apache.org on 2017/09/26 05:20:02 UTC

[11/50] [abbrv] ambari git commit: AMBARI-22022. NullPointerException in ActionScheduler when using DEPENDENCY_ORDERED execution (magyari_sandor)

AMBARI-22022. NullPointerException in ActionScheduler when using DEPENDENCY_ORDERED execution (magyari_sandor)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3e5f60ab
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3e5f60ab
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3e5f60ab

Branch: refs/heads/branch-feature-AMBARI-14714
Commit: 3e5f60ab9d30761df08923c4e56dd518fc71d271
Parents: 1a5b494
Author: Sandor Magyari <sm...@hortonworks.com>
Authored: Thu Sep 21 14:35:51 2017 +0200
Committer: Sandor Magyari <sm...@hortonworks.com>
Committed: Thu Sep 21 15:44:54 2017 +0200

----------------------------------------------------------------------
 .../ambari/server/actionmanager/ActionScheduler.java      | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/3e5f60ab/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java
index 00e4184..0157f8b 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java
@@ -921,12 +921,14 @@ class ActionScheduler implements Runnable {
       RoleCommandPair roleCommand = new
               RoleCommandPair(Role.valueOf(command.getRole()), command.getRoleCommand());
       Set<RoleCommandPair> roleCommandDependencies = rco.getDependencies().get(roleCommand);
-      // remove eventual references to the same RoleCommand
-      roleCommandDependencies.remove(roleCommand);
 
       // check if there are any dependencies IN_PROGRESS
-      if (roleCommandDependencies != null && CollectionUtils.containsAny(rolesCommandsInProgress, roleCommandDependencies)) {
-        areCommandDependenciesFinished = false;
+      if (roleCommandDependencies != null) {
+        // remove eventual references to the same RoleCommand
+        roleCommandDependencies.remove(roleCommand);
+        if (CollectionUtils.containsAny(rolesCommandsInProgress, roleCommandDependencies)) {
+          areCommandDependenciesFinished = false;
+        }
       }
     }