From hdfs-issues-return-217125-archive-asf-public=cust-asf.ponee.io@hadoop.apache.org Thu Apr 19 14:58:04 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id A349618076D for ; Thu, 19 Apr 2018 14:58:03 +0200 (CEST) Received: (qmail 52095 invoked by uid 500); 19 Apr 2018 12:58:02 -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 52076 invoked by uid 99); 19 Apr 2018 12:58:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Apr 2018 12:58:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 0A06C1A0972 for ; Thu, 19 Apr 2018 12:58:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -98.511 X-Spam-Level: X-Spam-Status: No, score=-98.511 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_TIME=3, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id L3VDraLepVJj for ; Thu, 19 Apr 2018 12:58:01 +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 DB16E5F340 for ; Thu, 19 Apr 2018 12:58:00 +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 68A9EE014A for ; Thu, 19 Apr 2018 12:58:00 +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 2C444240C6 for ; Thu, 19 Apr 2018 12:58:00 +0000 (UTC) Date: Thu, 19 Apr 2018 12:58:00 +0000 (UTC) From: "BELUGA BEHR (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-13448) HDFS Block Placement - Ignore Locality for First Block Replica MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HDFS-13448?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1644= 4018#comment-16444018 ]=20 BELUGA BEHR commented on HDFS-13448: ------------------------------------ Compilation passed this time, but unit test failed.=C2=A0 I'm not sure it's= related. > HDFS Block Placement - Ignore Locality for First Block Replica > -------------------------------------------------------------- > > Key: HDFS-13448 > URL: https://issues.apache.org/jira/browse/HDFS-13448 > Project: Hadoop HDFS > Issue Type: New Feature > Components: block placement, hdfs-client > Affects Versions: 2.9.0, 3.0.1 > Reporter: BELUGA BEHR > Assignee: BELUGA BEHR > Priority: Minor > Attachments: HDFS-13448.1.patch, HDFS-13448.2.patch, HDFS-13448.3= .patch, HDFS-13448.4.patch, HDFS-13448.5.patch > > > According to the HDFS Block Place Rules: > {quote} > /** > * The replica placement strategy is that if the writer is on a datanode, > * the 1st replica is placed on the local machine,=20 > * otherwise a random datanode. The 2nd replica is placed on a datanode > * that is on a different rack. The 3rd replica is placed on a datanode > * which is on a different node of the rack as the second replica. > */ > {quote} > However, there is a hint for the hdfs-client that allows the block placem= ent request to not put a block replica on the local datanode _where 'local'= means the same host as the client is being run on._ > {quote} > /** > * Advise that a block replica NOT be written to the local DataNode whe= re > * 'local' means the same host as the client is being run on. > * > * @see CreateFlag#NO_LOCAL_WRITE > */ > {quote} > I propose that we add a new flag that allows the hdfs-client to request t= hat the first block replica be placed on a random DataNode in the cluster. = The subsequent block replicas should follow the normal block placement rul= es. > The issue is that when the {{NO_LOCAL_WRITE}} is enabled, the first block= replica is not placed on the local node, but it is still placed on the loc= al rack. Where this comes into play is where you have, for example, a flum= e agent that is loading data into HDFS. > If the Flume agent is running on a DataNode, then by default, the DataNod= e local to the Flume agent will always get the first block replica and this= leads to un-even block placements, with the local node always filling up f= aster than any other node in the cluster. > Modifying this example, if the DataNode is removed from the host where th= e Flume agent is running, or this {{NO_LOCAL_WRITE}} is enabled by Flume, t= hen the default block placement policy will still prefer the local rack. T= his remedies the situation only so far as now the first block replica will = always be distributed to a DataNode on the local rack. > This new flag would allow a single Flume agent to distribute the blocks r= andomly, evenly, over the entire cluster instead of hot-spotting the local = node or the local rack. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org