You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ke...@apache.org on 2013/03/12 19:57:16 UTC

svn commit: r1455668 - /hive/trunk/common/src/java/org/apache/hadoop/hive/common/metrics/Metrics.java

Author: kevinwilfong
Date: Tue Mar 12 18:57:16 2013
New Revision: 1455668

URL: http://svn.apache.org/r1455668
Log:
HIVE-4125. Expose metastore JMX metrics. (Samuel Yuan via kevinwilfong)

Modified:
    hive/trunk/common/src/java/org/apache/hadoop/hive/common/metrics/Metrics.java

Modified: hive/trunk/common/src/java/org/apache/hadoop/hive/common/metrics/Metrics.java
URL: http://svn.apache.org/viewvc/hive/trunk/common/src/java/org/apache/hadoop/hive/common/metrics/Metrics.java?rev=1455668&r1=1455667&r2=1455668&view=diff
==============================================================================
--- hive/trunk/common/src/java/org/apache/hadoop/hive/common/metrics/Metrics.java (original)
+++ hive/trunk/common/src/java/org/apache/hadoop/hive/common/metrics/Metrics.java Tue Mar 12 18:57:16 2013
@@ -72,6 +72,14 @@ public class Metrics {
       open();
     }
 
+    public Long getNumCounter() throws IOException {
+      return (Long)Metrics.get(numCounter);
+    }
+
+    public Long getTimeCounter() throws IOException {
+      return (Long)Metrics.get(timeCounter);
+    }
+
     /**
      * Opens scope, and makes note of the time started, increments run counter
      * @throws IOException