@Override
  public boolean next(NullWritable key, Row value) throws IOException {
    Preconditions.checkArgument(value != null);

    boolean hasNext = reader.next(key, data);
    if (hasNext) {
      // Deserialize data to column values, and populate the row record
      Object rowObj;
      try {
        StructObjectInspector rowOI = (StructObjectInspector) serde.getObjectInspector();
        rowObj = serde.deserialize(data);
        setRowFromStruct(value, rowObj, rowOI);
      } catch (SerDeException err) {
        LOG.debug("Error deserializing row from data: {}", data);
        throw new IOException("Error deserializing row data", err);
      }
    }

    return hasNext;
  }
Row-based record reader for LLAP.
llap-client/src/java/org/apache/hadoop/hive/llap/LlapRowRecordReader.java