hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maha...@apache.org
Subject svn commit: r1190110 - in /hadoop/common/trunk/hadoop-mapreduce-project: ./ hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/ hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/test/java/org/apach...
Date Fri, 28 Oct 2011 01:16:30 GMT
Author: mahadev
Date: Fri Oct 28 01:16:29 2011
New Revision: 1190110

URL: http://svn.apache.org/viewvc?rev=1190110&view=rev
Log:
MAPREDUCE-3282. bin/mapred job -list throws exception. (acmurthy via mahadev)

Modified:
    hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt
    hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/TypeConverter.java
    hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/test/java/org/apache/hadoop/mapreduce/TestTypeConverter.java

Modified: hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt?rev=1190110&r1=1190109&r2=1190110&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt Fri Oct 28 01:16:29 2011
@@ -1821,6 +1821,9 @@ Release 0.23.0 - Unreleased
     MAPREDUCE-3284. Moved JobQueueClient to hadoop-mapreduce-client-core.
     (acmurthy) 
 
+    MAPREDUCE-3282. bin/mapred job -list throws exception. (acmurthy via 
+    mahadev)
+
 Release 0.22.0 - Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/TypeConverter.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/TypeConverter.java?rev=1190110&r1=1190109&r2=1190110&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/TypeConverter.java
(original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/TypeConverter.java
Fri Oct 28 01:16:29 2011
@@ -380,6 +380,7 @@ public class TypeConverter {
 
   public static JobStatus.State fromYarn(YarnApplicationState state) {
     switch (state) {
+    case NEW:
     case SUBMITTED:
       return State.PREP;
     case RUNNING:

Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/test/java/org/apache/hadoop/mapreduce/TestTypeConverter.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/test/java/org/apache/hadoop/mapreduce/TestTypeConverter.java?rev=1190110&r1=1190109&r2=1190110&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/test/java/org/apache/hadoop/mapreduce/TestTypeConverter.java
(original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/test/java/org/apache/hadoop/mapreduce/TestTypeConverter.java
Fri Oct 28 01:16:29 2011
@@ -20,6 +20,9 @@ package org.apache.hadoop.mapreduce;
 import junit.framework.Assert;
 
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.mapreduce.v2.api.records.JobState;
+import org.apache.hadoop.mapreduce.v2.api.records.TaskState;
+import org.apache.hadoop.mapreduce.v2.api.records.TaskType;
 import org.apache.hadoop.yarn.api.records.ApplicationId;
 import org.apache.hadoop.yarn.api.records.YarnApplicationState;
 import org.apache.hadoop.yarn.api.records.ApplicationReport;
@@ -28,6 +31,7 @@ import org.apache.hadoop.yarn.api.record
 import org.apache.hadoop.yarn.api.records.impl.pb.ApplicationResourceUsageReportPBImpl;
 import org.apache.hadoop.yarn.api.records.impl.pb.QueueInfoPBImpl;
 import org.apache.hadoop.yarn.api.records.impl.pb.ResourcePBImpl;
+import org.apache.hadoop.yarn.api.records.QueueState;
 
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
@@ -35,6 +39,31 @@ import org.junit.Test;
 
 public class TestTypeConverter {
   @Test
+  public void testEnums() throws Exception {
+    for (YarnApplicationState applicationState : YarnApplicationState.values()) {
+      TypeConverter.fromYarn(applicationState);
+    }
+    
+    for (TaskType taskType : TaskType.values()) {
+      TypeConverter.fromYarn(taskType);
+    }
+    
+    for (JobState jobState : JobState.values()) {
+      TypeConverter.fromYarn(jobState);
+    }
+    
+    for (QueueState queueState : QueueState.values()) {
+      TypeConverter.fromYarn(queueState);
+    }
+    
+    for (TaskState taskState : TaskState.values()) {
+      TypeConverter.fromYarn(taskState);
+    }
+    
+    
+  }
+  
+  @Test
   public void testFromYarn() throws Exception {
     int appStartTime = 612354;
     YarnApplicationState state = YarnApplicationState.RUNNING;



Mime
View raw message