org.apache.mahout.classifier.bayes.mapreduce.common
Class BayesFeatureOutputFormat

java.lang.Object
  extended by org.apache.hadoop.mapred.FileOutputFormat<K,V>
      extended by org.apache.hadoop.mapred.lib.MultipleOutputFormat<org.apache.hadoop.io.WritableComparable<?>,org.apache.hadoop.io.Writable>
          extended by org.apache.mahout.classifier.bayes.mapreduce.common.BayesFeatureOutputFormat
All Implemented Interfaces:
org.apache.hadoop.mapred.OutputFormat<org.apache.hadoop.io.WritableComparable<?>,org.apache.hadoop.io.Writable>

public class BayesFeatureOutputFormat
extends org.apache.hadoop.mapred.lib.MultipleOutputFormat<org.apache.hadoop.io.WritableComparable<?>,org.apache.hadoop.io.Writable>

This class extends the MultipleOutputFormat, allowing to write the output data to different output files in sequence file output format.


Constructor Summary
BayesFeatureOutputFormat()
           
 
Method Summary
protected  java.lang.String generateFileNameForKeyValue(org.apache.hadoop.io.WritableComparable<?> k, org.apache.hadoop.io.Writable v, java.lang.String name)
           
protected  org.apache.hadoop.mapred.RecordWriter<org.apache.hadoop.io.WritableComparable<?>,org.apache.hadoop.io.Writable> getBaseRecordWriter(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.mapred.JobConf job, java.lang.String name, org.apache.hadoop.util.Progressable arg3)
           
 
Methods inherited from class org.apache.hadoop.mapred.lib.MultipleOutputFormat
generateActualKey, generateActualValue, generateLeafFileName, getInputFileBasedOutputFileName, getRecordWriter
 
Methods inherited from class org.apache.hadoop.mapred.FileOutputFormat
checkOutputSpecs, getCompressOutput, getOutputCompressorClass, getOutputPath, getPathForCustomFile, getTaskOutputPath, getUniqueName, getWorkOutputPath, setCompressOutput, setOutputCompressorClass, setOutputPath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BayesFeatureOutputFormat

public BayesFeatureOutputFormat()
Method Detail

getBaseRecordWriter

protected org.apache.hadoop.mapred.RecordWriter<org.apache.hadoop.io.WritableComparable<?>,org.apache.hadoop.io.Writable> getBaseRecordWriter(org.apache.hadoop.fs.FileSystem fs,
                                                                                                                                              org.apache.hadoop.mapred.JobConf job,
                                                                                                                                              java.lang.String name,
                                                                                                                                              org.apache.hadoop.util.Progressable arg3)
                                                                                                                                       throws java.io.IOException
Specified by:
getBaseRecordWriter in class org.apache.hadoop.mapred.lib.MultipleOutputFormat<org.apache.hadoop.io.WritableComparable<?>,org.apache.hadoop.io.Writable>
Throws:
java.io.IOException

generateFileNameForKeyValue

protected java.lang.String generateFileNameForKeyValue(org.apache.hadoop.io.WritableComparable<?> k,
                                                       org.apache.hadoop.io.Writable v,
                                                       java.lang.String name)
Overrides:
generateFileNameForKeyValue in class org.apache.hadoop.mapred.lib.MultipleOutputFormat<org.apache.hadoop.io.WritableComparable<?>,org.apache.hadoop.io.Writable>


Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.