Return-Path: Delivered-To: apmail-hadoop-core-user-archive@www.apache.org Received: (qmail 5209 invoked from network); 6 Aug 2008 18:09:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Aug 2008 18:09:28 -0000 Received: (qmail 88195 invoked by uid 500); 6 Aug 2008 18:09:21 -0000 Delivered-To: apmail-hadoop-core-user-archive@hadoop.apache.org Received: (qmail 88167 invoked by uid 500); 6 Aug 2008 18:09:21 -0000 Mailing-List: contact core-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: core-user@hadoop.apache.org Delivered-To: mailing list core-user@hadoop.apache.org Received: (qmail 88151 invoked by uid 99); 6 Aug 2008 18:09:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Aug 2008 11:09:21 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of klzhao@gmail.com designates 209.85.132.244 as permitted sender) Received: from [209.85.132.244] (HELO an-out-0708.google.com) (209.85.132.244) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Aug 2008 18:08:26 +0000 Received: by an-out-0708.google.com with SMTP id c37so40997anc.49 for ; Wed, 06 Aug 2008 11:08:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=l6LboBQGulIwDF9pD+P920YkAmPBluGREtUEEmMnvzU=; b=D6cCTaQCBBoDeIrLStI8WO5TXOOWWbtmZKbKOFY+bAySc/dHZYKYIzLpEUbAioClAc MHOuCbjINzKiS2h/g5cnTPmJTe1JVziQy7L6BpxXCWURxDz80n8UrUTP8NfNJH1fS2lh 0sE8nHVrh04tLTgzFWj2TNBOau/pOySwlEAnw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=V6F+Bx2MOZ45dsGmWsgsKg4BEcocOpJbgAuwhMrztZu/A6QiblbM85BadCkQhxsX6a vemsbSUJRJiTDuNmE0t/B6zCN1M23OhIz5Tk1fUlUJeF5HN+rdBwmHYZSCBWDVa8W/9d DfaRq06fBWVAqQSO+QeaPYDLzZdhboBXcvoc0= Received: by 10.100.33.9 with SMTP id g9mr772057ang.5.1218046115965; Wed, 06 Aug 2008 11:08:35 -0700 (PDT) Received: by 10.70.76.17 with HTTP; Wed, 6 Aug 2008 11:08:35 -0700 (PDT) Message-ID: Date: Wed, 6 Aug 2008 11:08:35 -0700 From: Kevin To: core-user@hadoop.apache.org Subject: Re: DFS. How to read from a specific datanode In-Reply-To: <48996F59.7070004@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <48996F59.7070004@gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org Yes, the namenode is in charge of deciding the proximity by using DNSToSwitchMapping. On the other hand, I am exploring the possibility to let the client decide which data node to connect to, since sometimes network hierarchy is so complex or dynamic that we better leave it to the client to find out which datanode is nearest. -Kevin On Wed, Aug 6, 2008 at 2:31 AM, Samuel Guo wrote: > Kevin 写道: >> >> Hi, >> >> This is about dfs only, not to consider mapreduce. It may sound like a >> strange need, but sometimes I want to read a block from a specific >> data node which holds a replica. Figuring out which datanodes have the >> block is easy. But is there an easy way to specify which datanode I >> want to load from? >> >> Best, >> -Kevin >> > > DFSClient will choose a node that contains a replicas of the block for you. > The chosen node will be the nearest node to your client node. This method is > awesome. > plz let me know why you want to specify the datanode yourself :) >