public class TableRecordReader extends org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.BytesWritable,Tuple>
| Constructor and Description |
|---|
TableRecordReader(org.apache.hadoop.zebra.mapreduce.TableExpr expr,
String projection,
org.apache.hadoop.mapreduce.InputSplit split,
org.apache.hadoop.mapreduce.JobContext jobContext) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
atEnd()
Check if the end of the input has been reached
|
void |
close() |
org.apache.hadoop.io.BytesWritable |
getCurrentKey() |
Tuple |
getCurrentValue() |
long |
getPos() |
float |
getProgress() |
void |
initialize(org.apache.hadoop.mapreduce.InputSplit arg0,
org.apache.hadoop.mapreduce.TaskAttemptContext arg1) |
boolean |
nextKeyValue() |
boolean |
seekTo(org.apache.hadoop.io.BytesWritable key)
Seek to the position at the first row which has the key
or just after the key; only applicable for sorted Zebra table
|
public TableRecordReader(org.apache.hadoop.zebra.mapreduce.TableExpr expr,
String projection,
org.apache.hadoop.mapreduce.InputSplit split,
org.apache.hadoop.mapreduce.JobContext jobContext)
throws IOException,
ParseException
expr - Table expressionprojection - projection schema. Should never be null.split - the split to work onjobContext - JobContext objectIOExceptionParseExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.BytesWritable,Tuple>IOExceptionpublic long getPos()
throws IOException
IOExceptionpublic float getProgress()
throws IOException
getProgress in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.BytesWritable,Tuple>IOExceptionpublic boolean seekTo(org.apache.hadoop.io.BytesWritable key)
throws IOException
key - the key to seek onIOExceptionpublic boolean atEnd()
throws IOException
IOExceptionpublic org.apache.hadoop.io.BytesWritable getCurrentKey()
throws IOException,
InterruptedException
getCurrentKey in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.BytesWritable,Tuple>IOExceptionInterruptedExceptionpublic Tuple getCurrentValue() throws IOException, InterruptedException
getCurrentValue in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.BytesWritable,Tuple>IOExceptionInterruptedExceptionpublic void initialize(org.apache.hadoop.mapreduce.InputSplit arg0,
org.apache.hadoop.mapreduce.TaskAttemptContext arg1)
throws IOException,
InterruptedException
initialize in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.BytesWritable,Tuple>IOExceptionInterruptedExceptionpublic boolean nextKeyValue()
throws IOException,
InterruptedException
nextKeyValue in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.BytesWritable,Tuple>IOExceptionInterruptedExceptionCopyright © 2007-2012 The Apache Software Foundation