@Override
    public void write(NullWritable key, OrcSerdeRow row)
        throws IOException, InterruptedException {
      if (writer == null) {
        options.inspector(row.getInspector());
        writer = OrcFile.createWriter(path, options);
      }
      writer.addRow(row.getRow());
    }
An OutputFormat that writes ORC files.
ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcNewOutputFormat.java