Return-Path: X-Original-To: apmail-hadoop-hdfs-dev-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9A1D7D842 for ; Wed, 31 Oct 2012 21:31:30 +0000 (UTC) Received: (qmail 880 invoked by uid 500); 31 Oct 2012 21:31:30 -0000 Delivered-To: apmail-hadoop-hdfs-dev-archive@hadoop.apache.org Received: (qmail 829 invoked by uid 500); 31 Oct 2012 21:31:29 -0000 Mailing-List: contact hdfs-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-dev@hadoop.apache.org Delivered-To: mailing list hdfs-dev@hadoop.apache.org Received: (qmail 821 invoked by uid 99); 31 Oct 2012 21:31:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Oct 2012 21:31:29 +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 sqlxweiwei@gmail.com designates 209.85.223.176 as permitted sender) Received: from [209.85.223.176] (HELO mail-ie0-f176.google.com) (209.85.223.176) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Oct 2012 21:31:24 +0000 Received: by mail-ie0-f176.google.com with SMTP id k11so3182139iea.35 for ; Wed, 31 Oct 2012 14:31:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=X1RKaO+AHW5pZyN7Ic4yUb7m+Iv0F+xlsf4nKrq3kR8=; b=TngNaiUWe2OShYDKHYzXMFuXljz/K5surDV6na57tqEn9j7ePeeNJxV5Ntfgk9LBbD 54JacHRa0dTlDLR72Nfiazc8ck972ljx9mz35xcispijBH0Q4ySGTQe+6rWyagohnhQU kfsYFmGUkhtBbrhNhqTl5X+zRpWmXt9Tc2JPQIfIO64Zp4311QeyrSmel6b0BdvMu3QL UXV7OTU0i8Ho6S0/1zGVwMbuO7x+AvS5+7ZI7f5pqV6LjmfAVlHGkKwvIlv96YpYskx7 WG0VdZn4VcsWasMx6unognIaE80YHaZLB10TRW6/WFDl8nlmfiI5dCV0UOA7lg9k/2vW MKpA== MIME-Version: 1.0 Received: by 10.50.152.137 with SMTP id uy9mr2992242igb.62.1351719064390; Wed, 31 Oct 2012 14:31:04 -0700 (PDT) Received: by 10.50.49.72 with HTTP; Wed, 31 Oct 2012 14:31:04 -0700 (PDT) In-Reply-To: References: Date: Wed, 31 Oct 2012 16:31:04 -0500 Message-ID: Subject: Re: A question about reading one block From: Vivi Lang To: hdfs-dev@hadoop.apache.org Content-Type: multipart/alternative; boundary=e89a8f3b9e8fab4d8e04cd619ee6 X-Virus-Checked: Checked by ClamAV on apache.org --e89a8f3b9e8fab4d8e04cd619ee6 Content-Type: text/plain; charset=ISO-8859-1 Please ignore the previous email which I did not describe the problem clearly. On Wed, Oct 31, 2012 at 3:05 PM, Vivi Lang wrote: > Hi, thks for the replying. > > Is there any function can help me to create a InputStream for a certain > Block which stored in a certain datanode > Thanks, > > On Sat, Oct 27, 2012 at 9:41 PM, Harsh J wrote: > >> Vivi, >> >> Assuming you know how to get the block info out of a file's metadata, >> opening a file for read (with FileSystem.open API, etc.) with an >> offset and length set to to match that of a block, will open and read >> only that block. >> >> On Sat, Oct 27, 2012 at 2:19 AM, Vivi Lang wrote: >> > Hi guys, >> > >> > I am writing a program which need the data of several specific blocks (I >> > know the blockinfo of those blocks), if I use the Hadoop 0.20, is there >> > any funtion which can help me to retrieve the content of block? >> > >> > Thanks, >> > Vivi >> >> >> >> -- >> Harsh J >> > > --e89a8f3b9e8fab4d8e04cd619ee6--