hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ayon Sinha <ayonsi...@yahoo.com>
Subject Re: Multiple Output Formats
Date Tue, 26 Jul 2011 16:23:32 GMT
package com.shopkick.util;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapred.lib.MultipleTextOutputFormat;

public class MultiFileOutput extends MultipleTextOutputFormat<Text, Text> {

    protected String generateFileNameForKeyValue(Text key, Text value,
            String name) {
        // TODO Auto-generated method stub
        return key.toString()+"/"+name;


See My Photos on Flickr
Also check out my Blog for answers to commonly asked questions.

From: Roger Chen <rogchen@ucdavis.edu>
To: common-user@hadoop.apache.org
Sent: Tuesday, July 26, 2011 9:11 AM
Subject: Multiple Output Formats

Hi all,

I am attempting to implement MultipleOutputFormat to write data to multiple
files dependent on the output keys and values. Can somebody provide a
working example with how to implement this in Hadoop 0.20.2?


Roger Chen
UC Davis Genome Center
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message