Return-Path: X-Original-To: apmail-hadoop-hdfs-dev-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D429E92D9 for ; Fri, 23 Mar 2012 00:42:01 +0000 (UTC) Received: (qmail 32502 invoked by uid 500); 23 Mar 2012 00:42:01 -0000 Delivered-To: apmail-hadoop-hdfs-dev-archive@hadoop.apache.org Received: (qmail 32430 invoked by uid 500); 23 Mar 2012 00:42:01 -0000 Mailing-List: contact hdfs-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-dev@hadoop.apache.org Delivered-To: mailing list hdfs-dev@hadoop.apache.org Received: (qmail 32420 invoked by uid 99); 23 Mar 2012 00:42:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Mar 2012 00:42:01 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of eli@cloudera.com designates 209.85.214.48 as permitted sender) Received: from [209.85.214.48] (HELO mail-bk0-f48.google.com) (209.85.214.48) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Mar 2012 00:41:55 +0000 Received: by bkcji17 with SMTP id ji17so3384217bkc.35 for ; Thu, 22 Mar 2012 17:41:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding:x-gm-message-state; bh=lWEsTcVWgHdTrRCFMyiF0Kzo8WjwC+1oRHqVI18XtE4=; b=TAjvJ5e8WGUjJmoskhnjD5VxjqpuARoAgnjnG1uo1JsEd/O9/0ftedmk34kXzsdTMu PP3zaNa0vOm8YplQNZ6HQYvO/o9lisWVSs23+1PVejKP5r/cvoml1K9C6R7Fm+7L5gMf 4jktBuzyTE78McE0Lkhmhuvru5qEQkkOPnpMYQBFhAzlc6W2o/3UdLH4JIYLGELsPrmg ADcG6CH+ocaK5wJ15HkTdyNmpXkeYvK9jr5vLOS+DUrOmcFm/MoiY5RMHvKZpmpKsCZ/ 4YDKGlhBt7rj1keZBEg0J948jsdbINWUEyjZEiNSB0ldicoszFh/mtj3CTUr4051RjlK hmYQ== MIME-Version: 1.0 Received: by 10.204.153.219 with SMTP id l27mr3926604bkw.126.1332463294576; Thu, 22 Mar 2012 17:41:34 -0700 (PDT) Received: by 10.204.227.201 with HTTP; Thu, 22 Mar 2012 17:41:34 -0700 (PDT) In-Reply-To: References: Date: Thu, 22 Mar 2012 17:41:34 -0700 Message-ID: Subject: Re: [DISCUSS] Remove append? From: Eli Collins To: hdfs-dev@hadoop.apache.org Cc: szetszwo@yahoo.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQni6NIObsRmC+Z9Hj63NRac+OexQgk6nGTsdqjRF64TYbRsrQxieVB+FDGOnv50Dm424FzI X-Virus-Checked: Checked by ClamAV on apache.org On Thu, Mar 22, 2012 at 4:27 PM, wrote: > Eli, > > I think by "current definition of visible length", you mean that once a > client opens a file and gets block list, it will always be able to read u= p > to the length at open. > I was thinking of the definition from the design doc. See my last comment on HDFS-2288, part of the confusion is that we're using the same name for two different things. > However, correct me if I am wrong, but this definition is already > violated, if file is deleted after open. I think you're right. > So, truncate does add some complexity, but not a whole lot. If client get= s > an EOF before length at open, it must retry to see if the new visible > length is different (rather than to see if the file does not exist > anymore). > > Right ? > Makes sense. I was thinking you were talking about truncate on open files, which be harder. You can already truncate a file on open, you just can't choose the offset you want to truncate at (the NN implements this by deleting the file). Thanks, Eli > > --- > Milind Bhandarkar > Greenplum Labs, EMC > (Disclaimer: Opinions expressed in this email are those of the author, an= d > do not necessarily represent the views of any organization, past or > present, the author might be affiliated with.) > > > > On 3/22/12 4:03 PM, "Eli Collins" wrote: > >>On Thu, Mar 22, 2012 at 3:57 PM, Tsz Wo Sze wrote: >>>> Do you think having the invariant that blocks are not mutated would >>>> significantly simply the design? >>> >>> No. =A0As mentioned in my previous email and others, the complexity is = in >>>hflush. =A0Once we have hflush, append is straightforward. >> >>I understand that append is a small delta once you have hflush, what >>I'm saying is that the overall design of the file system is >>significantly simplified if you can assume blocks are not mutated. Eg >>see the way truncate is going to interact with the current definition >>of visible length (it violates it). Resolving issues like that are >>non-trivial. >> >>Thanks, >>Eli >> >