You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by tb...@apache.org on 2013/02/21 20:25:50 UTC

svn commit: r1448779 - in /incubator/ambari/trunk: ./ ambari-server/src/main/resources/ ambari-server/src/test/java/org/apache/ambari/server/controller/jmx/ ambari-server/src/test/resources/

Author: tbeerbower
Date: Thu Feb 21 19:25:50 2013
New Revision: 1448779

URL: http://svn.apache.org/r1448779
Log:
AMBARI-1414 - Expose fine grained HDFS capacity metrics in API

Modified:
    incubator/ambari/trunk/CHANGES.txt
    incubator/ambari/trunk/ambari-server/src/main/resources/jmx_properties.json
    incubator/ambari/trunk/ambari-server/src/test/java/org/apache/ambari/server/controller/jmx/JMXPropertyProviderTest.java
    incubator/ambari/trunk/ambari-server/src/test/resources/hdfs_namenode_jmx.json

Modified: incubator/ambari/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1448779&r1=1448778&r2=1448779&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Thu Feb 21 19:25:50 2013
@@ -45,6 +45,8 @@ Trunk (unreleased changes):
 
  IMPROVEMENTS
 
+ AMBARI-1414. Expose fine grained HDFS capacity metrics in API. (tbeerbower)
+
  AMBARI-1444. Make install, service & host configuration pages reuse same
  configuration code. (srimanth via yusaku)
 

Modified: incubator/ambari/trunk/ambari-server/src/main/resources/jmx_properties.json
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-server/src/main/resources/jmx_properties.json?rev=1448779&r1=1448778&r2=1448779&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-server/src/main/resources/jmx_properties.json (original)
+++ incubator/ambari/trunk/ambari-server/src/main/resources/jmx_properties.json Thu Feb 21 19:25:50 2013
@@ -124,6 +124,26 @@
         "pointInTime" : true,
         "temporal" : false
       },
+      "metrics/dfs/FSNamesystem/CapacityTotal":{
+        "metric" : "Hadoop:service=NameNode,name=FSNamesystemMetrics.CapacityTotal",
+        "pointInTime" : true,
+        "temporal" : false
+      },
+      "metrics/dfs/FSNamesystem/CapacityUsed":{
+        "metric" : "Hadoop:service=NameNode,name=FSNamesystemMetrics.CapacityUsed",
+        "pointInTime" : true,
+        "temporal" : false
+      },
+      "metrics/dfs/FSNamesystem/CapacityRemaining":{
+        "metric" : "Hadoop:service=NameNode,name=FSNamesystemMetrics.CapacityRemaining",
+        "pointInTime" : true,
+        "temporal" : false
+      },
+      "metrics/dfs/FSNamesystem/CapacityNonDFSUsed":{
+        "metric" : "Hadoop:service=NameNode,name=FSNamesystemMetrics.CapacityNonDFSUsed",
+        "pointInTime" : true,
+        "temporal" : false
+      },
       "metrics/dfs/FSNamesystem/CapacityRemainingGB":{
         "metric" : "Hadoop:service=NameNode,name=FSNamesystemMetrics.CapacityRemainingGB",
         "pointInTime" : true,
@@ -3339,6 +3359,26 @@
         "pointInTime" : true,
         "temporal" : false
       },
+      "metrics/dfs/FSNamesystem/CapacityTotal":{
+        "metric" : "Hadoop:service=NameNode,name=FSNamesystemMetrics.CapacityTotal",
+        "pointInTime" : true,
+        "temporal" : false
+      },
+      "metrics/dfs/FSNamesystem/CapacityUsed":{
+        "metric" : "Hadoop:service=NameNode,name=FSNamesystemMetrics.CapacityUsed",
+        "pointInTime" : true,
+        "temporal" : false
+      },
+      "metrics/dfs/FSNamesystem/CapacityRemaining":{
+        "metric" : "Hadoop:service=NameNode,name=FSNamesystemMetrics.CapacityRemaining",
+        "pointInTime" : true,
+        "temporal" : false
+      },
+      "metrics/dfs/FSNamesystem/CapacityNonDFSUsed":{
+        "metric" : "Hadoop:service=NameNode,name=FSNamesystemMetrics.CapacityNonDFSUsed",
+        "pointInTime" : true,
+        "temporal" : false
+      },
       "metrics/dfs/FSNamesystem/CapacityTotalGB":{
         "metric" : "Hadoop:service=NameNode,name=FSNamesystemMetrics.CapacityTotalGB",
         "pointInTime" : true,

Modified: incubator/ambari/trunk/ambari-server/src/test/java/org/apache/ambari/server/controller/jmx/JMXPropertyProviderTest.java
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-server/src/test/java/org/apache/ambari/server/controller/jmx/JMXPropertyProviderTest.java?rev=1448779&r1=1448778&r2=1448779&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-server/src/test/java/org/apache/ambari/server/controller/jmx/JMXPropertyProviderTest.java (original)
+++ incubator/ambari/trunk/ambari-server/src/test/java/org/apache/ambari/server/controller/jmx/JMXPropertyProviderTest.java Thu Feb 21 19:25:50 2013
@@ -68,6 +68,10 @@ public class JMXPropertyProviderTest {
     Assert.assertEquals(473433016, resource.getPropertyValue(PropertyHelper.getPropertyId("metrics/jvm", "HeapMemoryUsed")));
     Assert.assertEquals(136314880, resource.getPropertyValue(PropertyHelper.getPropertyId("metrics/jvm", "NonHeapMemoryMax")));
     Assert.assertEquals(23634400, resource.getPropertyValue(PropertyHelper.getPropertyId("metrics/jvm", "NonHeapMemoryUsed")));
+    Assert.assertEquals(887717691390L, resource.getPropertyValue(PropertyHelper.getPropertyId("metrics/dfs/FSNamesystem", "CapacityTotal")));
+    Assert.assertEquals(184320, resource.getPropertyValue(PropertyHelper.getPropertyId("metrics/dfs/FSNamesystem", "CapacityUsed")));
+    Assert.assertEquals(842207944704L, resource.getPropertyValue(PropertyHelper.getPropertyId("metrics/dfs/FSNamesystem", "CapacityRemaining")));
+    Assert.assertEquals(45509562366L, resource.getPropertyValue(PropertyHelper.getPropertyId("metrics/dfs/FSNamesystem", "CapacityNonDFSUsed")));
 
 
     // datanode

Modified: incubator/ambari/trunk/ambari-server/src/test/resources/hdfs_namenode_jmx.json
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-server/src/test/resources/hdfs_namenode_jmx.json?rev=1448779&r1=1448778&r2=1448779&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-server/src/test/resources/hdfs_namenode_jmx.json (original)
+++ incubator/ambari/trunk/ambari-server/src/test/resources/hdfs_namenode_jmx.json Thu Feb 21 19:25:50 2013
@@ -26,6 +26,10 @@
     "CapacityTotalGB" : 827,
     "CapacityUsedGB" : 0,
     "CapacityRemainingGB" : 784,
+    "CapacityTotal" : 887717691390,
+    "CapacityUsed" : 184320,
+    "CapacityRemaining" : 842207944704,
+    "CapacityNonDFSUsed" : 45509562366,
     "TotalLoad" : 1,
     "CorruptBlocks" : 0,
     "ExcessBlocks" : 0,
@@ -827,4 +831,4 @@
     "ImplementationVersion" : "1.6.0_31-b04",
     "ImplementationVendor" : "Sun Microsystems"
   } ]
-}
\ No newline at end of file
+}