hadoop-mapreduce-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mapred Learn <mapred.le...@gmail.com>
Subject Re: how to change default name of a sequnce file
Date Mon, 20 Jun 2011 06:19:41 GMT
Thanks !
I will try this  !

On Sun, Jun 19, 2011 at 11:16 PM, Christoph Schmitz <
Christoph.Schmitz@1und1.de> wrote:

> Hi JJ,
>
> you can do that by subclassing TextOutputFormat (or whichever output format
> you're using) and overloading the getDefaultWorkFile method:
>
> public class MyOutputFormat<K, V> extends TextOutputFormat<K, V> {
>    // ...
>    public Path getDefaultWorkFile(TaskAttemptContext context,
>            String extension) throws IOException {
>        FileOutputCommitter committer = (FileOutputCommitter)
> getOutputCommitter(context);
>        return new Path(committer.getWorkPath(),
> myOwnMethodToComputeTheFileName(context));
>    }
> }
>
> Regards,
>
> Christoph
>
> -----Urspr√ľngliche Nachricht-----
> Von: Mapred Learn [mailto:mapred.learn@gmail.com]
> Gesendet: Montag, 20. Juni 2011 06:59
> An: mapreduce-user@hadoop.apache.org; cdh-user@cloudera.org
> Betreff: how to change default name of a sequnce file
>
> Hi,
> I want to name output files of my map-red job (sequence files) to be a
> certain name instead of part* default format.
>
> Has anyone ever tried to over-ride the default filename and give output
> file name per map-red ?
>
> Thanks,
> -JJ
>

Mime
View raw message