public void write(final ParquetHiveRecord record) {
    if (record != null) {
      if (messageWriter == null) {
        try {
          messageWriter = createMessageWriter(record.getObjectInspector(), schema);
        } catch (RuntimeException e) {
          String errorMessage = "Parquet record is malformed: " + e.getMessage();
          LOG.error(errorMessage, e);
          throw new RuntimeException(errorMessage, e);
        }
      }

      messageWriter.write(record.getObject());
    }
  }
It writes a record to Parquet.
@param record Contains the record that is going to be written.
ql/src/java/org/apache/hadoop/hive/ql/io/parquet/write/DataWritableWriter.java