hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oz...@apache.org
Subject hadoop git commit: Revert "YARN-3157. Refactor the exception handling in ConverterUtils#to*Id. Contributed by Bibin A Chundatt."
Date Thu, 12 Feb 2015 09:48:37 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk 95a41bf35 -> 4cbaa74f6


Revert "YARN-3157. Refactor the exception handling in ConverterUtils#to*Id. Contributed by
Bibin A Chundatt."

This reverts commit 95a41bf35d8ba0a1ec087f456914231103d98fb9.


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

Branch: refs/heads/trunk
Commit: 4cbaa74f623ac8ee2c5b7308ac33a807a33e17f7
Parents: 95a41bf
Author: Tsuyoshi Ozawa <ozawa@apache.org>
Authored: Thu Feb 12 18:48:17 2015 +0900
Committer: Tsuyoshi Ozawa <ozawa@apache.org>
Committed: Thu Feb 12 18:48:17 2015 +0900

----------------------------------------------------------------------
 hadoop-yarn-project/CHANGES.txt                      |  3 ---
 .../org/apache/hadoop/yarn/util/ConverterUtils.java  | 14 +-------------
 .../apache/hadoop/yarn/util/TestConverterUtils.java  | 15 ---------------
 3 files changed, 1 insertion(+), 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/4cbaa74f/hadoop-yarn-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt
index 985e4f5..23923d0 100644
--- a/hadoop-yarn-project/CHANGES.txt
+++ b/hadoop-yarn-project/CHANGES.txt
@@ -269,9 +269,6 @@ Release 2.7.0 - UNRELEASED
     YARN-1237. Description for yarn.nodemanager.aux-services in 
     yarn-default.xml is misleading. (Brahma Reddy Battula via ozawa)
 
-    YARN-3157. Refactor the exception handling in ConverterUtils#to*Id.
-    (Bibin A Chundatt via ozawa)
-
   OPTIMIZATIONS
 
     YARN-2990. FairScheduler's delay-scheduling always waits for node-local and 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/4cbaa74f/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/ConverterUtils.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/ConverterUtils.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/ConverterUtils.java
index 7013fc8..0aa68a2 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/ConverterUtils.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/ConverterUtils.java
@@ -27,7 +27,6 @@ import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
 import java.util.Map.Entry;
-import java.util.NoSuchElementException;
 
 import org.apache.hadoop.classification.InterfaceAudience.Private;
 import org.apache.hadoop.fs.Path;
@@ -176,12 +175,7 @@ public class ConverterUtils {
   }
 
   public static ContainerId toContainerId(String containerIdStr) {
-    try {
-      return ContainerId.fromString(containerIdStr);
-    } catch (NoSuchElementException e) {
-      throw new IllegalArgumentException("Invalid ContainerId: "
-          + containerIdStr, e);
-    }
+    return ContainerId.fromString(containerIdStr);
   }
 
   public static ApplicationAttemptId toApplicationAttemptId(
@@ -196,9 +190,6 @@ public class ConverterUtils {
     } catch (NumberFormatException n) {
       throw new IllegalArgumentException("Invalid AppAttemptId: "
           + applicationAttmeptIdStr, n);
-    } catch (NoSuchElementException e){
-      throw new IllegalArgumentException("Invalid AppAttemptId: "
-          + applicationAttmeptIdStr, e);
     }
   }
   
@@ -215,9 +206,6 @@ public class ConverterUtils {
     } catch (NumberFormatException n) {
       throw new IllegalArgumentException("Invalid ApplicationId: "
           + appIdStr, n);
-    } catch (NoSuchElementException e){
-      throw new IllegalArgumentException("Invalid ApplicationId: "
-          + appIdStr, e);
     }
   }
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/4cbaa74f/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/TestConverterUtils.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/TestConverterUtils.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/TestConverterUtils.java
index 3cec38b..7d53785 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/TestConverterUtils.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/TestConverterUtils.java
@@ -99,19 +99,4 @@ public class TestConverterUtils {
     assertEquals(nid.getPort(), 0);
     assertEquals(nid.getHost(), "node");
   }
-
-  @Test(expected = IllegalArgumentException.class)
-  public void testInvalidContainerId() {
-    ConverterUtils.toContainerId("container_e20_1423221031460_0003_01");
-  }
-
-  @Test(expected = IllegalArgumentException.class)
-  public void testInvalidAppattemptId() {
-    ConverterUtils.toApplicationAttemptId("appattempt_1423221031460");
-  }
-
-  @Test(expected = IllegalArgumentException.class)
-  public void testApplicationId() {
-    ConverterUtils.toApplicationId("application_1423221031460");
-  }
 }


Mime
View raw message