Return-Path: Delivered-To: apmail-lucene-hadoop-user-archive@locus.apache.org Received: (qmail 13134 invoked from network); 29 Oct 2006 10:16:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Oct 2006 10:16:02 -0000 Received: (qmail 92285 invoked by uid 500); 29 Oct 2006 10:16:13 -0000 Delivered-To: apmail-lucene-hadoop-user-archive@lucene.apache.org Received: (qmail 92261 invoked by uid 500); 29 Oct 2006 10:16:13 -0000 Mailing-List: contact hadoop-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hadoop-user@lucene.apache.org Delivered-To: mailing list hadoop-user@lucene.apache.org Received: (qmail 92252 invoked by uid 99); 29 Oct 2006 10:16:13 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 29 Oct 2006 02:16:13 -0800 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of mytkdd@gmail.com designates 66.249.82.226 as permitted sender) Received: from [66.249.82.226] (HELO wx-out-0506.google.com) (66.249.82.226) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 29 Oct 2006 02:15:57 -0800 Received: by wx-out-0506.google.com with SMTP id s15so1069195wxc for ; Sun, 29 Oct 2006 02:15:36 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=mgjkkMBcEDiMMvRjMOjgx4qm/AnrxH9ox/qm8O2x9L0OjSiXhYOHEOnJW0LbvCNM58qeUkAaprq0IAtNP3b53DySkgGBaqw9gVp/v/aqGTOOg58wYiScMWZYjL6PsMXnTvcDNab1pBoCQ49qkks4Oez9GrcOmeFyPyr80FgFr1A= Received: by 10.70.95.19 with SMTP id s19mr2378207wxb; Sun, 29 Oct 2006 02:15:36 -0800 (PST) Received: from ?10.10.13.64? ( [218.1.25.114]) by mx.google.com with ESMTP id h13sm2104623wxd.2006.10.29.02.15.35; Sun, 29 Oct 2006 02:15:36 -0800 (PST) Message-ID: <45447F63.8080708@gmail.com> Date: Sun, 29 Oct 2006 18:16:03 +0800 From: TKDD User-Agent: Thunderbird 1.5.0.7 (X11/20060909) MIME-Version: 1.0 To: hadoop-user@lucene.apache.org Subject: Re: how to implement RecordReader.createValue() References: <000001c6fa2f$fb686e90$400d0a0a@hero> <58B87EF2-9DAC-4102-89D7-7B95F795D618@apache.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Thank you, my friends, it really helps - TKDD Owen O'Malley wrote: > > On Oct 28, 2006, at 8:55 AM, Grant Ingersoll wrote: > >> My understanding is that you just construct a new instance of the >> Writable that you want as the value, which later gets passed to the >> next method. For instance, just construct, a new Text() object or >> something. > > Yes, the intent is to have the RecordReader to create an instance of > the value type that it wants to read into. Look at the > SequenceFileRecordReader. Basically the framework is going to do: > > WrtiableComparable key = recordReader.createKey(); > Writable value = recordReader.createValue(); > while (recordReader.next(key, value)) { > mapper.map(key, value, collector, reporter); > } > > look at MapRunner.java. > > -- Owen >