From common-issues-return-169493-archive-asf-public=cust-asf.ponee.io@hadoop.apache.org Thu Apr 4 04:47:03 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 3E551180600 for ; Thu, 4 Apr 2019 06:47:03 +0200 (CEST) Received: (qmail 76198 invoked by uid 500); 4 Apr 2019 04:47:01 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 76175 invoked by uid 99); 4 Apr 2019 04:47:00 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Apr 2019 04:47:00 +0000 Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 552B0E2837 for ; Thu, 4 Apr 2019 04:47:00 +0000 (UTC) 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 0BC2E24422 for ; Thu, 4 Apr 2019 04:47:00 +0000 (UTC) Date: Thu, 4 Apr 2019 04:47:00 +0000 (UTC) From: =?utf-8?Q?=C3=8D=C3=B1igo_Goiri_=28JIRA=29?= To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HADOOP-16161) NetworkTopology#getWeightUsingNetworkLocation return unexpected result MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HADOOP-16161?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D16= 809502#comment-16809502 ]=20 =C3=8D=C3=B1igo Goiri commented on HADOOP-16161: -------------------------------------- The main thing with {{assertEquals()}} is that when debugging failed unit t= ests from others, it will tell you the expected and actual in the assert er= ror in the wrong way. In this way is easier to get assertion errors. [^HADOOP-16161.009.patch] LGTM. +1 pending Yetus. > NetworkTopology#getWeightUsingNetworkLocation return unexpected result > ---------------------------------------------------------------------- > > Key: HADOOP-16161 > URL: https://issues.apache.org/jira/browse/HADOOP-16161 > Project: Hadoop Common > Issue Type: Bug > Components: net > Reporter: He Xiaoqiao > Assignee: He Xiaoqiao > Priority: Major > Attachments: HADOOP-16161.001.patch, HADOOP-16161.002.patch, HADO= OP-16161.003.patch, HADOOP-16161.004.patch, HADOOP-16161.005.patch, HADOOP-= 16161.006.patch, HADOOP-16161.007.patch, HADOOP-16161.008.patch, HADOOP-161= 61.009.patch > > > Consider the following scenario: > 1. there are 4 slaves and topology like: > Rack: /IDC/RACK1 > hostname1 > hostname2 > Rack: /IDC/RACK2 > hostname3 > hostname4 > 2. Reader from hostname1, and calculate weight between reader and [hostna= me1, hostname3, hostname4] by #getWeight, and their corresponding values ar= e [0,4,4] > 3. Reader from client which is not in the topology, and in the same IDC b= ut in none rack of the topology, and calculate weight between reader and [h= ostname1, hostname3, hostname4] by #getWeightUsingNetworkLocation, and thei= r corresponding values are [2,2,2] > 4. Other different Reader can get the similar results. > The weight result for case #3 is obviously not the expected value, the tr= uth is [4,4,4]. this issue may cause reader not really following arrange: l= ocal -> local rack -> remote rack.=20 > After dig the detailed implement, the root cause is #getWeightUsingNetwor= kLocation only calculate distance between Racks rather than hosts. > I think we should add constant 2 to correct the weight of #getWeightUsing= NetworkLocation. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: common-issues-help@hadoop.apache.org