Java Code Examples for org.apache.hadoop.mapreduce.lib.input.CombineFileRecordReader

The following examples show how to use org.apache.hadoop.mapreduce.lib.input.CombineFileRecordReader. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: datafu   Source File: CombinedAvroKeyInputFormat.java    License: Apache License 2.0 5 votes vote down vote up
@SuppressWarnings("unchecked")
@Override
public RecordReader<AvroKey<T>, NullWritable> createRecordReader(InputSplit inputSplit,
                                                                 TaskAttemptContext context) throws IOException
{
  Schema readerSchema = AvroJob.getInputKeySchema(context.getConfiguration());
  if (null == readerSchema) {
    LOG.warn("Reader schema was not set. Use AvroJob.setInputKeySchema() if desired.");
    LOG.info("Using a reader schema equal to the writer schema.");
  }
      
  Object c = CombinedAvroKeyRecordReader.class;
  return new CombineFileRecordReader<AvroKey<T>, NullWritable>((CombineFileSplit) inputSplit, context, (Class<? extends RecordReader<AvroKey<T>, NullWritable>>)c);
}
 
Example 2
Source Project: incubator-pinot   Source File: CombineAvroKeyInputFormat.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public RecordReader<AvroKey<T>, NullWritable> createRecordReader(InputSplit split, TaskAttemptContext context)
    throws IOException {
  Class cls = AvroKeyRecordReaderWrapper.class;

  return new CombineFileRecordReader<>((CombineFileSplit) split, context,
      (Class<? extends RecordReader<AvroKey<T>, NullWritable>>) cls);
}
 
Example 3
Source Project: datawave   Source File: TextSequenceFileCombinerFormat.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public RecordReader<Text,Counters> createRecordReader(InputSplit split, TaskAttemptContext context) throws IOException {
    return new CombineFileRecordReader<>((CombineFileSplit) split, context, TextRecordReader.class);
}
 
Example 4
@Override
public RecordReader<NullWritable,Counters> createRecordReader(InputSplit split, TaskAttemptContext context) throws IOException {
    return new CombineFileRecordReader<>((CombineFileSplit) split, context, NullRecordReader.class);
}
 
Example 5
@Override
public RecordReader<NullWritable,Spread> createRecordReader( final InputSplit split , final TaskAttemptContext context)throws IOException{
  return new CombineFileRecordReader<NullWritable,Spread>( (CombineFileSplit)split , context , MDSCombineSpreadReader.class );
}
 
Example 6
Source Project: hadoop   Source File: MultiFileWordCount.java    License: Apache License 2.0 4 votes vote down vote up
public RecordReader<WordOffset,Text> createRecordReader(InputSplit split,
    TaskAttemptContext context) throws IOException {
  return new CombineFileRecordReader<WordOffset, Text>(
    (CombineFileSplit)split, context, CombineFileLineRecordReader.class);
}
 
Example 7
Source Project: big-c   Source File: MultiFileWordCount.java    License: Apache License 2.0 4 votes vote down vote up
public RecordReader<WordOffset,Text> createRecordReader(InputSplit split,
    TaskAttemptContext context) throws IOException {
  return new CombineFileRecordReader<WordOffset, Text>(
    (CombineFileSplit)split, context, CombineFileLineRecordReader.class);
}
 
Example 8
@Override
public RecordReader<NullWritable, OrcValue> createRecordReader(InputSplit split, TaskAttemptContext context)
    throws IOException {
  return new CombineFileRecordReader((CombineFileSplit) split, context, OrcValueCombineFileRecordReader.class);
}
 
Example 9
@Override
public RecordReader<AvroKey<GenericRecord>, NullWritable> createRecordReader(InputSplit split, TaskAttemptContext cx)
    throws IOException {
  return new CombineFileRecordReader<>((CombineFileSplit) split, cx, AvroKeyCombineFileRecordReader.class);
}
 
Example 10
Source Project: incubator-retired-blur   Source File: CsvBlurDriver.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public RecordReader<Writable, Text> createRecordReader(InputSplit split, TaskAttemptContext context)
    throws IOException {
  return new CombineFileRecordReader<Writable, Text>((CombineFileSplit) split, context,
      SequenceFileRecordReaderWrapper.class);
}