Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 8ADDF200C32 for ; Wed, 22 Feb 2017 19:43:50 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 89752160B49; Wed, 22 Feb 2017 18:43:50 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id CB585160B62 for ; Wed, 22 Feb 2017 19:43:49 +0100 (CET) Received: (qmail 67841 invoked by uid 500); 22 Feb 2017 18:43:48 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 67791 invoked by uid 99); 22 Feb 2017 18:43:48 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Feb 2017 18:43:48 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 7466E18E16D for ; Wed, 22 Feb 2017 18:43:48 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.199 X-Spam-Level: X-Spam-Status: No, score=-1.199 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 3lGNvKvHEYU7 for ; Wed, 22 Feb 2017 18:43:47 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 08D8C618AA for ; Wed, 22 Feb 2017 18:43:47 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 76A16E0BD5 for ; Wed, 22 Feb 2017 18:43:45 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 7B02824140 for ; Wed, 22 Feb 2017 18:43:44 +0000 (UTC) Date: Wed, 22 Feb 2017 18:43:44 +0000 (UTC) From: "Manoj Govindassamy (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-11435) NameNode should track open for write files lengths more frequent than on newer block allocations MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 22 Feb 2017 18:43:50 -0000 [ https://issues.apache.org/jira/browse/HDFS-11435?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1587= 8952#comment-15878952 ]=20 Manoj Govindassamy commented on HDFS-11435: ------------------------------------------- Thanks [~linyiqun] for the reference to HDFS-11194. Will take a look. [~raviprak],=20 I get your points. On normal circumstances, we will not be needing the _nea= r_ realtime lengths of OPEN_FOR_WRITE files. If at all needed, as Jing poin= ted out, there are already provisions for clients to reach out to DataNodes= directly to find the the latest lengths for a being written file. The inte= ntion here is not check the progress of a slow writer. I believe the curren= t LeaseManager soft/hard lease limits are good enough for tackling very slo= w writer issues. The intention of this jira is to close a gap in HDFS Snapshots w.r.t open f= iles. As many other metadata only operations, HDFS Snapshots are NameNode o= nly operations and there by the file lengths captured are as good as what i= s available in NN at the Snapshot time. So, for the files that are open and= being written, NN lags the latest file lengths by as much as a block size = and there by these open files that are captured in Snapshots have incorrect= lengths. The current behavior of HDFS Snapshots is to let these open files= in the Snapshots also grow/shrink just like the original file, and finaliz= e it only after its open file is closed. Thus HDFS Snapshots are not truly = _read-only_ w.r.t open files. HDFS -11402 attempts to close this gap and ma= ke HDFS Snapshots truly read-only by freezing these open files in Snapshots= via meta data copy. To make the design proposed in above jira more reliabl= e, we need NN getting to know lengths of open files more frequently than th= e current model. More discussions on this are available in HDFS-11402. Plea= se let me know if you need more details.=20 > NameNode should track open for write files lengths more frequent than on = newer block allocations > -------------------------------------------------------------------------= ----------------------- > > Key: HDFS-11435 > URL: https://issues.apache.org/jira/browse/HDFS-11435 > Project: Hadoop HDFS > Issue Type: Improvement > Reporter: Manoj Govindassamy > Assignee: Manoj Govindassamy > > *Problem:* > Currently the length of an open for write / Under construction file is up= dated on the NameNode only when=20 > # Block boundary: On block boundaries and upon allocation of new Block, N= ameNode gets to know the file growth and the file length catches up > # hsync(SyncFlag.UPDATE_LENGTH): Upon Client apps invoking a hsync on the= write stream with a special flag, DataNodes send an incremental block repo= rt with the latest file length which NameNode uses it to update its meta da= ta. > # First hflush() on the new Block: Upon Client apps doing first time hflu= sh() on an every new Block, DataNodes notifies NameNode about the latest fi= le length. > # Output stream close: Forces DataNodes update NameNode about the file le= ngth after data persistence and proper acknowledgements in the pipeline. > So, lengths for open for write files are usually a lot less than the leng= th seen by the DN/client. Highly preferred to have NameNode not lagging in = file lengths by order of Block size for under construction files and to hav= e more frequent, scalable update mechanism for these open file lengths.=20 -- This message was sent by Atlassian JIRA (v6.3.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org