Return-Path: X-Original-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BEE6718198 for ; Fri, 25 Mar 2016 22:47:30 +0000 (UTC) Received: (qmail 44517 invoked by uid 500); 25 Mar 2016 22:47:25 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 44460 invoked by uid 500); 25 Mar 2016 22:47:25 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 44415 invoked by uid 99); 25 Mar 2016 22:47:25 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Mar 2016 22:47:25 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 8A95F2C1F5A for ; Fri, 25 Mar 2016 22:47:25 +0000 (UTC) Date: Fri, 25 Mar 2016 22:47:25 +0000 (UTC) From: "Ming Ma (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HDFS-10208) Addendum for HDFS-9579: to handle the case when client machine can't resolve network path MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HDFS-10208?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ming Ma updated HDFS-10208: --------------------------- Attachment: HDFS-10208.patch Here is the draft patch. In the case client machine can't resolve network location, the distance will be considered Integer.MAX_VALUE. > Addendum for HDFS-9579: to handle the case when client machine can't resolve network path > ----------------------------------------------------------------------------------------- > > Key: HDFS-10208 > URL: https://issues.apache.org/jira/browse/HDFS-10208 > Project: Hadoop HDFS > Issue Type: Bug > Reporter: Ming Ma > Attachments: HDFS-10208.patch > > > If DFSClient runs on a machine that can't resolve network path, e.g.{{dnsToSwitchMapping.resolve}} returns null, that will cause exception when it tries to create {{clientNode}}. In such case, there is no need to create {{clientNode}} as null {{clientNode}} means its network distance with any datanode is Integer.MAX_VALUE, which is what we want. > {noformat} > clientNode = new NodeBase(clientHostName, > dnsToSwitchMapping.resolve(nodes).get(0)); > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)