You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by te...@apache.org on 2015/09/21 18:48:50 UTC

hbase git commit: HBASE-14280 Revert due to TestFSHDFSUtils failure

Repository: hbase
Updated Branches:
  refs/heads/branch-1.1 9ae6cead3 -> dcf859fcb


HBASE-14280 Revert due to TestFSHDFSUtils failure


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

Branch: refs/heads/branch-1.1
Commit: dcf859fcb5184bd590c0a72ad74b385a22d929d5
Parents: 9ae6cea
Author: tedyu <yu...@gmail.com>
Authored: Mon Sep 21 09:48:41 2015 -0700
Committer: tedyu <yu...@gmail.com>
Committed: Mon Sep 21 09:48:41 2015 -0700

----------------------------------------------------------------------
 .../apache/hadoop/hbase/util/FSHDFSUtils.java   | 25 ++------------------
 1 file changed, 2 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/dcf859fc/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSHDFSUtils.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSHDFSUtils.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSHDFSUtils.java
index 099bdc0..0fffcc6 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSHDFSUtils.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSHDFSUtils.java
@@ -27,7 +27,6 @@ import java.net.URI;
 import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
-import java.util.Collection;
 
 import com.google.common.collect.Sets;
 import org.apache.commons.logging.Log;
@@ -67,17 +66,8 @@ public class FSHDFSUtils extends FSUtils {
           dfsUtilClazz = Class.forName("org.apache.hadoop.hdfs.DFSUtil");
         }
         if (getNNAddressesMethod == null) {
-          try {
-            // getNNServiceRpcAddressesForCluster is available only in version
-            // equal to or later than Hadoop 2.6
-            getNNAddressesMethod =
-                dfsUtilClazz.getMethod("getNNServiceRpcAddressesForCluster", Configuration.class);
-          } catch (NoSuchMethodError e) {
-            // If hadoop version is older than hadoop 2.6
-            getNNAddressesMethod =
-                dfsUtilClazz.getMethod("getNNServiceRpcAddresses", Configuration.class);
-          }
-
+          getNNAddressesMethod =
+                  dfsUtilClazz.getMethod("getNNServiceRpcAddresses", Configuration.class);
         }
 
         Map<String, Map<String, InetSocketAddress>> addressMap =
@@ -125,17 +115,6 @@ public class FSHDFSUtils extends FSUtils {
     if (srcServiceName.equals(desServiceName)) {
       return true;
     }
-    if (srcServiceName.startsWith("ha-hdfs") && desServiceName.startsWith("ha-hdfs")) {
-      Collection<String> internalNameServices =
-          conf.getTrimmedStringCollection("dfs.internal.nameservices");
-      if (!internalNameServices.isEmpty()) {
-        if (internalNameServices.contains(srcServiceName.split(":")[1])) {
-          return true;
-        } else {
-          return false;
-        }
-      }
-    }
     if (srcFs instanceof DistributedFileSystem && desFs instanceof DistributedFileSystem) {
       //If one serviceName is an HA format while the other is a non-HA format,
       // maybe they refer to the same FileSystem.