All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.panhongan.util.hadoop.CombineSequenceFileInputFormat Maven / Gradle / Ivy

There is a newer version: 0.1.8
Show newest version
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);
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy