com.github.panhongan.util.hadoop.CombineSequenceFileInputFormat Maven / Gradle / Ivy
package com.github.panhongan.util.hadoop;
import java.io.IOException;
import org.apache.hadoop.mapreduce.InputSplit;
import org.apache.hadoop.mapreduce.RecordReader;
import org.apache.hadoop.mapreduce.TaskAttemptContext;
import org.apache.hadoop.mapreduce.lib.input.CombineFileInputFormat;
import org.apache.hadoop.mapreduce.lib.input.CombineFileRecordReader;
import org.apache.hadoop.mapreduce.lib.input.CombineFileSplit;
public class CombineSequenceFileInputFormat extends CombineFileInputFormat {
org.apache.hadoop.mapreduce.lib.input.TextInputFormat f = new org.apache.hadoop.mapreduce.lib.input.TextInputFormat();
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
public RecordReader createRecordReader(InputSplit split, TaskAttemptContext context) throws IOException {
return new CombineFileRecordReader((CombineFileSplit)split, context, CombineSequenceFileRecordReader.class);
}
}