* @throws DagEngineException thrown if the job could not be created.
*/
public String submitHttpJob(Configuration conf, String jobType) throws DagEngineException {
validateSubmitConfiguration(conf);
SubmitHttpCommand submit = null;
if (jobType.equals("pig")) {
submit = new SubmitPigCommand(conf, getAuthToken());
}
else if (jobType.equals("mapreduce")) {
submit = new SubmitMRCommand(conf, getAuthToken());
}
try {
String jobId = submit.call();
start(jobId);
return jobId;
}
catch (CommandException ex) {
throw new DagEngineException(ex);