Skip to content

Instantly share code, notes, and snippets.

@shrijeet
Created May 30, 2013 18:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shrijeet/5680078 to your computer and use it in GitHub Desktop.
Save shrijeet/5680078 to your computer and use it in GitHub Desktop.
Do not run taskCleanup if running hive in sequential mode
if (tsk.ifRetryCmdWhenFail()) {
- if (running.size() != 0) {
+ if (running.size() != 0 && executeTasksInParallel()) {
taskCleanup();
}
// in case we decided to run everything in local mode, restore the
@@ -1183,7 +1183,7 @@ public class Driver implements CommandProcessor {
}
SQLState = "08S01";
console.printError(errorMessage);
- if (running.size() != 0) {
+ if (running.size() != 0 && executeTasksInParallel()) {
taskCleanup();
}
// in case we decided to run everything in local mode, restore the
@@ -1299,6 +1299,10 @@ public class Driver implements CommandProcessor {
return (0);
}
+ private boolean executeTasksInParallel() {
+ return HiveConf.getBoolVar(conf, HiveConf.ConfVars.EXECPARALLEL);
+ }
+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment