hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rkan...@apache.org
Subject hadoop git commit: YARN-3400. [JDK 8] Build Failure due to unreported exceptions in RPCUtil (rkanter)
Date Thu, 26 Mar 2015 18:01:51 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk 3d0708bdb -> 87130bf6b


YARN-3400. [JDK 8] Build Failure due to unreported exceptions in RPCUtil (rkanter)


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

Branch: refs/heads/trunk
Commit: 87130bf6b22f538c5c26ad5cef984558a8117798
Parents: 3d0708b
Author: Robert Kanter <rkanter@apache.org>
Authored: Thu Mar 26 11:00:20 2015 -0700
Committer: Robert Kanter <rkanter@apache.org>
Committed: Thu Mar 26 11:00:20 2015 -0700

----------------------------------------------------------------------
 hadoop-yarn-project/CHANGES.txt                 |  3 +++
 .../org/apache/hadoop/yarn/ipc/RPCUtil.java     | 23 ++++++++++++++++----
 2 files changed, 22 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/87130bf6/hadoop-yarn-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt
index 905b414..d6ded77 100644
--- a/hadoop-yarn-project/CHANGES.txt
+++ b/hadoop-yarn-project/CHANGES.txt
@@ -108,6 +108,9 @@ Release 2.8.0 - UNRELEASED
     YARN-3383. AdminService should use "warn" instead of "info" to log exception 
     when operation fails. (Li Lu via wangda)
 
+    YARN-3400. [JDK 8] Build Failure due to unreported exceptions in
+    RPCUtil (rkanter)
+
 Release 2.7.0 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/87130bf6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/ipc/RPCUtil.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/ipc/RPCUtil.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/ipc/RPCUtil.java
index ada0669..1086ff0 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/ipc/RPCUtil.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/ipc/RPCUtil.java
@@ -70,6 +70,21 @@ public class RPCUtil {
     }
   }
 
+  private static <T extends YarnException> T instantiateYarnException(
+      Class<? extends T> cls, RemoteException re) throws RemoteException {
+    return instantiateException(cls, re);
+  }
+
+  private static <T extends IOException> T instantiateIOException(
+      Class<? extends T> cls, RemoteException re) throws RemoteException {
+    return instantiateException(cls, re);
+  }
+
+  private static <T extends RuntimeException> T instantiateRuntimeException(
+      Class<? extends T> cls, RemoteException re) throws RemoteException {
+    return instantiateException(cls, re);
+  }
+
   /**
    * Utility method that unwraps and returns appropriate exceptions.
    * 
@@ -94,17 +109,17 @@ public class RPCUtil {
           // Assume this to be a new exception type added to YARN. This isn't
           // absolutely correct since the RPC layer could add an exception as
           // well.
-          throw instantiateException(YarnException.class, re);
+          throw instantiateYarnException(YarnException.class, re);
         }
 
         if (YarnException.class.isAssignableFrom(realClass)) {
-          throw instantiateException(
+          throw instantiateYarnException(
               realClass.asSubclass(YarnException.class), re);
         } else if (IOException.class.isAssignableFrom(realClass)) {
-          throw instantiateException(realClass.asSubclass(IOException.class),
+          throw instantiateIOException(realClass.asSubclass(IOException.class),
               re);
         } else if (RuntimeException.class.isAssignableFrom(realClass)) {
-          throw instantiateException(
+          throw instantiateRuntimeException(
               realClass.asSubclass(RuntimeException.class), re);
         } else {
           throw re;


Mime
View raw message