@Override
  public RecordWriter getHiveRecordWriter(JobConf jc, Path finalOutPath,
      Class<? extends Writable> valueClass, boolean isCompressed,
      Properties tableProperties, Progressable progress) throws IOException {

    FileSystem fs = finalOutPath.getFileSystem(jc);
    final SequenceFile.Writer outStream = Utilities.createSequenceWriter(jc, fs, finalOutPath,
    BytesWritable.class, valueClass, isCompressed, progress);

    return new RecordWriter() {
      @Override
      public void write(Writable r) throws IOException {
        outStream.append(EMPTY_KEY, r);
      }

      @Override
      public void close(boolean abort) throws IOException {
        outStream.close();
      }
    };
  }
create the final out file, and output an empty key as the key.

@param jc
         the job configuration file
@param finalOutPath
         the final output file to be created
@param valueClass
         the value class used for create
@param isCompressed
         whether the content is compressed or not
@param tableProperties
         the tableInfo of this file's corresponding table
@param progress
         progress used for status report
@return the RecordWriter for the output file
ql/src/java/org/apache/hadoop/hive/ql/io/HiveSequenceFileOutputFormat.java