Return-Path: X-Original-To: apmail-hadoop-hdfs-dev-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8950C18B4E for ; Thu, 5 Nov 2015 03:36:35 +0000 (UTC) Received: (qmail 50981 invoked by uid 500); 5 Nov 2015 03:36:28 -0000 Delivered-To: apmail-hadoop-hdfs-dev-archive@hadoop.apache.org Received: (qmail 50505 invoked by uid 500); 5 Nov 2015 03:36:28 -0000 Mailing-List: contact hdfs-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-dev@hadoop.apache.org Delivered-To: mailing list hdfs-dev@hadoop.apache.org Received: (qmail 50144 invoked by uid 99); 5 Nov 2015 03:36:27 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Nov 2015 03:36:27 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id C69C42C1F63 for ; Thu, 5 Nov 2015 03:36:27 +0000 (UTC) Date: Thu, 5 Nov 2015 03:36:27 +0000 (UTC) From: "Mingliang Liu (JIRA)" To: hdfs-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HDFS-9379) Make NNThroughputBenchmark support more than 10 numThreads MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Mingliang Liu created HDFS-9379: ----------------------------------- Summary: Make NNThroughputBenchmark support more than 10 numThreads Key: HDFS-9379 URL: https://issues.apache.org/jira/browse/HDFS-9379 Project: Hadoop HDFS Issue Type: Improvement Components: namenode Reporter: Mingliang Liu Assignee: Mingliang Liu Currently, the {{NNThroughputBenchmark}} relies on sorted {{datanodes}} array in the lexicographical order of datanode's {{xferAddr}}. * There is an assertion of datanode's {{xferAddr}} lexicographical order when filling the {{datanodes}}, see [the code|https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/NNThroughputBenchmark.java#L1152]. * When searching the datanode by {{DatanodeInfo}}, it uses binary search against the {{datanodes}} array, see [the code|https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/NNThroughputBenchmark.java#L1187] In {{DatanodeID}}, the {{xferAddr}} is defined as {{host:port}}. In {{NNThroughputBenchmark}}, the port is simply _the index of the tiny datanode_ plus one. The problem here is that, when there are more than 9 tiny datanodes ({{numThreads}}), the lexicographical order of datanode's {{xferAddr}} will be invalid as the string value of datanode index is not in lexicographical order any more. For example, {code} ... 192.168.54.40:8 192.168.54.40:9 192.168.54.40:10 192.168.54.40:11 ... {code} {{192.168.54.40:9}} is greater than {{192.168.54.40:10}}. The assertion will fail and the binary search won't work. The simple fix is to calculate the datanode index by port directly, instead of using binary search. -- This message was sent by Atlassian JIRA (v6.3.4#6332)