Return-Path: Delivered-To: apmail-hadoop-mapreduce-user-archive@minotaur.apache.org Received: (qmail 72274 invoked from network); 10 Aug 2010 02:52:58 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 10 Aug 2010 02:52:58 -0000 Received: (qmail 67395 invoked by uid 500); 10 Aug 2010 02:52:58 -0000 Delivered-To: apmail-hadoop-mapreduce-user-archive@hadoop.apache.org Received: (qmail 67198 invoked by uid 500); 10 Aug 2010 02:52:57 -0000 Mailing-List: contact mapreduce-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mapreduce-user@hadoop.apache.org Delivered-To: mailing list mapreduce-user@hadoop.apache.org Received: (qmail 67190 invoked by uid 99); 10 Aug 2010 02:52:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Aug 2010 02:52:56 +0000 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: local policy) Received: from [208.97.132.145] (HELO homiemail-a5.g.dreamhost.com) (208.97.132.145) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Aug 2010 02:52:50 +0000 Received: from homiemail-a5.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a5.g.dreamhost.com (Postfix) with ESMTP id 0DFFD70406A for ; Mon, 9 Aug 2010 19:52:30 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=darose.net; h=message-id:date :from:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; q=dns; s=darose.net; b= DyoYTolmlJ0+4n1ftrkuzj+NMHFhWR2EfHgWZQh9X2BwU14+eHHKHVBUEpieuW8X 9SW+17PkLZZNgG3KO9EYwK36lLXpgb3EhWSYiMfFXOsO6/qp/YB3AEvaBK6eEWIT PHPcZ9wMzvkWP+pR3cKcS9qEK6Ka/hRY1RAURgD2pqo= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=darose.net; h=message-id :date:from:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; s=darose.net; bh=XRBuka SDjt4O7koTxFdOFqCGrFw=; b=ecIJe+vd4KnrPkE0kEjaERkj/ti0ELmc1kzn6H Ur5k/elA+AMmSMSUAM5C4bZuSEebVyk30NLINv1Pz/lPNcY0gdo94Jmw/tIKAMY6 ZrA80xxMGSvjzCvoLnbU/QlA7bEroZundveggJR8rnfOsHOKsrl17Hkpp5lHwRin gkwDk= Received: from darsys12 (cpe-66-108-142-190.nyc.res.rr.com [66.108.142.190]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: darose@darose.net) by homiemail-a5.g.dreamhost.com (Postfix) with ESMTPSA id E7824704063 for ; Mon, 9 Aug 2010 19:52:29 -0700 (PDT) Received: from [10.1.0.2] by darsys12 with esmtp (Exim 4.72) (envelope-from ) id 1Oiex2-0002Lz-IU for mapreduce-user@hadoop.apache.org; Mon, 09 Aug 2010 22:52:28 -0400 Message-ID: <4C60BEF6.80908@darose.net> Date: Mon, 09 Aug 2010 22:52:38 -0400 From: David Rosenstrauch User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100806 Lanikai/3.1.2 MIME-Version: 1.0 To: mapreduce-user@hadoop.apache.org Subject: Re: How to set SequenceFile.Metadata from within SequenceFileOutputFormat? References: <4C5CF40F.1000606@darose.net> <4C605E8D.4060507@darose.net> <4C6076F8.5090608@darose.net> <4C607A68.6090601@darose.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 08/09/2010 09:14 PM, Harsh J wrote: > Another solution would be to create a custom named output using > mapred.lib.MultipleOutputs and collecting to that instead of the > job-set output format (which one can set to NullOutputFormat so it > doesn't complain about existing paths, etc.). > > So if you'd want 'foo' prefix to your 00000-NNNNN numbered output > files (instead of default 'part'), you'd create it with > MultipleOutputs.addNamedOutput(Conf, "foo", YourOutFormat.class, > Key.class, Value.class); > > The extension, I believe, can be changed too, while 'getting' the path > from the FileOutputFormat while building your RecordWriter. Something > like: > Path outPath = FileOutputFormat.getTaskOutputPath(job, name+YOUR_EXTENSION); > // Now create the 'writer' on this path. Tnx for the tip - didn't know about MultipleOutputs. (Though it's probably overkill for what I'm doing.) Thanks again, DR