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 C4535200B36 for ; Wed, 22 Jun 2016 00:40:00 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id C28EF160A69; Tue, 21 Jun 2016 22:40:00 +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 1430D160A4F for ; Wed, 22 Jun 2016 00:39:59 +0200 (CEST) Received: (qmail 99239 invoked by uid 500); 21 Jun 2016 22:39:58 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 99187 invoked by uid 99); 21 Jun 2016 22:39:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Jun 2016 22:39:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 4912D2C1F7A for ; Tue, 21 Jun 2016 22:39:58 +0000 (UTC) Date: Tue, 21 Jun 2016 22:39:58 +0000 (UTC) From: "Lei (Eddy) Xu (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-10551) o.a.h.h.s.diskbalancer.command.Command does not actually verify options as expected. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 21 Jun 2016 22:40:00 -0000 [ https://issues.apache.org/jira/browse/HDFS-10551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15342936#comment-15342936 ] Lei (Eddy) Xu commented on HDFS-10551: -------------------------------------- Ok, please do so. > o.a.h.h.s.diskbalancer.command.Command does not actually verify options as expected. > ------------------------------------------------------------------------------------ > > Key: HDFS-10551 > URL: https://issues.apache.org/jira/browse/HDFS-10551 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: datanode > Reporter: Lei (Eddy) Xu > Assignee: Anu Engineer > Priority: Critical > Attachments: HDFS-10551-HDFS-1312.001.patch > > > In {{diskbalancer.command.Command#verifyCommandOptions}}. The following code does not do what it expected to do: > {code} > if (!validArgs.containsKey(opt.getArgName())) { > {code} > opt.getArgName() always returns "arg" instead of i.e., {{report}} or {{uri}}, which is the expected parameter to check. > It should use {{opt.getLongOpt()}} to get the option names. It can pass on the branch because {{opt.getArgName()}} always returns {{"arg"}}, which is accidently in {{validArgs}}. However I don't think it is the intention for this function. > Additionally, in the following code > {code} > validArguments.append("Valid arguments are : %n"); > {code} > This {{%n}} is not used. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org