AMBARI-9803. Ambari-server log is filled with ClusterNotFoundException (aonishuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0c332689 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0c332689 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0c332689 Branch: refs/heads/branch-2.0.0 Commit: 0c3326892a48200532dbde10c52baabd6b62d987 Parents: d052b0d Author: Andrew Onishuk <[email protected]> Authored: Wed Feb 25 23:50:08 2015 +0200 Committer: Andrew Onishuk <[email protected]> Committed: Wed Feb 25 23:50:08 2015 +0200 ---------------------------------------------------------------------- .../ambari/server/controller/internal/StageResourceProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/0c332689/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StageResourceProvider.java ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StageResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StageResourceProvider.java index 3d014b8..e55897c 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StageResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StageResourceProvider.java @@ -307,7 +307,7 @@ public class StageResourceProvider extends AbstractControllerResourceProvider im Resource resource = new ResourceImpl(Resource.Type.Stage); Long clusterId = entity.getClusterId(); - if (clusterId != null) { + if (clusterId != null && !clusterId.equals(Long.valueOf(-1L))) { try { Cluster cluster = clusters.getClusterById(clusterId);
