Search in sources :

Example 1 with RCFileOutputFormat

use of org.apache.hadoop.hive.ql.io.RCFileOutputFormat in project presto by prestodb.

the class RcFileTester method createRcFileWriterOld.

private static RecordWriter createRcFileWriterOld(File outputFile, Compression compression, ObjectInspector columnObjectInspector) throws IOException {
    JobConf jobConf = new JobConf(false);
    Optional<String> codecName = compression.getCodecName();
    codecName.ifPresent(s -> jobConf.set(COMPRESS_CODEC, s));
    return new RCFileOutputFormat().getHiveRecordWriter(jobConf, new Path(outputFile.toURI()), Text.class, codecName.isPresent(), createTableProperties("test", columnObjectInspector.getTypeName()), () -> {
    });
}
Also used : Path(org.apache.hadoop.fs.Path) RCFileOutputFormat(org.apache.hadoop.hive.ql.io.RCFileOutputFormat) JobConf(org.apache.hadoop.mapred.JobConf)

Aggregations

Path (org.apache.hadoop.fs.Path)1 RCFileOutputFormat (org.apache.hadoop.hive.ql.io.RCFileOutputFormat)1 JobConf (org.apache.hadoop.mapred.JobConf)1