hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sur...@apache.org
Subject svn commit: r1482380 - in /hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common: CHANGES.txt src/main/java/org/apache/hadoop/metrics2/source/JvmMetrics.java src/main/java/org/apache/hadoop/metrics2/source/JvmMetricsInfo.java
Date Tue, 14 May 2013 15:18:03 GMT
Author: suresh
Date: Tue May 14 15:18:03 2013
New Revision: 1482380

URL: http://svn.apache.org/r1482380
Log:
HADOOP-9560. Merge change 1482372 from trunk.

Modified:
    hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt
    hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/source/JvmMetrics.java
    hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/source/JvmMetricsInfo.java

Modified: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt?rev=1482380&r1=1482379&r2=1482380&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt (original)
+++ hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt Tue May
14 15:18:03 2013
@@ -60,6 +60,9 @@ Release 2.0.5-beta - UNRELEASED
     and RandomAccessFile) in SecureIOUtils so as to help YARN-578. (Omkar Vinit
     Joshi via vinodkv)
 
+    HADOOP-9560. metrics2#JvmMetrics should have max memory size of JVM.
+    (Tsuyoshi Ozawa via suresh)
+
   OPTIMIZATIONS
 
     HADOOP-9150. Avoid unnecessary DNS resolution attempts for logical URIs

Modified: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/source/JvmMetrics.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/source/JvmMetrics.java?rev=1482380&r1=1482379&r2=1482380&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/source/JvmMetrics.java
(original)
+++ hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/source/JvmMetrics.java
Tue May 14 15:18:03 2013
@@ -98,10 +98,12 @@ public class JvmMetrics implements Metri
   private void getMemoryUsage(MetricsRecordBuilder rb) {
     MemoryUsage memNonHeap = memoryMXBean.getNonHeapMemoryUsage();
     MemoryUsage memHeap = memoryMXBean.getHeapMemoryUsage();
+    Runtime runtime = Runtime.getRuntime();
     rb.addGauge(MemNonHeapUsedM, memNonHeap.getUsed() / M)
       .addGauge(MemNonHeapCommittedM, memNonHeap.getCommitted() / M)
       .addGauge(MemHeapUsedM, memHeap.getUsed() / M)
-      .addGauge(MemHeapCommittedM, memHeap.getCommitted() / M);
+      .addGauge(MemHeapCommittedM, memHeap.getCommitted() / M)
+      .addGauge(MemMaxM, runtime.maxMemory() / M);
   }
 
   private void getGcUsage(MetricsRecordBuilder rb) {

Modified: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/source/JvmMetricsInfo.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/source/JvmMetricsInfo.java?rev=1482380&r1=1482379&r2=1482380&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/source/JvmMetricsInfo.java
(original)
+++ hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/source/JvmMetricsInfo.java
Tue May 14 15:18:03 2013
@@ -34,6 +34,7 @@ public enum JvmMetricsInfo implements Me
   MemNonHeapCommittedM("Non-heap memory committed in MB"),
   MemHeapUsedM("Heap memory used in MB"),
   MemHeapCommittedM("Heap memory committed in MB"),
+  MemMaxM("Max memory size in MB"),
   GcCount("Total GC count"),
   GcTimeMillis("Total GC time in milliseconds"),
   ThreadsNew("Number of new threads"),



Mime
View raw message