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 E2001200BF8 for ; Fri, 13 Jan 2017 12:51:30 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id E08E3160B3F; Fri, 13 Jan 2017 11:51:30 +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 38411160B32 for ; Fri, 13 Jan 2017 12:51:30 +0100 (CET) Received: (qmail 50297 invoked by uid 500); 13 Jan 2017 11:51:29 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 50276 invoked by uid 99); 13 Jan 2017 11:51:29 -0000 Received: from Unknown (HELO jira-lw-us.apache.org) (207.244.88.139) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Jan 2017 11:51:29 +0000 Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 9BD6225288 for ; Fri, 13 Jan 2017 11:51:26 +0000 (UTC) Date: Fri, 13 Jan 2017 11:51:26 +0000 (UTC) From: "Wellington Chevreuil (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (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: Fri, 13 Jan 2017 11:51:31 -0000 [ https://issues.apache.org/jira/browse/HBASE-15860?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Wellington Chevreuil updated HBASE-15860: ----------------------------------------- Attachment: 0001-HBASE-15860.master.002.patch Attaching a rebased version of the patch, since last one is already 6 months old. > 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 > Assignee: Wellington Chevreuil > Priority: Minor > Attachments: 0001-HBASE-15860.master.002.patch, HBASE-15860.master.002.patch, HBASE-15860.master.002.patch, HBASE-15860.patch > > > 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)