public static class HadoopShimsSecure.CombineFileRecordReader<K,V> extends Object implements org.apache.hadoop.mapred.RecordReader<K,V>
Modifier and Type | Field and Description |
---|---|
protected org.apache.hadoop.mapred.RecordReader<K,V> |
curReader |
protected org.apache.hadoop.fs.FileSystem |
fs |
protected int |
idx |
protected boolean |
isShrinked |
protected org.apache.hadoop.mapred.JobConf |
jc |
protected long |
progress |
protected org.apache.hadoop.mapred.Reporter |
reporter |
protected Class<org.apache.hadoop.mapred.RecordReader<K,V>> |
rrClass |
protected Constructor<org.apache.hadoop.mapred.RecordReader<K,V>> |
rrConstructor |
protected long |
shrinkedLength |
protected org.apache.hadoop.mapred.lib.CombineFileSplit |
split |
Constructor and Description |
---|
HadoopShimsSecure.CombineFileRecordReader(org.apache.hadoop.mapred.JobConf job,
org.apache.hadoop.mapred.lib.CombineFileSplit split,
org.apache.hadoop.mapred.Reporter reporter,
Class<org.apache.hadoop.mapred.RecordReader<K,V>> rrClass)
A generic RecordReader that can hand out different recordReaders
for each chunk in the CombineFileSplit.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
K |
createKey() |
V |
createValue() |
long |
getPos()
Return the amount of data processed.
|
float |
getProgress()
Return progress based on the amount of data processed so far.
|
protected boolean |
initNextRecordReader(K key)
Get the record reader for the next chunk in this CombineFileSplit.
|
boolean |
next(K key,
V value) |
protected org.apache.hadoop.mapred.lib.CombineFileSplit split
protected org.apache.hadoop.mapred.JobConf jc
protected org.apache.hadoop.mapred.Reporter reporter
protected Constructor<org.apache.hadoop.mapred.RecordReader<K,V>> rrConstructor
protected org.apache.hadoop.fs.FileSystem fs
protected int idx
protected long progress
protected boolean isShrinked
protected long shrinkedLength
public HadoopShimsSecure.CombineFileRecordReader(org.apache.hadoop.mapred.JobConf job, org.apache.hadoop.mapred.lib.CombineFileSplit split, org.apache.hadoop.mapred.Reporter reporter, Class<org.apache.hadoop.mapred.RecordReader<K,V>> rrClass) throws IOException
IOException
public boolean next(K key, V value) throws IOException
next
in interface org.apache.hadoop.mapred.RecordReader<K,V>
IOException
public K createKey()
public V createValue()
public long getPos() throws IOException
getPos
in interface org.apache.hadoop.mapred.RecordReader<K,V>
IOException
public void close() throws IOException
close
in interface org.apache.hadoop.mapred.RecordReader<K,V>
IOException
public float getProgress() throws IOException
getProgress
in interface org.apache.hadoop.mapred.RecordReader<K,V>
IOException
protected boolean initNextRecordReader(K key) throws IOException
IOException
Copyright © 2017 The Apache Software Foundation. All rights reserved.