Return-Path: Delivered-To: apmail-hadoop-core-dev-archive@www.apache.org Received: (qmail 62196 invoked from network); 14 Jun 2009 01:08:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 14 Jun 2009 01:08:21 -0000 Received: (qmail 53836 invoked by uid 500); 14 Jun 2009 01:08:32 -0000 Delivered-To: apmail-hadoop-core-dev-archive@hadoop.apache.org Received: (qmail 53770 invoked by uid 500); 14 Jun 2009 01:08:31 -0000 Mailing-List: contact core-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: core-dev@hadoop.apache.org Delivered-To: mailing list core-dev@hadoop.apache.org Received: (qmail 53760 invoked by uid 99); 14 Jun 2009 01:08:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 14 Jun 2009 01:08:31 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 14 Jun 2009 01:08:28 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 9D247234C004 for ; Sat, 13 Jun 2009 18:08:07 -0700 (PDT) Message-ID: <441465677.1244941687629.JavaMail.jira@brutus> Date: Sat, 13 Jun 2009 18:08:07 -0700 (PDT) From: "Todd Lipcon (JIRA)" To: core-dev@hadoop.apache.org Subject: [jira] Commented: (HADOOP-2366) Space in the value for dfs.data.dir can cause great problems MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HADOOP-2366?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12719212#action_12719212 ] Todd Lipcon commented on HADOOP-2366: ------------------------------------- Patch looks OK, but why not use str.split("\\s*,\\s*") as suggested by Craig above? Then you can simply use Arrays.asList and not have to iterate over the split array to create an ArrayList. > Space in the value for dfs.data.dir can cause great problems > ------------------------------------------------------------ > > Key: HADOOP-2366 > URL: https://issues.apache.org/jira/browse/HADOOP-2366 > Project: Hadoop Core > Issue Type: Bug > Components: conf > Reporter: Ted Dunning > Assignee: Todd Lipcon > Attachments: HADOOP-2366.patch > > > The following configuration causes problems: > > dfs.data.dir > /mnt/hstore2/hdfs, /home/foo/dfs > > Determines where on the local filesystem an DFS data node should store its bl > ocks. If this is a comma-delimited list of directories, then data will be stor > ed in all named directories, typically on different devices. Directories that > do not exist are ignored. > > > The problem is that the space after the comma causes the second directory for storage to be " /home/foo/dfs" which is in a directory named which contains a sub-dir named "home" in the hadoop datanodes default directory. This will typically cause the user's home partition to fill, but will be very hard for the user to understand since a directory with a whitespace name is hard to understand. > My proposed solution would be to trimLeft all path names from this and similar property after splitting on comma. This still allows spaces in file and directory names but avoids this problem. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.