ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smoha...@apache.org
Subject ambari git commit: AMBARI-11117. Slider View defaults to 0 for instance count of all components (Gour Saha via smohanty)
Date Wed, 13 May 2015 22:46:25 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 1db9471e7 -> 162709a82


AMBARI-11117. Slider View defaults to 0 for instance count of all components (Gour Saha via
smohanty)


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

Branch: refs/heads/trunk
Commit: 162709a825dc6184b8d2125f6dd3d1515be36f32
Parents: 1db9471
Author: Sumit Mohanty <smohanty@hortonworks.com>
Authored: Wed May 13 15:46:15 2015 -0700
Committer: Sumit Mohanty <smohanty@hortonworks.com>
Committed: Wed May 13 15:46:15 2015 -0700

----------------------------------------------------------------------
 .../apache/ambari/view/slider/SliderAppsViewControllerImpl.java  | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/162709a8/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
index 0a540d2..5a8259f 100644
--- a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
+++ b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
@@ -1008,6 +1008,10 @@ public class SliderAppsViewControllerImpl implements SliderAppsViewController
{
             JsonElement componentJson = resourcesObj.get(component.getName());
             if (componentJson != null && componentJson.isJsonObject()) {
               JsonObject componentObj = componentJson.getAsJsonObject();
+              if (componentObj.has("yarn.component.instances")) {
+                component.setInstanceCount(Integer.parseInt(componentObj.get(
+                    "yarn.component.instances").getAsString()));
+              }
               if (componentObj.has("yarn.role.priority")) {
                 component.setPriority(Integer.parseInt(componentObj.get("yarn.role.priority").getAsString()));
               }


Mime
View raw message