Return-Path: Delivered-To: apmail-hadoop-core-dev-archive@www.apache.org Received: (qmail 81651 invoked from network); 17 Jun 2009 00:28:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Jun 2009 00:28:19 -0000 Received: (qmail 35065 invoked by uid 500); 17 Jun 2009 00:28:29 -0000 Delivered-To: apmail-hadoop-core-dev-archive@hadoop.apache.org Received: (qmail 35024 invoked by uid 500); 17 Jun 2009 00:28:29 -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 35014 invoked by uid 99); 17 Jun 2009 00:28:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Jun 2009 00:28:29 +0000 X-ASF-Spam-Status: No, hits=-1998.9 required=10.0 tests=ALL_TRUSTED,FB_GET_MEDS 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; Wed, 17 Jun 2009 00:28:27 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 6C0C629A0012 for ; Tue, 16 Jun 2009 17:28:07 -0700 (PDT) Message-ID: <2101865180.1245198487441.JavaMail.jira@brutus> Date: Tue, 16 Jun 2009 17:28:07 -0700 (PDT) From: "Michele (aka pirroh) Catasta (JIRA)" To: core-dev@hadoop.apache.org Subject: [jira] Issue Comment Edited: (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=12720438#action_12720438 ] Michele (aka pirroh) Catasta edited comment on HADOOP-2366 at 6/16/09 5:27 PM: ------------------------------------------------------------------------------- I attached a separate patch which exposes a getTrimmedStrings() method and modifies only the behavior of the Datanode. When the property value is empty, the behavior of getTrimmedStrings is by purpose different from getStrings(). I'd rather pass an empty array which is handled correctly by Datanode.instance(), than a null which causes NPE. Just let me know if you want me to fix this behavior and make it consistent with the other methods, mine was just a proposal. Todd: I run a whole ant clean test cycle with the other patch, and it fails anyway. I gave a shallow look with greps on getStrings() when I was attaching the first version, and I had your same impression. Actually, after that fix you suggested, I was expecting the tests to run smoothly, but probably there's something missing still. I'll leave the patch attached, in case it could be useful. Tsz Wo: thanks for the hints. run-test-core was successful, hope will be the same with the Hudson build. was (Author: pirroh): I attached a separate patch which exposes a getTrimmedStrings() method and modifies only the behavior of the Datanode. When the property value is empty, the behavior of getTrimmedStrings is by purpose different from getStrings(). I'd rather pass an empty array which is handled correctly by Datanode.instance(), than a null which causes NPE. Just let me know if you want me to fix this behavior and make it consistent with the other methods, mine was just a purpose. Todd: I run a whole ant clean test cycle with the other patch, and it fails anyway. I gave a shallow look with greps on getStrings() when I was attaching the first version, and I had your same impression. Actually, after that fix you suggested, I was expecting smooth tests, but probably there's something missing still. I'll leave the patch attached, in case it could be useful. Tsz Wo: thanks for the hints. run-test-core was successful, hope will be the same with the Hudson build. > 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-trimmed.patch, 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.