Return-Path: Delivered-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Received: (qmail 31012 invoked from network); 3 Oct 2009 00:50:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Oct 2009 00:50:48 -0000 Received: (qmail 12506 invoked by uid 500); 3 Oct 2009 00:50:48 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 12454 invoked by uid 500); 3 Oct 2009 00:50:48 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 12246 invoked by uid 99); 3 Oct 2009 00:50:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Oct 2009 00:50:47 +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; Sat, 03 Oct 2009 00:50:45 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 8E563234C046 for ; Fri, 2 Oct 2009 17:50:23 -0700 (PDT) Message-ID: <696017828.1254531023582.JavaMail.jira@brutus> Date: Fri, 2 Oct 2009 17:50:23 -0700 (PDT) From: "Konstantin Shvachko (JIRA)" To: hdfs-issues@hadoop.apache.org Subject: [jira] Commented: (HDFS-654) HDFS needs to support new rename introduced for FileContext In-Reply-To: <2121969417.1253840175981.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/HDFS-654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12761789#action_12761789 ] Konstantin Shvachko commented on HDFS-654: ------------------------------------------ # Parameter type {{Options.Rename}} would look better in {{rename()}} methods. # Increment {{ClientProtocol}} version. # import warning in FSDirectory. # Decrement {{LAYOUT_VERSION}} as you introduce new journal record. # I think that the whole stack of old {{rename()}} methods should be deprecated starting from {{DistributedFileSystem.rename(src, dst)}} down to {{FSDirectory.unprotectedRenameTo()}}. Because otherwise people writing tests or pure HDFS applications will not know which rename to use, and may by mistake use the one with the old semantics, which is not desirable. It will also clarify why you did not reuse code for 2 renames, but rather built a whole new branch of methods for the new semantics. # It is better to put comments related to deprecation in JavaDoc under {{/** @deprecated **/}} section. # {{FSEditLog.OP_RENAME}} should be used for the new semantics. The old rename operation should be called {{FSEditLog.OP_RENAME_OLD}} so that we could remove it later. # You should probably verify that old layout images do not contain new rename op. > HDFS needs to support new rename introduced for FileContext > ----------------------------------------------------------- > > Key: HDFS-654 > URL: https://issues.apache.org/jira/browse/HDFS-654 > Project: Hadoop HDFS > Issue Type: New Feature > Affects Versions: 0.21.0 > Reporter: Suresh Srinivas > Assignee: Suresh Srinivas > Attachments: hdfs-654.1.patch, hdfs-654.2.patch, HDFS-654.patch > > > New rename functionality with different semantics to overwrite the existing destination was introduced for use in FileContext. Currently the default implementation in FileSystem is not atomic. This change implements atomic rename operation for use by FileContext. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.