Return-Path: X-Original-To: apmail-hadoop-hdfs-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 86F129BBD for ; Mon, 3 Sep 2012 15:02:38 +0000 (UTC) Received: (qmail 93721 invoked by uid 500); 3 Sep 2012 15:02:33 -0000 Delivered-To: apmail-hadoop-hdfs-user-archive@hadoop.apache.org Received: (qmail 93609 invoked by uid 500); 3 Sep 2012 15:02:33 -0000 Mailing-List: contact user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hadoop.apache.org Delivered-To: mailing list user@hadoop.apache.org Received: (qmail 93602 invoked by uid 99); 3 Sep 2012 15:02:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Sep 2012 15:02:33 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FSL_RCVD_USER,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of dontariq@gmail.com designates 209.85.216.176 as permitted sender) Received: from [209.85.216.176] (HELO mail-qc0-f176.google.com) (209.85.216.176) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Sep 2012 15:02:26 +0000 Received: by mail-qc0-f176.google.com with SMTP id c21so4182318qcs.35 for ; Mon, 03 Sep 2012 08:02:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=EC9eaBXD7ai3tSiTHZOMxC7mKCnAJJURIO4ifXvxMPs=; b=WBrk1vgmOh/bFqmPf1rN4ZYJnL0qt+icvRKGHjQORL6+MhgoW/xL4hTlb2vFGALB1t a1eQfWr4m1ZI+75HfVh1ZYAuiF1NK5noJS+vNsHPXdEVOXY3JBjOHtaO9FOX8ESHAp2Z obJMO37VVA6cuwJvTIaGnps50kjLghF6oWEyVqLymFkcPEyv69SvU9OW+SJad1IjkO7+ jSNL6z6mN3RDqRs/GiWFnEL3vbgQbRt3fLG35h05+mlmKTXKNDtVMu8l8XysDEZoA7Vv bp8bn8xS1WojzoRW4NmNgbx//OrWxl4FQxeBawj4OLOmHgKjQcgk0OJzFmIfl9wKDKeW UYeQ== Received: by 10.224.18.209 with SMTP id x17mr34632839qaa.15.1346684525632; Mon, 03 Sep 2012 08:02:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.170.143 with HTTP; Mon, 3 Sep 2012 08:01:25 -0700 (PDT) In-Reply-To: References: From: Mohammad Tariq Date: Mon, 3 Sep 2012 20:31:25 +0530 Message-ID: Subject: Re: reading a binary file To: user@hadoop.apache.org Content-Type: multipart/alternative; boundary=bcaec51dd7c5c65f2304c8cd6ce0 --bcaec51dd7c5c65f2304c8cd6ce0 Content-Type: text/plain; charset=ISO-8859-1 Hello Francesco, Have a look at SequenceFileInputFormat : http://hadoop.apache.org/mapreduce/docs/r0.21.0/api/org/apache/hadoop/mapreduce/lib/input/SequenceFileInputFormat.html Regards, Mohammad Tariq On Mon, Sep 3, 2012 at 8:26 PM, Francesco Silvestri wrote: > Hello, > > I have a binary file of integers and I would like an input format that > generates pairs , where value is an integer in the file and key > the position of the integer in the file. Which class should I use? (i.e. > I'm looking for a kind of TextinputFormat for binary files) > > Thank you for your consideration, > > Francesco > --bcaec51dd7c5c65f2304c8cd6ce0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello=A0Francesco,


Regards,
=A0=A0 =A0Mohammad Tariq



On Mon, Sep 3, 2012 at 8:26 PM, Francesc= o Silvestri <yuri.rwx@gmail.com> wrote:
Hello,

I have a binary file of integers and I would like= an input format that generates pairs <key,value>, where value is an = integer in the file and key the position of the integer in the file. Which = class should I use? (i.e. I'm looking for a kind of TextinputFormat for= binary files)

Thank you for your consideration,

<= div>Francesco

--bcaec51dd7c5c65f2304c8cd6ce0--