Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 0D33E2009D9 for ; Thu, 19 May 2016 19:37:15 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 0BC2D160A2A; Thu, 19 May 2016 17:37:15 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 583DE160A05 for ; Thu, 19 May 2016 19:37:14 +0200 (CEST) Received: (qmail 5969 invoked by uid 500); 19 May 2016 17:37:13 -0000 Mailing-List: contact dev-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 dev@hbase.apache.org Received: (qmail 5902 invoked by uid 99); 19 May 2016 17:37:13 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 May 2016 17:37:13 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 060F52C1F58 for ; Thu, 19 May 2016 17:37:13 +0000 (UTC) Date: Thu, 19 May 2016 17:37:13 +0000 (UTC) From: "Wellington Chevreuil (JIRA)" To: dev@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HBASE-15860) Improvements for HBASE-14280 - Fixing Bulkload for HDFS HA Clusters MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 19 May 2016 17:37:15 -0000 Wellington Chevreuil created HBASE-15860: -------------------------------------------- Summary: Improvements for HBASE-14280 - Fixing Bulkload for HDFS HA Clusters Key: HBASE-15860 URL: https://issues.apache.org/jira/browse/HBASE-15860 Project: HBase Issue Type: Improvement Components: util Affects Versions: 1.0.0 Reporter: Wellington Chevreuil Priority: Minor HBASE-14280 introduced fix for bulkload failures when referring a remote cluster name service id if "bulkloading" from a HA cluster. HBASE-14280 solution on *FSHDFSUtils.getNNAddresses* was to invoke *DFSUtil.getNNServiceRpcAddressesForCluster* instead of *DFSUtil.getNNServiceRpcAddresses*. This works for hadoop 2.6 and above. Proposed change here is to use "*DFSUtil.getRpcAddressesForNameserviceId*" instead, which already returns only addresses for specific nameservice informed. This is available since hadoop 2.4. Sample proposal on FSHDFSUtils.getNNAddresses: ... {noformat} String nameServiceId = serviceName.split(":")[1]; if (dfsUtilClazz == null) { dfsUtilClazz = Class.forName("org.apache.hadoop.hdfs.DFSUtil"); } if (getNNAddressesMethod == null) { getNNAddressesMethod = dfsUtilClazz.getMethod("getRpcAddressesForNameserviceId", Configuration.class, String.class, String.class); } Map nnMap = (Map) getNNAddressesMethod .invoke(null, conf, nameServiceId, null); for (Map.Entry e2 : nnMap.entrySet()) { InetSocketAddress addr = e2.getValue(); addresses.add(addr); } ... {noformat} Will also add test conditions for *FSHDFSUtils.isSameHdfs* to verify scenario when multiple name service ids are defined. -- This message was sent by Atlassian JIRA (v6.3.4#6332)