Return-Path: X-Original-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-common-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 BFD2B11184 for ; Mon, 11 Aug 2014 18:46:12 +0000 (UTC) Received: (qmail 46710 invoked by uid 500); 11 Aug 2014 18:46:12 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 46665 invoked by uid 500); 11 Aug 2014 18:46:12 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-issues@hadoop.apache.org Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 46652 invoked by uid 99); 11 Aug 2014 18:46:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Aug 2014 18:46:12 +0000 Date: Mon, 11 Aug 2014 18:46:12 +0000 (UTC) From: "zhihai xu (JIRA)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HADOOP-10820) Empty entry in libjars results in working directory being recursively localized 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/HADOOP-10820?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14093139#comment-14093139 ] zhihai xu commented on HADOOP-10820: ------------------------------------ A filename with only space character are valid. So my suggestion is not good. We should't trim space when check empty string. > Empty entry in libjars results in working directory being recursively localized > ------------------------------------------------------------------------------- > > Key: HADOOP-10820 > URL: https://issues.apache.org/jira/browse/HADOOP-10820 > Project: Hadoop Common > Issue Type: Bug > Affects Versions: 2.2.0 > Reporter: Alex Holmes > Priority: Minor > Attachments: HADOOP-10820-1.patch, HADOOP-10820.patch > > > An empty token (e.g. "a.jar,,b.jar") in the -libjars option causes the current working directory to be recursively localized. > Here's an example of this in action (using Hadoop 2.2.0): > {code} > # create a temp directory and touch three JAR files > mkdir -p tmp/path && cd tmp && touch a.jar b.jar c.jar path/d.jar > # Run an example job only specifying two of the JARs. > # Include an empty entry in libjars. > hadoop jar /usr/local/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.2.0.jar pi -libjars a.jar,,c.jar 2 1000000000 > # As the job is running examine the localized directory in HDFS. > # Notice that not only are the two JAR's specified in libjars copied, > # but in addition the contents of the working directory are also recursively copied. > $ hadoop fs -lsr /tmp/hadoop-yarn/staging/aholmes/.staging/job_1404752711144_0018/libjars > /tmp/hadoop-yarn/staging/aholmes/.staging/job_1404752711144_0018/libjars/a.jar > /tmp/hadoop-yarn/staging/aholmes/.staging/job_1404752711144_0018/libjars/c.jar > /tmp/hadoop-yarn/staging/aholmes/.staging/job_1404752711144_0018/libjars/tmp > /tmp/hadoop-yarn/staging/aholmes/.staging/job_1404752711144_0018/libjars/tmp/a.jar > /tmp/hadoop-yarn/staging/aholmes/.staging/job_1404752711144_0018/libjars/tmp/b.jar > /tmp/hadoop-yarn/staging/aholmes/.staging/job_1404752711144_0018/libjars/tmp/c.jar > /tmp/hadoop-yarn/staging/aholmes/.staging/job_1404752711144_0018/libjars/tmp/path > /tmp/hadoop-yarn/staging/aholmes/.staging/job_1404752711144_0018/libjars/tmp/path/d.jar > {code} -- This message was sent by Atlassian JIRA (v6.2#6252)