You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by tm...@apache.org on 2018/05/29 21:35:15 UTC

impala git commit: IMPALA-7088: Fix uninitialized variable in cluster dataload

Repository: impala
Updated Branches:
  refs/heads/master 4653637b9 -> 573550ca2


IMPALA-7088: Fix uninitialized variable in cluster dataload

bin/load-data.py uses a unique directory for local Hive
execution to avoid a race condition when executing multiple
Hive commands at once. This unique directory is not needed
when loading on a real cluster. However, the code to remove
the unique directory at the end does not handle this
correctly.

This skips the code to remove the unique directory when
it is uninitialized.

Change-Id: I5581a45460dc341842d77eaa09647e50f35be6c7
Reviewed-on: http://gerrit.cloudera.org:8080/10526
Reviewed-by: Joe McDonnell <jo...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>


Project: http://git-wip-us.apache.org/repos/asf/impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/impala/commit/573550ca
Tree: http://git-wip-us.apache.org/repos/asf/impala/tree/573550ca
Diff: http://git-wip-us.apache.org/repos/asf/impala/diff/573550ca

Branch: refs/heads/master
Commit: 573550ca2f781ff5cb781a6c6dcdfcbfc25edf04
Parents: 4653637
Author: Joe McDonnell <jo...@cloudera.com>
Authored: Tue May 29 10:36:51 2018 -0700
Committer: Impala Public Jenkins <im...@cloudera.com>
Committed: Tue May 29 21:34:02 2018 +0000

----------------------------------------------------------------------
 bin/load-data.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/impala/blob/573550ca/bin/load-data.py
----------------------------------------------------------------------
diff --git a/bin/load-data.py b/bin/load-data.py
index 2b9e05c..7754147 100755
--- a/bin/load-data.py
+++ b/bin/load-data.py
@@ -167,7 +167,8 @@ def exec_hive_query_from_file_beeline(file_name):
   output_file = file_name + ".log"
   hive_cmd = "{0} {1} -f {2}".format(HIVE_CMD, hive_args, file_name)
   is_success = exec_cmd(hive_cmd, exit_on_error=False, out_file=output_file)
-  shutil.rmtree(unique_dir)
+  if unique_dir:
+    shutil.rmtree(unique_dir)
 
   if is_success:
     LOG.info("Finished execution of hive SQL: {0}".format(file_name))