use of org.apache.hadoop.hive.ql.exec.MapRedTask in project SQLWindowing by hbutani.
the class MRExecutor method executePlan.
/**
* Invoke the MapRedTask and set the MapRedWork
* query plan to be used for execution.
* MapRedTask (an extension to the ExecDriver) is
* used to execute the query plan on Hadoop.
* @param mr
* @param hiveConf
* @throws Exception
*/
private void executePlan(MapredWork mr, HiveConf hiveConf) throws Exception {
MapRedTask mrtask = new MapRedTask();
DriverContext dctx = new DriverContext();
mrtask.setWork(mr);
mrtask.initialize(hiveConf, null, dctx);
int exitVal = mrtask.execute(dctx);
if (exitVal != 0) {
System.out.println("Test execution failed with exit status: " + exitVal);
throw new WindowingException("Test execution failed with exit status: " + exitVal);
} else
System.out.println("Test execution completed successfully");
}
Aggregations