在如下的代码后:
TezConfiguration tezConf;
if (conf != null) {
tezConf = new TezConfiguration(conf);
} else {
tezConf = new TezConfiguration();
}
加入:
/**
* decide outputfile whether to be compress;
*/
tezConf.setBoolean(FileOutputFormat.COMPRESS,
tezConf.getBoolean("isCompress", false));
/**
* decide outputfile name;
*/
tezConf.set("mapreduce.output.basename",
tezConf.get("fileName", "Tez.log"));
更精确的控制,可以参看“org.apache.hadoop.mapreduce.lib.output.FileOutputFormat<K, V>“类。