Return-Path: Delivered-To: apmail-hadoop-core-dev-archive@www.apache.org Received: (qmail 35425 invoked from network); 11 May 2009 21:43:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 11 May 2009 21:43:09 -0000 Received: (qmail 92546 invoked by uid 500); 11 May 2009 21:43:08 -0000 Delivered-To: apmail-hadoop-core-dev-archive@hadoop.apache.org Received: (qmail 92492 invoked by uid 500); 11 May 2009 21:43:08 -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 92482 invoked by uid 99); 11 May 2009 21:43:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 May 2009 21:43:07 +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; Mon, 11 May 2009 21:43:05 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 8F9B3234C004 for ; Mon, 11 May 2009 14:42:45 -0700 (PDT) Message-ID: <725919812.1242078165573.JavaMail.jira@brutus> Date: Mon, 11 May 2009 14:42:45 -0700 (PDT) From: "Rodrigo Schmidt (JIRA)" To: core-dev@hadoop.apache.org Subject: [jira] Commented: (HADOOP-5762) distcp does not copy empty directories In-Reply-To: <1221560255.1241140530448.JavaMail.jira@brutus> 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-5762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12708237#action_12708237 ] Rodrigo Schmidt commented on HADOOP-5762: ----------------------------------------- It could be done. Actually, my first attempt to fix this bug did exactly that. Then I noticed that method copy() was already programmed to copy empty directories and, except for the root source, directories were being added to src_writer on method setup. I think it's a good design option to let copy be the only method that actually writes something to the destination. This makes the code simpler and more elegant (thus, more maintainable). I'm don't like the idea of creating only the root src directory (in case it's empty) on setup(). It just doesn't look good. And creating all empty src subdirectories on setup might force us to do a lot of extra checking on setup to cope with failures (checks that already exist on copy()). I don't think many people will be using distcp to copy empty directories and it doesn't look like the performance gain will compensate the loss in code simplicity. > distcp does not copy empty directories > -------------------------------------- > > Key: HADOOP-5762 > URL: https://issues.apache.org/jira/browse/HADOOP-5762 > Project: Hadoop Core > Issue Type: Bug > Components: tools/distcp > Reporter: dhruba borthakur > Assignee: Rodrigo Schmidt > Fix For: site > > Attachments: HADOOP-5762.patch > > > If I have an empty directory /testdir1 and then I run the command bin/hadoop distcp /testdir1 /testdir2, the command completes successfully, but does not create the empty directory /testdir2. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.