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 9299C10E17 for ; Fri, 28 Feb 2014 21:33:28 +0000 (UTC) Received: (qmail 7524 invoked by uid 500); 28 Feb 2014 21:33:24 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 7387 invoked by uid 500); 28 Feb 2014 21:33:22 -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 7266 invoked by uid 99); 28 Feb 2014 21:33:20 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Feb 2014 21:33:20 +0000 Date: Fri, 28 Feb 2014 21:33:20 +0000 (UTC) From: "Haohui Mai (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-5866) '-maxSize' and '-step' option fail in OfflineImageViewer 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-5866?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13916416#comment-13916416 ] Haohui Mai commented on HDFS-5866: ---------------------------------- It seems to me that the unit test only needs to test whether it accepts the command line. I suggest moving the code from the {{main()}} function into a {{run()}} function, which returns an integer as a status code. Then the unit test can looks like this: {code} int status = OfflineImageViewerPB.run(new String[] { "-i", originalFsImage.getAbsolutePath(), "-o", "-", "-p", "FileDistribution", "-maxSize", "512", "-step", "8"}); Assert.assertEquals(0, status); {code} > '-maxSize' and '-step' option fail in OfflineImageViewer > -------------------------------------------------------- > > Key: HDFS-5866 > URL: https://issues.apache.org/jira/browse/HDFS-5866 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: tools > Affects Versions: 3.0.0, 2.2.0 > Reporter: Akira AJISAKA > Assignee: Akira AJISAKA > Attachments: HDFS-5866.2.patch, HDFS-5866.3.patch, HDFS-5866.patch > > > Executing -step or/and -maxSize option will get the following error: > {code} > $ hdfs oiv -p FileDistribution -step 102400 -i input -o output > Error parsing command-line options: > Usage: bin/hdfs oiv [OPTIONS] -i INPUTFILE -o OUTPUTFILE > {code} -- This message was sent by Atlassian JIRA (v6.1.5#6160)