|
Oracle® Loader for Hadoop Java API Reference for Linux Release 1.1 E20858-03 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
org.apache.hadoop.mapreduce.RecordReader<org.apache.avro.generic.IndexedRecord,org.apache.hadoop.io.NullWritable>
oracle.hadoop.loader.examples.CSVInputFormat.CSVRecordReader
public static class CSVInputFormat.CSVRecordReader
The record reader parses the input data into key/value pairs which are read by OraLoaderMapper. It produces an org.apache.avro.generic.IndexedRecord for the key and a org.apache.hadoop.io.NullWritable for the value.
| Constructor Summary | |
|---|---|
CSVInputFormat.CSVRecordReader(org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text> textRecordReader) |
|
| Method Summary | |
|---|---|
void |
close()Close the record reader. |
org.apache.avro.generic.IndexedRecord |
getCurrentKey()Get the current key. |
org.apache.hadoop.io.NullWritable |
getCurrentValue()Get the current value, always a NullWritable object. |
float |
getProgress()The current progress of the record reader through its data. |
void |
initialize(org.apache.hadoop.mapreduce.InputSplit split, org.apache.hadoop.mapreduce.TaskAttemptContext context)Called once at initialization. |
boolean |
nextKeyValue()Read the next key, value pair. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CSVInputFormat.CSVRecordReader(org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text> textRecordReader)
| Method Detail |
|---|
public org.apache.avro.generic.IndexedRecord getCurrentKey()
throws java.io.IOException,
java.lang.InterruptedException
IndexedRecord which is returned as the key value.getCurrentKey in class org.apache.hadoop.mapreduce.RecordReader<org.apache.avro.generic.IndexedRecord,org.apache.hadoop.io.NullWritable>java.io.IOExceptionjava.lang.InterruptedException
public org.apache.hadoop.io.NullWritable getCurrentValue()
throws java.io.IOException,
java.lang.InterruptedException
NullWritable object.getCurrentValue in class org.apache.hadoop.mapreduce.RecordReader<org.apache.avro.generic.IndexedRecord,org.apache.hadoop.io.NullWritable>NullWritable object.java.io.IOExceptionjava.lang.InterruptedException
public void initialize(org.apache.hadoop.mapreduce.InputSplit split,
org.apache.hadoop.mapreduce.TaskAttemptContext context)
throws java.io.IOException,
java.lang.InterruptedException
initialize in class org.apache.hadoop.mapreduce.RecordReader<org.apache.avro.generic.IndexedRecord,org.apache.hadoop.io.NullWritable>split - the split that defines the range of records to readcontext - the information about the taskjava.io.IOExceptionjava.lang.InterruptedException
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in class org.apache.hadoop.mapreduce.RecordReader<org.apache.avro.generic.IndexedRecord,org.apache.hadoop.io.NullWritable>java.io.IOException
public boolean nextKeyValue()
throws java.io.IOException,
java.lang.InterruptedException
nextKeyValue in class org.apache.hadoop.mapreduce.RecordReader<org.apache.avro.generic.IndexedRecord,org.apache.hadoop.io.NullWritable>java.io.IOExceptionjava.lang.InterruptedException
public float getProgress()
throws java.io.IOException,
java.lang.InterruptedException
getProgress in class org.apache.hadoop.mapreduce.RecordReader<org.apache.avro.generic.IndexedRecord,org.apache.hadoop.io.NullWritable>java.io.IOExceptionjava.lang.InterruptedException
|
Oracle® Loader for Hadoop Java API Reference for Linux Release 1.1 E20858-03 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||