Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 5F38F200D2E for ; Tue, 26 Sep 2017 07:19:58 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 5D9C01609EE; Tue, 26 Sep 2017 05:19:58 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id A693A1609EF for ; Tue, 26 Sep 2017 07:19:57 +0200 (CEST) Received: (qmail 78304 invoked by uid 500); 26 Sep 2017 05:19:56 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 76518 invoked by uid 99); 26 Sep 2017 05:19:54 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Sep 2017 05:19:54 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 5C156F5B51; Tue, 26 Sep 2017 05:19:52 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jluniya@apache.org To: commits@ambari.apache.org Date: Tue, 26 Sep 2017 05:20:02 -0000 Message-Id: <8e94387212f940b098f737eb06b51a7d@git.apache.org> In-Reply-To: <4212965aea334cb693fcda96bee147f2@git.apache.org> References: <4212965aea334cb693fcda96bee147f2@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [11/50] [abbrv] ambari git commit: AMBARI-22022. NullPointerException in ActionScheduler when using DEPENDENCY_ORDERED execution (magyari_sandor) archived-at: Tue, 26 Sep 2017 05:19:58 -0000 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 Authored: Thu Sep 21 14:35:51 2017 +0200 Committer: Sandor Magyari 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 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; + } } }