Return-Path: X-Original-To: apmail-hive-dev-archive@www.apache.org Delivered-To: apmail-hive-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8DEF910C9C for ; Wed, 19 Mar 2014 01:25:47 +0000 (UTC) Received: (qmail 89801 invoked by uid 500); 19 Mar 2014 01:25:45 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 89677 invoked by uid 500); 19 Mar 2014 01:25:45 -0000 Mailing-List: contact dev-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list dev@hive.apache.org Received: (qmail 89666 invoked by uid 99); 19 Mar 2014 01:25:45 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Mar 2014 01:25:45 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 5368A1D54D2; Wed, 19 Mar 2014 01:25:42 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============4641088450262782953==" MIME-Version: 1.0 Subject: Re: Review Request 19322: HIVE-6685 Beeline throws ArrayIndexOutOfBoundsException for mismatched arguments From: "Szehon Ho" To: "Xuefu Zhang" Cc: "Szehon Ho" , "Xuefu Zhang" , "hive" Date: Wed, 19 Mar 2014 01:25:42 -0000 Message-ID: <20140319012542.27430.82912@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "Szehon Ho" X-ReviewGroup: hive X-ReviewRequest-URL: https://reviews.apache.org/r/19322/ X-Sender: "Szehon Ho" References: <20140317214144.27430.93029@reviews.apache.org> In-Reply-To: <20140317214144.27430.93029@reviews.apache.org> Reply-To: "Szehon Ho" X-ReviewRequest-Repository: hive-git --===============4641088450262782953== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/19322/ ----------------------------------------------------------- (Updated March 19, 2014, 1:25 a.m.) Review request for hive and Xuefu Zhang. Changes ------- Refactored the arg-passing from manual list iteration, to use a simple extension of GNUParser. Mostly borrowing the code from HiveCLI. It is needed to extend the GNUParser because they dont support unknown arguments. In beeline case, these are the 'property-files' and the reflectively-set BeelineOpts like 'autoCommit', etc. Adding a unit test to verify the parsing doesn't break anything. Bugs: HIVE-6685 https://issues.apache.org/jira/browse/HIVE-6685 Repository: hive-git Description ------- Improving the error-handling in ArrayIndexOutOfBoundsException of Beeline. Diffs (updated) ----- beeline/src/java/org/apache/hive/beeline/BeeLine.java 3482186 beeline/src/test/org/apache/hive/beeline/TestBeelineArgParsing.java PRE-CREATION Diff: https://reviews.apache.org/r/19322/diff/ Testing ------- Manual test. Now, in this scenario it will display the usage like: beeline -u Usage: java org.apache.hive.cli.beeline.BeeLine -u the JDBC URL to connect to -n the username to connect as -p the password to connect as ... Thanks, Szehon Ho --===============4641088450262782953==--