public static class XMLLoader.XMLRecordReader
extends org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
setXMLIdentifier(String). It there are nesting tags of the given
identifier, only the top level one is returned which also includes all
enclosed tags.| Modifier and Type | Field and Description |
|---|---|
protected org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text> |
wrapped |
| Constructor and Description |
|---|
XMLRecordReader(org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text> wrapped) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
boolean |
equals(Object obj) |
org.apache.hadoop.io.LongWritable |
getCurrentKey() |
org.apache.hadoop.io.Text |
getCurrentValue() |
float |
getProgress() |
int |
hashCode() |
void |
initialize(org.apache.hadoop.mapreduce.InputSplit split,
org.apache.hadoop.mapreduce.TaskAttemptContext context)
Delegate the initialization method to the wrapped stream after changing
the length of the split to be non-ending.
|
boolean |
nextKeyValue() |
void |
setXMLIdentifier(String identifier) |
String |
toString() |
protected final org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text> wrapped
public XMLRecordReader(org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text> wrapped)
public void initialize(org.apache.hadoop.mapreduce.InputSplit split,
org.apache.hadoop.mapreduce.TaskAttemptContext context)
throws IOException,
InterruptedException
initialize in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>IOExceptionInterruptedExceptionpublic void setXMLIdentifier(String identifier)
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>IOExceptionpublic org.apache.hadoop.io.LongWritable getCurrentKey()
throws IOException,
InterruptedException
getCurrentKey in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>IOExceptionInterruptedExceptionpublic org.apache.hadoop.io.Text getCurrentValue()
throws IOException,
InterruptedException
getCurrentValue in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>IOExceptionInterruptedExceptionpublic float getProgress()
throws IOException,
InterruptedException
getProgress in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>IOExceptionInterruptedExceptionpublic boolean nextKeyValue()
throws IOException,
InterruptedException
nextKeyValue in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>IOExceptionInterruptedExceptionCopyright © 2007-2017 The Apache Software Foundation