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 9D1B418468 for ; Tue, 17 Nov 2015 01:31:11 +0000 (UTC) Received: (qmail 90879 invoked by uid 500); 17 Nov 2015 01:31:11 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 90823 invoked by uid 500); 17 Nov 2015 01:31:11 -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 90560 invoked by uid 99); 17 Nov 2015 01:31:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Nov 2015 01:31:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 2DEE02C1F6C for ; Tue, 17 Nov 2015 01:31:11 +0000 (UTC) Date: Tue, 17 Nov 2015 01:31:11 +0000 (UTC) From: "Hudson (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-9387) Fix namenodeUri parameter parsing in NNThroughputBenchmark 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-9387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15007771#comment-15007771 ] Hudson commented on HDFS-9387: ------------------------------ FAILURE: Integrated in Hadoop-Mapreduce-trunk #2611 (See [https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2611/]) HDFS-9387. Fix namenodeUri parameter parsing in NNThroughputBenchmark. (xyao: rev 2701f2d2558f3ade879539f3f7bedf749709f2f1) * hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/NNThroughputBenchmark.java * hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt > Fix namenodeUri parameter parsing in NNThroughputBenchmark > ---------------------------------------------------------- > > Key: HDFS-9387 > URL: https://issues.apache.org/jira/browse/HDFS-9387 > Project: Hadoop HDFS > Issue Type: Bug > Components: namenode > Reporter: Mingliang Liu > Assignee: Mingliang Liu > Fix For: 2.8.0 > > Attachments: HDFS-9387.000.patch > > > In {{NNThroughputBenchmark$OperationStatsBase#verifyOpArgument()}}, the {{namenodeUri}} is always parsed from {{-namenode}} argument. This works just fine if the {{-op}} parameter is not {{all}}, as the single benchmark will need to parse the {{namenodeUri}} from args anyway. > When the {{-op}} is {{all}}, namely all sub-benchmark will run, multiple sub-benchmark will call the {{verifyOpArgument()}} method. In this case, the first sub-benchmark reads the {{namenode}} argument and removes it from args. The other sub-benchmarks will thereafter read {{null}} value since the argument is removed. This contradicts the intension of providing {{namenode}} for all sub-benchmarks. > {code:title=current code} > try { > namenodeUri = StringUtils.popOptionWithArgument("-namenode", args); > } catch (IllegalArgumentException iae) { > printUsage(); > } > {code} > The fix is to parse the {{namenodeUri}}, which is shared by all sub-benchmarks, from {{-namenode}} argument only once. This follows the convention of parsing other global arguments in {{OperationStatsBase#verifyOpArgument()}}. > {code:title=simple fix} > if (args.indexOf("-namenode") >= 0) { > try { > namenodeUri = StringUtils.popOptionWithArgument("-namenode", args); > } catch (IllegalArgumentException iae) { > printUsage(); > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)