validateSubmitConfiguration(conf);
try {
String jobId;
if (useXCommand) {
SubmitHttpXCommand submit = null;
if (jobType.equals("pig")) {
submit = new SubmitPigXCommand(conf, getAuthToken());
}
else if (jobType.equals("mapreduce")) {
submit = new SubmitMRXCommand(conf, getAuthToken());
}
jobId = submit.call();
}
else {
SubmitHttpCommand submit = null;
if (jobType.equals("pig")) {
submit = new SubmitPigCommand(conf, getAuthToken());
}
else if (jobType.equals("mapreduce")) {
submit = new SubmitMRCommand(conf, getAuthToken());
}
jobId = submit.call();
}
start(jobId);
return jobId;
}
catch (CommandException ex) {