Return-Path: X-Original-To: apmail-hbase-commits-archive@www.apache.org Delivered-To: apmail-hbase-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CD3F318C17 for ; Mon, 21 Sep 2015 16:50:41 +0000 (UTC) Received: (qmail 94390 invoked by uid 500); 21 Sep 2015 16:50:25 -0000 Delivered-To: apmail-hbase-commits-archive@hbase.apache.org Received: (qmail 94349 invoked by uid 500); 21 Sep 2015 16:50:25 -0000 Mailing-List: contact commits-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list commits@hbase.apache.org Received: (qmail 94339 invoked by uid 99); 21 Sep 2015 16:50:25 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Sep 2015 16:50:25 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 91014E027D; Mon, 21 Sep 2015 16:50:25 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: tedyu@apache.org To: commits@hbase.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: hbase git commit: HBASE-14280 Revert due to TestFSHDFSUtils failure Date: Mon, 21 Sep 2015 16:50:25 +0000 (UTC) Repository: hbase Updated Branches: refs/heads/branch-1.2 78c8c772d -> ec1215707 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/ec121570 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/ec121570 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/ec121570 Branch: refs/heads/branch-1.2 Commit: ec121570738e5920d74e7b7d3276d6324dd4d65a Parents: 78c8c77 Author: tedyu Authored: Mon Sep 21 09:50:16 2015 -0700 Committer: tedyu Committed: Mon Sep 21 09:50:16 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/ec121570/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 bdc2534..1360fb2 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> 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 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.