Return-Path: X-Original-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-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 D6764C7FB for ; Mon, 22 Dec 2014 01:37:15 +0000 (UTC) Received: (qmail 59519 invoked by uid 500); 22 Dec 2014 01:37:15 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 59467 invoked by uid 500); 22 Dec 2014 01:37:15 -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 59455 invoked by uid 99); 22 Dec 2014 01:37:15 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Dec 2014 01:37:15 +0000 Date: Mon, 22 Dec 2014 01:37:15 +0000 (UTC) From: "Konstantin Shvachko (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HDFS-7056) Snapshot support for truncate 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/HDFS-7056?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Konstantin Shvachko updated HDFS-7056: -------------------------------------- Attachment: HDFS-7056-13.patch Here is what we did in the new patch. - Jing it was very good catch with persisting snapshot blocks into fsimage. My fault. I thought it was covered by our tests, because we have a bunch of restarts, but it turned out restart does not save the image as it used before. New patch persists snapshot blocks and adds a test case, which explicitly saves namespace before restarting. - Also bumped up the NameNode layout version. - Added optimized {{findLaterSnapshotBlocks()}} - Did the renames requested by Colin. - Added default value for the newBlockId field. -- This actually raised a question for me how it will work with rolling upgrades. Thinking about it. - Colin, I did not introduce enum as the return value. I would have if there were three or more values or a potential to have more. But its exactly two. You are right we cannot change {{recoverLease()}} now. So it is better to have the same pattern in {{truncate()}} to avoid even more confusion why this is done differently in two cases. Anyways we clearly disagree, so it would be good if anybody esle could weigh on the subject. > Snapshot support for truncate > ----------------------------- > > Key: HDFS-7056 > URL: https://issues.apache.org/jira/browse/HDFS-7056 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: namenode > Affects Versions: 3.0.0 > Reporter: Konstantin Shvachko > Assignee: Plamen Jeliazkov > Attachments: HDFS-3107-HDFS-7056-combined.patch, HDFS-3107-HDFS-7056-combined.patch, HDFS-3107-HDFS-7056-combined.patch, HDFS-3107-HDFS-7056-combined.patch, HDFS-3107-HDFS-7056-combined.patch, HDFS-3107-HDFS-7056-combined.patch, HDFS-3107-HDFS-7056-combined.patch, HDFS-3107-HDFS-7056-combined.patch, HDFS-3107-HDFS-7056-combined.patch, HDFS-7056-13.patch, HDFS-7056.patch, HDFS-7056.patch, HDFS-7056.patch, HDFS-7056.patch, HDFS-7056.patch, HDFS-7056.patch, HDFS-7056.patch, HDFS-7056.patch, HDFSSnapshotWithTruncateDesign.docx > > > Implementation of truncate in HDFS-3107 does not allow truncating files which are in a snapshot. It is desirable to be able to truncate and still keep the old file state of the file in the snapshot. -- This message was sent by Atlassian JIRA (v6.3.4#6332)