ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlun...@apache.org
Subject [11/50] [abbrv] ambari git commit: AMBARI-22022. NullPointerException in ActionScheduler when using DEPENDENCY_ORDERED execution (magyari_sandor)
Date Tue, 26 Sep 2017 05:20:02 GMT
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 <smagyari@hortonworks.com>
Authored: Thu Sep 21 14:35:51 2017 +0200
Committer: Sandor Magyari <smagyari@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;
+        }
       }
     }
 


Mime
View raw message