Return-Path: X-Original-To: apmail-hama-dev-archive@www.apache.org Delivered-To: apmail-hama-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6909010E9E for ; Wed, 17 Apr 2013 15:46:58 +0000 (UTC) Received: (qmail 43967 invoked by uid 500); 17 Apr 2013 15:46:58 -0000 Delivered-To: apmail-hama-dev-archive@hama.apache.org Received: (qmail 43949 invoked by uid 500); 17 Apr 2013 15:46:58 -0000 Mailing-List: contact dev-help@hama.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hama.apache.org Delivered-To: mailing list dev@hama.apache.org Received: (qmail 43940 invoked by uid 99); 17 Apr 2013 15:46:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Apr 2013 15:46:58 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of micle.bu@gmail.com designates 74.125.83.42 as permitted sender) Received: from [74.125.83.42] (HELO mail-ee0-f42.google.com) (74.125.83.42) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Apr 2013 15:46:53 +0000 Received: by mail-ee0-f42.google.com with SMTP id e49so130145eek.29 for ; Wed, 17 Apr 2013 08:46:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=CQuqmVYD7tNCRPDzDzwjgg1JlecxNfscb7GK/utDFDM=; b=avQuhFOCJMJr6AU/yNawBO7yJ8FKrGyW7Sk08gIp5Yqn4JDKUXRGoq1Pm2nSkHH7bb Ic5owYbtDosbfwb2dFX1sJ9U4d152cPNnm82R2Kaw1mmPW9jC9i48nboMHfBwObkacXZ SvePTipXVV2th7z5SY1wZL2NYBZ79hI1WGG2qwbCOHXEPye6OYcQtPxSyiks8e8IwoZ1 0ibmP6I+zZARG7iWF5s1ANiUb1F+c33e2L9j5l57OIW2/vqSt8kaUSw1jO+rsPkQr9tt LhX/15byIm7gF6ZVidyx1/0dBB7mqMSMepCENY9ZeGQZ4Fd6vYiUmf8l9GOrbcmmBgAG l90g== MIME-Version: 1.0 X-Received: by 10.15.32.67 with SMTP id z43mr19565820eeu.24.1366213591532; Wed, 17 Apr 2013 08:46:31 -0700 (PDT) Received: by 10.14.173.194 with HTTP; Wed, 17 Apr 2013 08:46:31 -0700 (PDT) In-Reply-To: References: Date: Wed, 17 Apr 2013 23:46:31 +0800 Message-ID: Subject: Re: Data locality in Hama From: Micle Bu To: dev@hama.apache.org Content-Type: multipart/alternative; boundary=089e01635046cfb7d004da9063e2 X-Virus-Checked: Checked by ClamAV on apache.org --089e01635046cfb7d004da9063e2 Content-Type: text/plain; charset=ISO-8859-1 Thanks Suraj! Good, another way is to select the groom server that has most blocks/parts of split(when splitSize > HDFS blocksize, split may has several HDFS blocks) to obtain maximum locality! Taking hostname in different rack is another good hint. Micle Bu On Wed, Apr 17, 2013 at 11:29 PM, Suraj Menon wrote: > Good catch! Yes the logic is to find the first groom server that has the > split and has available slots for execution. > You might note that depending on the HDFS allocation, this hostname might > not be in the same rack. You are welcome to fix this. > > > On Wed, Apr 17, 2013 at 11:15 AM, Micle Bu wrote: > > > Hi all, > > > > I'm learning data locality in Hama, and found there is a > > BestEffortDataLocalTaskAllocator class for this purpose. It's a good idea > > to assign task to the groom which contains its split, > getGroomToSchedule() > > play this role. > > > > Well, in getGroomToSchedule(), the code like: > > > > GroomServerStatus groom = grooms.get(location); > > ... > > if (taskInGroom < groom.getMaxTasks() && > > location.equals(groom.getGroomHostName())) { > > return groom.getGroomHostName(); > > } > > > > It seems that location.equals(groom.getGroomHostName() is always true, so > > it just select the first groom which contains split? Am i right? > > > > Thanks in advance! > > > > Micle Bu > > > --089e01635046cfb7d004da9063e2--