Return-Path: X-Original-To: apmail-hbase-user-archive@www.apache.org Delivered-To: apmail-hbase-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0E46B9664 for ; Fri, 15 Jun 2012 08:22:22 +0000 (UTC) Received: (qmail 16534 invoked by uid 500); 15 Jun 2012 08:22:19 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 16368 invoked by uid 500); 15 Jun 2012 08:22:19 -0000 Mailing-List: contact user-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hbase.apache.org Delivered-To: mailing list user@hbase.apache.org Received: (qmail 16335 invoked by uid 99); 15 Jun 2012 08:22:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Jun 2012 08:22:18 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FSL_RCVD_USER,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lars.george@gmail.com designates 209.85.214.41 as permitted sender) Received: from [209.85.214.41] (HELO mail-bk0-f41.google.com) (209.85.214.41) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Jun 2012 08:22:10 +0000 Received: by bkcjm19 with SMTP id jm19so2786947bkc.14 for ; Fri, 15 Jun 2012 01:21:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=SvX0wLzZaFMpbTze8AjLnDJOmWn+zhmMR6E9ak7KjdM=; b=r/WT8U7RCYvpaQoxceo32qTWb9s/2UzihpPuO3hTC5o304ORErxESidSJWXIgmJxTj qMFTzECNAn6c928v+oUu2k+4Tasf/tvh5xMl10XSDrKR4eX6uskORYm2IsJc0jMtWVjH Y+ACYvkV9N9YDyMIiPY04ha6lrif4tTeLctEScdwkb9Q/QxTRsJbKzrbu0H+kQ4eChHY XCpFnJ775e25g5+KwxjiRLyfyMDJIePK2V/9svcF5dprZJXIW5Ncjm3ND1evUHiDUi7F bN526sd/j8un2Iie+csJXatK83JM5Nv5TBcvP957qFRHOItW52XORZ2RiRYuTGVQA0PM KAJQ== Received: by 10.204.150.89 with SMTP id x25mr2432540bkv.24.1339748509521; Fri, 15 Jun 2012 01:21:49 -0700 (PDT) Received: from [10.0.0.31] (p508F7759.dip.t-dialin.net. [80.143.119.89]) by mx.google.com with ESMTPS id ig1sm9200660bkc.4.2012.06.15.01.21.47 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 15 Jun 2012 01:21:48 -0700 (PDT) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Apple Message framework v1278) Subject: Re: Data locality in HBase From: Lars George In-Reply-To: Date: Fri, 15 Jun 2012 10:21:46 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: To: user@hbase.apache.org X-Mailer: Apple Mail (2.1278) Hi Ben, See inline... On Jun 15, 2012, at 6:56 AM, Ben Kim wrote: > Hi, >=20 > I've been posting questions in the mailing-list quiet often lately, = and > here goes another one about data locality > I read the excellent blog post about data locality that Lars George = wrote > at http://www.larsgeorge.com/2010/05/hbase-file-locality-in-hdfs.html >=20 > I understand data locality in hbase as locating a region in a = region-server > where most of its data blocks reside. The opposite is happening, i.e. the region server process triggers for = all data it writes to be located on the same physical machine.=20 > So that way fast data access is guranteed when running a MR because = each > map/reduce task is run for each region in the tasktracker where the = region > co-locates. Correct. > But what if the data blocks of the region are evenly spread over = multiple > region-servers? This will not happen, unless the original server fails. Then the region = is moved to another that now needs to do a lot of remote reads over the = network. This is way there is work being done to allow for custom = placement policies in HDFS. That way you can store the entire region and = all copies as complete units on three data nodes. In case of a failure = you can then move the region to one of the two copies. This is not = available yet though, but it is being worked on (so I heard). > Does a MR task has to remotely access the data blocks from other > regionservers? For the above failure case, it would be the region server accessing the = remote data, yes. > How good is hbase locating datablocks where a region resides? That is again the wrong way around. HBase has no clue as to where blocks = reside, nor does it know that the file system in fact uses separate = blocks. HBase stores files, HDFS does the block magic underneath the = hood, and transparent to HBase. > Also is it correct to say that if i set smaller data block size data > locality gets worse, and if data block size gets bigger data locality = gets > better. This is not applicable here, I am assuming this stems from the above = confusion about which system is handling the blocks, HBase or HDFS. See = above. HTH, Lars >=20 > Best regards, > --=20 >=20 > *Benjamin Kim* > *benkimkimben at gmail*