org.apache.hadoop.hive.ql.exec
Class BinaryRecordReader
java.lang.Object
org.apache.hadoop.hive.ql.exec.BinaryRecordReader
- All Implemented Interfaces:
- RecordReader
public class BinaryRecordReader
- extends Object
- implements RecordReader
Read from a binary stream and treat each 1000 bytes (configurable via
hive.binary.record.max.length) as a record. The last record before the
end of stream can have less than 1000 bytes.
Method Summary |
void |
close()
|
org.apache.hadoop.io.Writable |
createRow()
|
void |
initialize(InputStream in,
org.apache.hadoop.conf.Configuration conf,
Properties tbl)
|
int |
next(org.apache.hadoop.io.Writable row)
Returns the number of bytes that we consumed. |
BinaryRecordReader
public BinaryRecordReader()
initialize
public void initialize(InputStream in,
org.apache.hadoop.conf.Configuration conf,
Properties tbl)
throws IOException
- Specified by:
initialize
in interface RecordReader
- Throws:
IOException
createRow
public org.apache.hadoop.io.Writable createRow()
throws IOException
- Specified by:
createRow
in interface RecordReader
- Throws:
IOException
next
public int next(org.apache.hadoop.io.Writable row)
throws IOException
- Description copied from interface:
RecordReader
- Returns the number of bytes that we consumed.
-1 means end of stream.
- Specified by:
next
in interface RecordReader
- Throws:
IOException
close
public void close()
throws IOException
- Specified by:
close
in interface RecordReader
- Throws:
IOException
Copyright © 2014 The Apache Software Foundation. All rights reserved.