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 0ABC4200C47 for ; Thu, 30 Mar 2017 22:27:06 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 09300160B8B; Thu, 30 Mar 2017 20:27:06 +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 291A0160B7E for ; Thu, 30 Mar 2017 22:27:05 +0200 (CEST) Received: (qmail 44949 invoked by uid 500); 30 Mar 2017 20:27:04 -0000 Mailing-List: contact dev-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list dev@hbase.apache.org Received: (qmail 44914 invoked by uid 99); 30 Mar 2017 20:27:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Mar 2017 20:27:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 4442EC11BE for ; Thu, 30 Mar 2017 20:27:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.379 X-Spam-Level: ** X-Spam-Status: No, score=2.379 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 1T9ufqQSJQTF for ; Thu, 30 Mar 2017 20:27:01 +0000 (UTC) Received: from mail-vk0-f49.google.com (mail-vk0-f49.google.com [209.85.213.49]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 744C35FCBA for ; Thu, 30 Mar 2017 20:27:00 +0000 (UTC) Received: by mail-vk0-f49.google.com with SMTP id r69so68831111vke.2 for ; Thu, 30 Mar 2017 13:27:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=aGyK9AOWAw5HT8vbqPqG9M6HujMzrdxHadUe2fCSask=; b=a4/bfHt/X918HZeLGrR4KQfJ34tZXHNibubnX1RgKy5fgiL7LuoNNJWNcLfwi+tK8a r/L8etN0Io2cCW/zbuzc3JpRooYnzmICdjfqGbL8EDlPrGJneUq/6SrIX+I0hluwesTp QM15XEaHlk4llp1tEcxumXaiQZ5SN4uiL5C26wMSPnDUBtUtp51/rboHXqTO2/Jc95/J deRr+BiYzegoHkeId1oVx9i+ErP7kh95K9l6AQAmoqvSVnWSjEsRjdPGNHvyZc+Frskn gN2bKXGj+zV8R82SVQyLSXhAIhvTE4SPAfjqOQD6Up958xLzSukW2pAPaQD4AWsGlLkv cz+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=aGyK9AOWAw5HT8vbqPqG9M6HujMzrdxHadUe2fCSask=; b=lI26FUwtB3V27V6rEkc5bhBvSo8IUl6crxR4p3+0pTtAwLkoigVSSLDAb5hLs1c7BX 0OQkx9OdQ9EnC8j3qMKx/WRohvOq4rZa0/rzg2RQ6pB17ksYJGelHkvhAsAj7tTM5UhA 2nRYBw9vaiQnJmCMhqJNaLcjSA0QxZMvdgY432CX65k64nIhNCj5h1EQiVDqwqZPqv+C QphWMnHUhiZrGuRBWnMtCRm+UvJQUyD9l/FmU5ev7h9Z7zsvvxk3gpouC2IWFrM51fpl 36vNAUXC7KoksHGy3IofKYuDlj+viED2mxiNOTCwEfd0bqcr4FH57D37doOiHN6v1WCG dLgw== X-Gm-Message-State: AFeK/H0zAIbXCbSlEcbHanIhWWODpSrxHlQh5YpbPRpvEEZVHqF2GZ92cUZL8P8z6TNXDxEkNoazEwzpEL5Dzw== X-Received: by 10.31.167.8 with SMTP id q8mr845776vke.101.1490905619189; Thu, 30 Mar 2017 13:26:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.118.142 with HTTP; Thu, 30 Mar 2017 13:26:38 -0700 (PDT) In-Reply-To: <58DA995C.4000501@apache.org> References: <58DA995C.4000501@apache.org> From: =?UTF-8?B?5p2o6IuP56uLIFlhbmcgU3UgTGk=?= Date: Thu, 30 Mar 2017 15:26:38 -0500 Message-ID: Subject: Re: How threads interact with each other in HBase To: dev@hbase.apache.org Content-Type: multipart/alternative; boundary=001a11425bf8d35a90054bf8831e archived-at: Thu, 30 Mar 2017 20:27:06 -0000 --001a11425bf8d35a90054bf8831e Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Also, please correct me if I am wrong, but I don't think a put is durable when an RPC returns to the client. Just its corresponding WAL entry is pushed to the memory of all three data nodes, so it has a low probability of being lost. But nothing is persisted at this point. And this is true no mater you use SYNC_WAL or FSYNC_WAL flag. On Tue, Mar 28, 2017 at 12:11 PM, Josh Elser wrote: > 1.1 -> 2: don't forget about the block cache which can invalidate the nee= d > for any HDFS read. > > I think you're over-simplifying the write-path quite a bit. I'm not sure > what you mean by an 'asynchronous write', but that doesn't exist at the > HBase RPC layer as that would invalidate the consistency guarantees (if a= n > RPC returns to the client that data was "put", then it is durable). > > Going off of memory (sorry in advance if I misstate something): the > general way that data is written to the WAL is a "group commit". You have > many threads all trying to append data to the WAL -- performance would be > terrible if you serially applied all of these writes. Instead, many write= s > can be accepted and a the caller receives a Future. The caller must wait > for the Future to complete. What's happening behind the scene is that the > writes are being bundled together to reduce the number of syncs to the WA= L > ("grouping" the writes together). When one caller's future would complete= , > what really happened is that the write/sync which included the caller's > update was committed (along with others). All of this is happening inside > the RS's implementation of accepting an update. > > https://github.com/apache/hbase/blob/55d6dcaf877cc5223e67973 > 6eb613173229c18be/hbase-server/src/main/java/org/apache/hadoop/hbase/ > regionserver/wal/FSHLog.java#L74-L106 > > > =E6=9D=A8=E8=8B=8F=E7=AB=8B Yang Su Li wrote: > >> The attachment can be found in the following URL: >> http://pages.cs.wisc.edu/~suli/hbase.pdf >> >> Sorry for the inconvenience... >> >> >> On Mon, Mar 27, 2017 at 8:25 PM, Ted Yu wrote: >> >> Again, attachment didn't come thru. >>> >>> Is it possible to formulate as google doc ? >>> >>> Thanks >>> >>> On Mon, Mar 27, 2017 at 6:19 PM, =E6=9D=A8=E8=8B=8F=E7=AB=8B Yang Su Li= >>> wrote: >>> >>> Hi, >>>> >>>> I am a graduate student working on scheduling on storage systems, and = we >>>> are interested in how different threads in HBase interact with each >>>> other >>>> and how it might affect scheduling. >>>> >>>> I have written down my understanding on how HBase/HDFS works based on >>>> its >>>> current thread architecture (attached). I am wondering if the develope= rs >>>> >>> of >>> >>>> HBase could take a look at it and let me know if anything is incorrect >>>> or >>>> inaccurate, or if I have missed anything. >>>> >>>> Thanks a lot for your help! >>>> >>>> On Wed, Mar 22, 2017 at 3:39 PM, =E6=9D=A8=E8=8B=8F=E7=AB=8B Yang Su L= i >>>> wrote: >>>> >>>> Hi, >>>>> >>>>> I am a graduate student working on scheduling on storage systems, and >>>>> we >>>>> are interested in how different threads in HBase interact with each >>>>> >>>> other >>> >>>> and how it might affect scheduling. >>>>> >>>>> I have written down my understanding on how HBase/HDFS works based on >>>>> >>>> its >>> >>>> current thread architecture (attached). I am wondering if the >>>>> >>>> developers of >>> >>>> HBase could take a look at it and let me know if anything is incorrect >>>>> >>>> or >>> >>>> inaccurate, or if I have missed anything. >>>>> >>>>> Thanks a lot for your help! >>>>> >>>>> -- >>>>> Suli Yang >>>>> >>>>> Department of Physics >>>>> University of Wisconsin Madison >>>>> >>>>> 4257 Chamberlin Hall >>>>> Madison WI 53703 >>>>> >>>>> >>>>> >>>> -- >>>> Suli Yang >>>> >>>> Department of Physics >>>> University of Wisconsin Madison >>>> >>>> 4257 Chamberlin Hall >>>> Madison WI 53703 >>>> >>>> >>>> >> >> >> --=20 Suli Yang Department of Physics University of Wisconsin Madison 4257 Chamberlin Hall Madison WI 53703 --001a11425bf8d35a90054bf8831e--