From issues-return-23734-apmail-hive-issues-archive=hive.apache.org@hive.apache.org Mon Nov 9 19:34:11 2015 Return-Path: X-Original-To: apmail-hive-issues-archive@minotaur.apache.org Delivered-To: apmail-hive-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 2EBCD18823 for ; Mon, 9 Nov 2015 19:34:11 +0000 (UTC) Received: (qmail 17611 invoked by uid 500); 9 Nov 2015 19:34:11 -0000 Delivered-To: apmail-hive-issues-archive@hive.apache.org Received: (qmail 17584 invoked by uid 500); 9 Nov 2015 19:34:11 -0000 Mailing-List: contact issues-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 issues@hive.apache.org Received: (qmail 17571 invoked by uid 99); 9 Nov 2015 19:34:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Nov 2015 19:34:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id EF2812C1F57 for ; Mon, 9 Nov 2015 19:34:10 +0000 (UTC) Date: Mon, 9 Nov 2015 19:34:10 +0000 (UTC) From: "Ashutosh Chauhan (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-4577) hive CLI can't handle hadoop dfs command with space and quotes. 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/HIVE-4577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14997208#comment-14997208 ] Ashutosh Chauhan commented on HIVE-4577: ---------------------------------------- Hadoop FsShell is passed in token[] using GenericOptionsParser to parse the string. https://github.com/apache/hadoop/blob/release-2.6.0/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/ToolRunner.java#L64 I think instead of adding custom splitCmd() to parse it, using GenericOptionsParser will make us consistent with Hadoop's parsing code. > hive CLI can't handle hadoop dfs command with space and quotes. > ---------------------------------------------------------------- > > Key: HIVE-4577 > URL: https://issues.apache.org/jira/browse/HIVE-4577 > Project: Hive > Issue Type: Bug > Components: CLI > Affects Versions: 0.9.0, 0.10.0, 0.14.0, 0.13.1, 1.2.0, 1.1.0 > Reporter: Bing Li > Assignee: Bing Li > Attachments: HIVE-4577.1.patch, HIVE-4577.2.patch, HIVE-4577.3.patch.txt, HIVE-4577.4.patch > > > As design, hive could support hadoop dfs command in hive shell, like > hive> dfs -mkdir /user/biadmin/mydir; > but has different behavior with hadoop if the path contains space and quotes > hive> dfs -mkdir "hello"; > drwxr-xr-x - biadmin supergroup 0 2013-04-23 09:40 /user/biadmin/"hello" > hive> dfs -mkdir 'world'; > drwxr-xr-x - biadmin supergroup 0 2013-04-23 09:43 /user/biadmin/'world' > hive> dfs -mkdir "bei jing"; > drwxr-xr-x - biadmin supergroup 0 2013-04-23 09:44 /user/biadmin/"bei > drwxr-xr-x - biadmin supergroup 0 2013-04-23 09:44 /user/biadmin/jing" -- This message was sent by Atlassian JIRA (v6.3.4#6332)