ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smoha...@apache.org
Subject git commit: AMBARI-7837. Slider View: time-series data for Slider Apps metrics missing on some clusters
Date Fri, 17 Oct 2014 17:41:11 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 43229ade9 -> ec6b44eca


AMBARI-7837. Slider View: time-series data for Slider Apps metrics missing on some clusters


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

Branch: refs/heads/trunk
Commit: ec6b44eca069721a68024b518c9531e31c24e6a0
Parents: 43229ad
Author: Sumit Mohanty <smohanty@hortonworks.com>
Authored: Fri Oct 17 10:39:31 2014 -0700
Committer: Sumit Mohanty <smohanty@hortonworks.com>
Committed: Fri Oct 17 10:40:50 2014 -0700

----------------------------------------------------------------------
 .../org/apache/ambari/view/slider/SliderAppsViewController.java  | 2 ++
 .../apache/ambari/view/slider/SliderAppsViewControllerImpl.java  | 4 ++--
 .../ambari/view/slider/rest/client/SliderAppMasterClient.java    | 3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/ec6b44ec/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewController.java
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewController.java
b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewController.java
index ea11bf9..2d82bfb 100644
--- a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewController.java
+++ b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewController.java
@@ -44,6 +44,8 @@ public interface SliderAppsViewController {
   public static final String PROPERTY_YARN_RM_WEBAPP_URL = "yarn.rm.webapp.url";
   public static final String PROPERTY_SLIDER_SECURITY_ENABLED = "slider.security.enabled";
 
+  public static final String METRICS_API_NAME = "Metrics API";
+
   public ViewStatus getViewStatus();
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/ec6b44ec/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 6881ad7..882a806 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
@@ -720,8 +720,8 @@ public class SliderAppsViewControllerImpl implements SliderAppsViewController
{
           quickLinks = sliderAppClient
               .getQuickLinks(appMasterData.publisherUrl);
         }
-        if (quickLinks != null && quickLinks.containsKey("Metrics")) {
-          String metricsUrl = quickLinks.get("Metrics");
+        if (quickLinks != null && quickLinks.containsKey(METRICS_API_NAME)) {
+          String metricsUrl = quickLinks.get(METRICS_API_NAME);
           MetricsHolder metricsHolder = appMetrics.get(matchedAppType
               .uniqueName());
           app.setMetrics(sliderAppClient.getGangliaMetrics(metricsUrl,

http://git-wip-us.apache.org/repos/asf/ambari/blob/ec6b44ec/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/rest/client/SliderAppMasterClient.java
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/rest/client/SliderAppMasterClient.java
b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/rest/client/SliderAppMasterClient.java
index a96cc12..008fd87 100644
--- a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/rest/client/SliderAppMasterClient.java
+++ b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/rest/client/SliderAppMasterClient.java
@@ -36,6 +36,7 @@ import org.apache.ambari.view.slider.SliderAppType;
 import org.apache.ambari.view.slider.SliderAppTypeComponent;
 import org.apache.ambari.view.slider.TemporalInfo;
 import org.apache.commons.httpclient.HttpException;
+import org.apache.ambari.view.slider.SliderAppsViewController;
 import org.apache.log4j.Logger;
 
 import com.google.gson.JsonElement;
@@ -105,7 +106,7 @@ public class SliderAppMasterClient extends BaseHttpClient {
           } else if ("org.apache.slider.metrics.ui".equals(entry.getKey())) {
             quickLinks.put("Metrics UI", entry.getValue().getAsString());
           } else if ("org.apache.slider.metrics".equals(entry.getKey())) {
-            quickLinks.put("Metrics API", entry.getValue().getAsString());
+            quickLinks.put(SliderAppsViewController.METRICS_API_NAME, entry.getValue().getAsString());
           } else {
             quickLinks.put(entry.getKey(), entry.getValue().getAsString());
           }


Mime
View raw message