You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sm...@apache.org on 2014/05/29 23:00:53 UTC

[2/2] git commit: AMBARI-5939. Slider view should report the list of ganglia metrics an app supports.

AMBARI-5939. Slider view should report the list of ganglia metrics an app supports.


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

Branch: refs/heads/branch-1.6.0.slider
Commit: 328e87666cf7f90cfe966e07be4544ae549b4c7e
Parents: 5d63d54
Author: Sumit Mohanty <sm...@hortonworks.com>
Authored: Thu May 29 14:00:34 2014 -0700
Committer: Sumit Mohanty <sm...@hortonworks.com>
Committed: Thu May 29 14:00:34 2014 -0700

----------------------------------------------------------------------
 .../apache/ambari/view/slider/rest/client/Metric.java    | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/328e8766/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/rest/client/Metric.java
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/rest/client/Metric.java b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/rest/client/Metric.java
index e92d174..c3e66b9 100644
--- a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/rest/client/Metric.java
+++ b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/rest/client/Metric.java
@@ -19,6 +19,8 @@
 package org.apache.ambari.view.slider.rest.client;
 
 import org.apache.log4j.Logger;
+import org.codehaus.jackson.annotate.JsonIgnore;
+import org.codehaus.jackson.annotate.JsonIgnoreProperties;
 
 import javax.xml.xpath.XPath;
 import javax.xml.xpath.XPathExpression;
@@ -27,6 +29,7 @@ import javax.xml.xpath.XPathFactory;
 import java.util.ArrayList;
 import java.util.List;
 
+@JsonIgnoreProperties({"keyName", "matchers", "xPathExpression", "xPathExpressionComputed"})
 public class Metric {
   private static final Logger logger = Logger
       .getLogger(Metric.class);
@@ -35,9 +38,13 @@ public class Metric {
   private String metric;
   private boolean pointInTime;
   private boolean temporal;
+  @JsonIgnore
   private String keyName = null;
+  @JsonIgnore
   private List<List<String>> matchers = null;
+  @JsonIgnore
   private XPathExpression xPathExpression = null;
+  @JsonIgnore
   private boolean xPathExpressionComputed = false;
 
   private Metric() {
@@ -73,6 +80,7 @@ public class Metric {
     this.temporal = temporal;
   }
 
+  @JsonIgnore
   public XPathExpression getxPathExpression() {
     if (!xPathExpressionComputed) {
       XPathFactory xPathfactory = XPathFactory.newInstance();
@@ -90,6 +98,7 @@ public class Metric {
     return xPathExpression;
   }
 
+  @JsonIgnore
   public String getJmxBeanKeyName() {
     if (keyName == null) {
       int firstIndex = metric.indexOf(SEPARATOR);
@@ -106,6 +115,7 @@ public class Metric {
    *
    * @return
    */
+  @JsonIgnore
   public List<List<String>> getMatchers() {
     if (matchers == null) {
       List<List<String>> tmpMatchers = new ArrayList<List<String>>();
@@ -143,5 +153,4 @@ public class Metric {
       }
     }
   }
-
 }