use of org.apache.hadoop.hive.ql.plan.ExtractDesc in project SQLWindowing by hbutani.
the class MRExecutor method createReduceSideTree.
/**
* The reduce-side plan always looks like
* ExtratOperator->PTFOperator->FileSinkOperator.
* Use the data structures initialized in MRUtils to
* create the operators here.
* @param qdef
* @param mrUtils
* @param mr
* @throws WindowingException
*/
@SuppressWarnings("unchecked")
private void createReduceSideTree(QueryDef qdef, MRUtils mrUtils, MapredWork mr) throws WindowingException {
// reduce side work
Operator<FileSinkDesc> op4 = OperatorFactory.get(new FileSinkDesc(mrUtils.getOutputPath(), createOutputTableDesc(qdef), false));
Operator<PTFDesc> op3 = RuntimeUtils.createPTFOperator(new PTFDesc(SerializationUtils.serializeQueryDef(qdef)), op4);
Operator<ExtractDesc> op2 = OperatorFactory.get(new ExtractDesc(TranslateUtils.getStringColumn(Utilities.ReduceField.VALUE.toString())), op3);
mr.setReducer(op2);
}
Aggregations