hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asur...@apache.org
Subject hadoop git commit: YARN-6932. Fix TestFederationRMFailoverProxyProvider test case failure.
Date Fri, 03 Nov 2017 18:16:02 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2.9 bb6a1aa5f -> 8746a65e7


YARN-6932. Fix TestFederationRMFailoverProxyProvider test case failure.

(cherry picked from commit 0542e6f86e6734f8ceea00960bebe719827136db)


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

Branch: refs/heads/branch-2.9
Commit: 8746a65e786e48d76864a4182fede0bdf6aee0f3
Parents: bb6a1aa
Author: Subru Krishnan <subru@apache.org>
Authored: Thu Aug 3 14:18:03 2017 -0700
Committer: Arun Suresh <asuresh@apache.org>
Committed: Fri Nov 3 11:15:48 2017 -0700

----------------------------------------------------------------------
 .../FederationRMFailoverProxyProvider.java      | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/8746a65e/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/failover/FederationRMFailoverProxyProvider.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/failover/FederationRMFailoverProxyProvider.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/failover/FederationRMFailoverProxyProvider.java
index e00f8d1..c631208 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/failover/FederationRMFailoverProxyProvider.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/failover/FederationRMFailoverProxyProvider.java
@@ -72,8 +72,7 @@ public class FederationRMFailoverProxyProvider<T>
     this.rmProxy = proxy;
     this.protocol = proto;
     this.rmProxy.checkAllowedProtocols(this.protocol);
-    String clusterId =
-        configuration.get(YarnConfiguration.RM_CLUSTER_ID);
+    String clusterId = configuration.get(YarnConfiguration.RM_CLUSTER_ID);
     Preconditions.checkNotNull(clusterId, "Missing RM ClusterId");
     this.subClusterId = SubClusterId.newInstance(clusterId);
     this.facade = facade.getInstance();
@@ -197,16 +196,17 @@ public class FederationRMFailoverProxyProvider<T>
   }
 
   private void closeInternal(T currentProxy) {
-    if ((currentProxy != null) && (currentProxy instanceof Closeable)) {
-      try {
-        ((Closeable) currentProxy).close();
-      } catch (IOException e) {
-        LOG.warn("Exception while trying to close proxy", e);
+    if (currentProxy != null) {
+      if (currentProxy instanceof Closeable) {
+        try {
+          ((Closeable) currentProxy).close();
+        } catch (IOException e) {
+          LOG.warn("Exception while trying to close proxy", e);
+        }
+      } else {
+        RPC.stopProxy(currentProxy);
       }
-    } else {
-      RPC.stopProxy(currentProxy);
     }
-
   }
 
   /**


---------------------------------------------------------------------
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