From general-return-567-apmail-hadoop-general-archive=hadoop.apache.org@hadoop.apache.org Fri Oct 02 01:05:38 2009 Return-Path: Delivered-To: apmail-hadoop-general-archive@minotaur.apache.org Received: (qmail 47188 invoked from network); 2 Oct 2009 01:05:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Oct 2009 01:05:37 -0000 Received: (qmail 66731 invoked by uid 500); 2 Oct 2009 01:05:37 -0000 Delivered-To: apmail-hadoop-general-archive@hadoop.apache.org Received: (qmail 66660 invoked by uid 500); 2 Oct 2009 01:05:37 -0000 Mailing-List: contact general-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: general@hadoop.apache.org Delivered-To: mailing list general@hadoop.apache.org Received: (qmail 66650 invoked by uid 99); 2 Oct 2009 01:05:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Oct 2009 01:05:36 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jason.hadoop@gmail.com designates 209.85.212.198 as permitted sender) Received: from [209.85.212.198] (HELO mail-vw0-f198.google.com) (209.85.212.198) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Oct 2009 01:05:26 +0000 Received: by vws36 with SMTP id 36so375636vws.29 for ; Thu, 01 Oct 2009 18:05:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=aAKNQ+ApbLKxXHmPKZRzrWQvqNd/4tj6zkq/ZJpAwvU=; b=hzpRxC1Td8LC5sQbetgl1urIThAAQcCnMaa9jK2npdH400YuKaRdiLSOxUhrNH+MLJ dhjd73odr+M/dGKBuQQpYP8+0F+AHEjXdBbEeWSKgwkfKlJNapwEoyIEc7Qp0sVK/JUu e0nJDCImDnLuhAkeIet2lsf4dvBttUm8iO+4w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=uYKYP9BgjXJsUT+quO3iHmsZb3IqE2dyf8BSapn++pxA2o4TxpeV8D32ZPnqWIN/kz V+yR19EK3aD89lElnXBhb0W/BHgYfLOuSktzO1MULqkRWwaoU6VJSz5diEfVkeqjl2kF XBj6vp/GXNER9hjlE3mCruXZ/QkNLw9XLLEls= MIME-Version: 1.0 Received: by 10.220.69.169 with SMTP id z41mr3569245vci.31.1254445504654; Thu, 01 Oct 2009 18:05:04 -0700 (PDT) In-Reply-To: <309f76d00910011300o14702a51h2422ad9397eec34d@mail.gmail.com> References: <309f76d00910011300o14702a51h2422ad9397eec34d@mail.gmail.com> Date: Thu, 1 Oct 2009 18:05:04 -0700 Message-ID: <314098690910011805v5b0c9246q221cd51695d7b6e8@mail.gmail.com> Subject: Re: CHANGING FINAL OUTPUT FILE NAME From: Jason Venner To: general@hadoop.apache.org Content-Type: multipart/alternative; boundary=0016e6475626b1ed620474e95ae1 X-Virus-Checked: Checked by ClamAV on apache.org --0016e6475626b1ed620474e95ae1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I see these ways to go here. 1. The one I know to work is to create a recordwriter in the configure method of your task, in the per task work/output directory, and then ren= ame it to your chosen name in the close. your task calls write on the recordwriter directly instead of output.collect 2. Use the multi output format 3. in the close method of the task, rename the part-xxx to your name. I am not certain that this is safe in the close method of the task 4. define a custom OutputCommitter class which renames the file to your chosen name. On Thu, Oct 1, 2009 at 1:00 PM, Alberto Luengo Cabanillas wrote: > Hi everyone! I have a newbie question: I=B4m actually using Hadoop 0.20.1= and > I=B4d like to know how can I change the name of the resulting file with t= he > one I want (i.e from "part-r-00000" to "myoutput"). I=B4ve found somethin= g > related in JIRA (https://issues.apache.org/jira/browse/MAPREDUCE-370) but > I > don=B4t know for sure i that is my problem too. In this case, do I apply = the > patch over the affected file and I=B4m ready to go or do I need to do > something more later? > Thanks a lot! > > -- > Alberto > --=20 Pro Hadoop, a book to guide you from beginner to hadoop mastery, http://www.amazon.com/dp/1430219424?tag=3Djewlerymall www.prohadoopbook.com a community for Hadoop Professionals --0016e6475626b1ed620474e95ae1--