鲁春利的工作笔记,谁说程序员不能有文艺范?


 

java.lang.Object
    org.apache.hadoop.mapreduce.InputFormat<K, V>
        org.apache.hadoop.mapreduce.lib.db.DBInputFormat<T extends DBWritable>
            DataDrivenDBInputFormat<T extends DBWritable>
                OracleDataDrivenDBInputFormat<T extends DBWritable>
        org.apache.hadoop.mapreduce.lib.input.FileInputFormat<K, V>
            CombineFileInputFormat<K, V>
                CombineSequenceFileInputFormat<K,V>
                CombineTextInputFormat<LongWritable,Text>
            FixedLengthInputFormat<LongWritable, BytesWritable>
            KeyValueTextInputFormat<Text, Text>
            NLineInputFormat<LongWritable, Text>
            SequenceFileInputFormat<K, V>
            TextInputFormat<LongWritable, Text>

InputFormat

public abstract class InputFormat<K, V> {
  public abstract List<InputSplit> getSplits(JobContext context) throws IOException, InterruptedException;
                               
  public abstract RecordReader<K,V> createRecordReader(InputSplit split,TaskAttemptContext context)
                                                        throws IOException,  InterruptedException;
}


1、FileInputFormat

1.1 TextInputFormat

1.2 KeyValueTextInputFormat

1.3 SequenceFileInputFormat

1.4 CombineFileInputFormat

1.5 FixedLengthInputFormat

1.6 NLineInputFormat

2、DBInputFormat

2.1 DataDrivenDBInputFormat

2.1.1 OracleDataDrivenDBInputFormat

OutputFormat

public abstract class OutputFormat<K, V> {
    public abstract RecordWriter<K, V> getRecordWriter(TaskAttemptContext context
                    ) throws IOException, InterruptedException;
                    
    public abstract RecordWriter<K, V> getRecordWriter(TaskAttemptContext context
                    ) throws IOException, InterruptedException;
                    
    public abstract OutputCommitter getOutputCommitter(TaskAttemptContext context
                    ) throws IOException, InterruptedException;
}