Browse Source

MAPREDUCE-4845. ClusterStatus.getMaxMemory() and getUsedMemory() exist in MR1 but not MR2 (Sandy Ryza via tgraves)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1424729 13f79535-47bb-0310-9956-ffa450edef68
Thomas Graves 12 years ago
parent
commit
8febfd0f06

+ 3 - 0
hadoop-mapreduce-project/CHANGES.txt

@@ -11,6 +11,9 @@ Release 0.23.6 - UNRELEASED
     MAPREDUCE-4811. JobHistoryServer should show when it was started in WebUI
     About page (Ravi Prakash via jlowe)
 
+    MAPREDUCE-4845. ClusterStatus.getMaxMemory() and getUsedMemory() exist in 
+    MR1 but not MR2 (Sandy Ryza via tgraves)
+
   OPTIMIZATIONS
 
   BUG FIXES

+ 18 - 0
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/ClusterStatus.java

@@ -175,6 +175,8 @@ public class ClusterStatus implements Writable {
     
   }
   
+  public static final int UNINITIALIZED_MEMORY_VALUE = -1;
+  
   private int numActiveTrackers;
   private Collection<String> activeTrackers = new ArrayList<String>();
   private int numBlacklistedTrackers;
@@ -384,6 +386,22 @@ public class ClusterStatus implements Writable {
   public JobTrackerStatus getJobTrackerStatus() {
     return status;
   }
+  
+  /**
+   * Returns UNINITIALIZED_MEMORY_VALUE (-1)
+   */
+  @Deprecated
+  public long getMaxMemory() {
+    return UNINITIALIZED_MEMORY_VALUE;
+  }
+  
+  /**
+   * Returns UNINITIALIZED_MEMORY_VALUE (-1)
+   */
+  @Deprecated
+  public long getUsedMemory() {
+    return UNINITIALIZED_MEMORY_VALUE;
+  }
 
   /**
    * Gets the list of blacklisted trackers along with reasons for blacklisting.