hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wan...@apache.org
Subject hadoop git commit: YARN-4844. Addendum patch, revert few changes to public and evolving to avoid breaking downstream projects as much as possible.
Date Thu, 16 Jun 2016 18:10:08 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 159b249a3 -> 7eb524dde


YARN-4844. Addendum patch, revert few changes to public and evolving to avoid breaking downstream
projects as much as possible.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/7eb524dd
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/7eb524dd
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/7eb524dd

Branch: refs/heads/branch-2
Commit: 7eb524ddee4af80c87b134070945977bf73e950f
Parents: 159b249
Author: Wangda Tan <wangda@apache.org>
Authored: Thu Jun 16 11:09:56 2016 -0700
Committer: Wangda Tan <wangda@apache.org>
Committed: Thu Jun 16 11:09:56 2016 -0700

----------------------------------------------------------------------
 .../apache/hadoop/mapreduce/TypeConverter.java    |  7 ++++---
 .../org/apache/hadoop/mapreduce/JobStatus.java    | 18 +++++++++---------
 .../apache/hadoop/mapred/JobClientUnitTest.java   |  6 +++---
 .../apache/hadoop/yarn/api/records/Resource.java  | 13 ++++++++++---
 4 files changed, 26 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/7eb524dd/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/TypeConverter.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/TypeConverter.java
b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/TypeConverter.java
index ca38bab..aea931a 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/TypeConverter.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/TypeConverter.java
@@ -521,13 +521,14 @@ public class TypeConverter {
         application.getApplicationResourceUsageReport();
     if (resourceUsageReport != null) {
       jobStatus.setNeededMem(
-          resourceUsageReport.getNeededResources().getMemorySize());
+          (int)resourceUsageReport.getNeededResources().getMemorySize());
       jobStatus.setNumReservedSlots(
           resourceUsageReport.getNumReservedContainers());
       jobStatus.setNumUsedSlots(resourceUsageReport.getNumUsedContainers());
       jobStatus.setReservedMem(
-          resourceUsageReport.getReservedResources().getMemorySize());
-      jobStatus.setUsedMem(resourceUsageReport.getUsedResources().getMemorySize());
+          (int)resourceUsageReport.getReservedResources().getMemorySize());
+      jobStatus.setUsedMem(
+          (int) resourceUsageReport.getUsedResources().getMemorySize());
     }
     return jobStatus;
   }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/7eb524dd/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/JobStatus.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/JobStatus.java
b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/JobStatus.java
index 7438296..9ff75b9 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/JobStatus.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/JobStatus.java
@@ -95,9 +95,9 @@ public class JobStatus implements Writable, Cloneable {
   private String trackingUrl ="";
   private int numUsedSlots;
   private int numReservedSlots;
-  private long usedMem;
-  private long reservedMem;
-  private long neededMem;
+  private int usedMem;
+  private int reservedMem;
+  private int neededMem;
   private boolean isUber;
     
   /**
@@ -580,42 +580,42 @@ public class JobStatus implements Writable, Cloneable {
   /**
    * @return the used memory
    */
-  public long getUsedMem() {
+  public int getUsedMem() {
     return usedMem;
   }
 
   /**
    * @param m the used memory
    */
-  public void setUsedMem(long m) {
+  public void setUsedMem(int m) {
     this.usedMem = m;
   }
 
   /**
    * @return the reserved memory
    */
-  public long getReservedMem() {
+  public int getReservedMem() {
     return reservedMem;
  }
 
   /**
    * @param r the reserved memory
    */
-  public void setReservedMem(long r) {
+  public void setReservedMem(int r) {
     this.reservedMem = r;
   }
 
   /**
    * @return the needed memory
    */
-  public long getNeededMem() {
+  public int getNeededMem() {
   return neededMem;
  }
 
   /**
    * @param n the needed memory
    */
-  public void setNeededMem(long n) {
+  public void setNeededMem(int n) {
     this.neededMem = n;
   }
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/7eb524dd/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/JobClientUnitTest.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/JobClientUnitTest.java
b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/JobClientUnitTest.java
index 4895a5b..84b76bf 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/JobClientUnitTest.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/JobClientUnitTest.java
@@ -170,9 +170,9 @@ public class JobClientUnitTest {
     when(mockJobStatus.getPriority()).thenReturn(JobPriority.NORMAL);
     when(mockJobStatus.getNumUsedSlots()).thenReturn(1);
     when(mockJobStatus.getNumReservedSlots()).thenReturn(1);
-    when(mockJobStatus.getUsedMem()).thenReturn(1024L);
-    when(mockJobStatus.getReservedMem()).thenReturn(512L);
-    when(mockJobStatus.getNeededMem()).thenReturn(2048L);
+    when(mockJobStatus.getUsedMem()).thenReturn(1024);
+    when(mockJobStatus.getReservedMem()).thenReturn(512);
+    when(mockJobStatus.getNeededMem()).thenReturn(2048);
     when(mockJobStatus.getSchedulingInfo()).thenReturn("NA");
 
     Job mockJob = mock(Job.class);

http://git-wip-us.apache.org/repos/asf/hadoop/blob/7eb524dd/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/Resource.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/Resource.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/Resource.java
index e2d8472..cf3fbde 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/Resource.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/Resource.java
@@ -18,6 +18,7 @@
 
 package org.apache.hadoop.yarn.api.records;
 
+import org.apache.commons.lang.NotImplementedException;
 import org.apache.hadoop.classification.InterfaceAudience.Private;
 import org.apache.hadoop.classification.InterfaceAudience.Public;
 import org.apache.hadoop.classification.InterfaceStability.Unstable;
@@ -79,7 +80,9 @@ public abstract class Resource implements Comparable<Resource> {
    */
   @Private
   @Unstable
-  public abstract long getMemorySize();
+  public long getMemorySize() {
+    throw new NotImplementedException("getVirtualCoresSize is not implemented");
+  }
   
   /**
    * Set <em>memory</em> of the resource.
@@ -106,7 +109,9 @@ public abstract class Resource implements Comparable<Resource> {
 
   @Public
   @Unstable
-  public abstract long getVirtualCoresSize();
+  public long getVirtualCoresSize() {
+    throw new NotImplementedException("getVirtualCoresSize is not implemented");
+  }
   
   /**
    * Set <em>number of virtual cpu cores</em> of the resource.
@@ -120,7 +125,9 @@ public abstract class Resource implements Comparable<Resource> {
    */
   @Public
   @Evolving
-  public abstract void setVirtualCores(long vCores);
+  public void setVirtualCores(long vCores) {
+    throw new NotImplementedException("getVirtualCoresSize is not implemented");
+  }
 
   @Override
   public int hashCode() {


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message