public int next(Writable row) throws IOException {
    int recordLength = in.read(bytes.get(), 0, maxRecordLength);
    if (recordLength >= 0) {
      bytes.setSize(recordLength);
    }
    return recordLength;
  }
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.
ql/src/java/org/apache/hadoop/hive/ql/exec/BinaryRecordReader.java