Package org.apache.trevni.avro.mapreduce

# Class AvroTrevniKeyValueInputFormat<K,V>

java.lang.Object
org.apache.hadoop.mapreduce.InputFormat<org.apache.avro.mapred.AvroKey<K>,org.apache.avro.mapred.AvroValue<V>>
org.apache.hadoop.mapreduce.lib.input.FileInputFormat<org.apache.avro.mapred.AvroKey<K>,org.apache.avro.mapred.AvroValue<V>>
org.apache.trevni.avro.mapreduce.AvroTrevniKeyValueInputFormat<K,V>

Type Parameters:
  `K` - The type of the Trevni key to read.
  `V` - The type of the Trevni value to read.

  A subset schema to be read may be specified with `AvroJob.setInputKeySchema(org.apache.hadoop.mapreduce.Job, org.apache.avro.Schema)` and `AvroJob.setInputValueSchema(org.apache.hadoop.mapreduce.Job, org.apache.avro.Schema)`.

public class AvroTrevniKeyValueInputFormat<K,V> extends FileInputFormat<org.apache.avro.mapred.AvroKey<K>,org.apache.avro.mapred.AvroValue<V>>
An `InputFormat` for Trevni files. This implement was modeled off `AvroKeyValueInputFormat` to allow for easy transition

A MapReduce InputFormat that reads from Trevni container files of key/value generic records.

Trevni container files that container generic records with the two fields 'key' and 'value' are expected. The contents of the 'key' field will be used as the job input key, and the contents of the 'value' field will be used as the job output value.

## Nested Class Summary

## Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.lib.input.FileInputFormat

`FileInputFormat.Counter`

## Field Summary

### Fields inherited from class org.apache.hadoop.mapreduce.lib.input.FileInputFormat

`DEFAULT_LIST_STATUS_NUM_THREADS, INPUT_DIR, INPUT_DIR_NONRECURSIVE_IGNORE_SUBDIRS, INPUT_DIR_RECURSIVE, LIST_STATUS_NUM_THREADS, NUM_INPUT_FILES, PATHFILTER_CLASS, SPLIT_MAXSIZE, SPLIT_MINSIZE`

## Constructor Summary

Constructors
Constructor
Description
`AvroTrevniKeyValueInputFormat()`

## Method Summary

Modifier and Type
Method
Description
`RecordReader<org.apache.avro.mapred.AvroKey<K>,org.apache.avro.mapred.AvroValue<V>>`
`createRecordReader(InputSplit split, TaskAttemptContext context)`

### Methods inherited from class org.apache.hadoop.mapreduce.lib.input.FileInputFormat

`addInputPath, addInputPathRecursively, addInputPaths, computeSplitSize, getBlockIndex, getFormatMinSplitSize, getInputDirRecursive, getInputPathFilter, getInputPaths, getMaxSplitSize, getMinSplitSize, getSplits, isSplitable, listStatus, makeSplit, makeSplit, setInputDirRecursive, setInputPathFilter, setInputPaths, setInputPaths, setMaxInputSplitSize, setMinInputSplitSize`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### AvroTrevniKeyValueInputFormat

public AvroTrevniKeyValueInputFormat()

## Method Details

### createRecordReader

public RecordReader<org.apache.avro.mapred.AvroKey<K>,org.apache.avro.mapred.AvroValue<V>> createRecordReader(InputSplit split, TaskAttemptContext context) throws IOException, InterruptedException

Specified by:
  `createRecordReader` in class `InputFormat<org.apache.avro.mapred.AvroKey<K>,org.apache.avro.mapred.AvroValue<V>>`
Throws:
  `IOException`
  `InterruptedException`