use of org.apache.hadoop.mapred.OutputCollector in project elephant-bird by twitter.
the class LzoBinaryScheme method sink.
@Override
public void sink(FlowProcess<? extends Configuration> flowProcess, SinkCall<T, OutputCollector> sinkCall) throws IOException {
OutputCollector collector = sinkCall.getOutput();
TupleEntry entry = sinkCall.getOutgoingEntry();
T writable = sinkCall.getContext();
writable.set((M) entry.getTuple().getObject(0));
collector.collect(null, writable);
}
use of org.apache.hadoop.mapred.OutputCollector in project elephant-bird by twitter.
the class TestCombinedSequenceFile method testHadoopConf.
@Test
public void testHadoopConf() {
CombinedSequenceFile csfScheme = new CombinedSequenceFile(Fields.ALL);
JobConf conf = new JobConf();
FlowProcess fp = new HadoopFlowProcess();
Tap<Configuration, RecordReader, OutputCollector> tap = new TempHfs(conf, "test", CombinedSequenceFile.class, false);
csfScheme.sourceConfInit(fp, tap, conf);
assertEquals("MapReduceInputFormatWrapper shold wrap mapred.SequenceFileinputFormat", "org.apache.hadoop.mapred.SequenceFileInputFormat", conf.get(MapReduceInputFormatWrapper.CLASS_CONF_KEY));
assertEquals("Delegate combiner should wrap MapReduceInputFormatWrapper", "com.twitter.elephantbird.mapreduce.input.MapReduceInputFormatWrapper", conf.get(DelegateCombineFileInputFormat.COMBINED_INPUT_FORMAT_DELEGATE));
assertEquals("DeprecatedInputFormatWrapper should wrap Delegate combiner", "com.twitter.elephantbird.mapreduce.input.combine.DelegateCombineFileInputFormat", conf.get(DeprecatedInputFormatWrapper.CLASS_CONF_KEY));
}
Aggregations