public class WholeTextFileRecordReader
extends org.apache.hadoop.mapreduce.RecordReader<String,String>
implements org.apache.hadoop.conf.Configurable
RecordReader
for reading a single whole text file
out in a key-value pair, where the key is the file path and the value is the entire content of
the file.Constructor and Description |
---|
WholeTextFileRecordReader(org.apache.hadoop.mapreduce.lib.input.CombineFileSplit split,
org.apache.hadoop.mapreduce.TaskAttemptContext context,
Integer index) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
org.apache.hadoop.conf.Configuration |
getConf() |
String |
getCurrentKey() |
String |
getCurrentValue() |
float |
getProgress() |
void |
initialize(org.apache.hadoop.mapreduce.InputSplit split,
org.apache.hadoop.mapreduce.TaskAttemptContext context) |
boolean |
nextKeyValue() |
void |
setConf(org.apache.hadoop.conf.Configuration c) |
public WholeTextFileRecordReader(org.apache.hadoop.mapreduce.lib.input.CombineFileSplit split, org.apache.hadoop.mapreduce.TaskAttemptContext context, Integer index)
public void setConf(org.apache.hadoop.conf.Configuration c)
setConf
in interface org.apache.hadoop.conf.Configurable
public org.apache.hadoop.conf.Configuration getConf()
getConf
in interface org.apache.hadoop.conf.Configurable
public void initialize(org.apache.hadoop.mapreduce.InputSplit split, org.apache.hadoop.mapreduce.TaskAttemptContext context)
initialize
in class org.apache.hadoop.mapreduce.RecordReader<String,String>
public void close()
close
in interface java.io.Closeable
close
in interface AutoCloseable
close
in class org.apache.hadoop.mapreduce.RecordReader<String,String>
public float getProgress()
getProgress
in class org.apache.hadoop.mapreduce.RecordReader<String,String>
public String getCurrentKey()
getCurrentKey
in class org.apache.hadoop.mapreduce.RecordReader<String,String>
public String getCurrentValue()
getCurrentValue
in class org.apache.hadoop.mapreduce.RecordReader<String,String>
public boolean nextKeyValue()
nextKeyValue
in class org.apache.hadoop.mapreduce.RecordReader<String,String>