public static RCFile.Writer createRCFileWriter(JobConf jc, FileSystem fs, Path file,
      boolean isCompressed, Progressable progressable) throws IOException {
    CompressionCodec codec = null;
    if (isCompressed) {
      Class<?> codecClass = FileOutputFormat.getOutputCompressorClass(jc, DefaultCodec.class);
      codec = (CompressionCodec) ReflectionUtil.newInstance(codecClass, jc);
    }
    return new RCFile.Writer(fs, jc, file, progressable, codec);
  }
Create a RCFile output stream based on job configuration Uses user supplied compression flag
(rather than obtaining it from the Job Configuration).

@param jc
         Job configuration
@param fs
         File System to create file in
@param file
         Path to be created
@return output stream over the created rcfile
ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java