You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by jo...@apache.org on 2019/06/25 22:04:57 UTC

[impala] 01/02: IMPALA-8315: ignore rmtree errors in run_stmt_in_hive()

This is an automated email from the ASF dual-hosted git repository.

joemcdonnell pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git

commit 9e117be4a63ae90e80b6d99a004750e5d3d9744a
Author: Tim Armstrong <ta...@cloudera.com>
AuthorDate: Mon Jun 24 22:48:34 2019 -0700

    IMPALA-8315: ignore rmtree errors in run_stmt_in_hive()
    
    Per Joe's suggestion in the JIRA, we shouldn't fail the
    test if rmtree() hits an error.
    
    Change-Id: Ic303b61e4df0a7a3fcabbae812a6d2b9a8aa52df
    Reviewed-on: http://gerrit.cloudera.org:8080/13720
    Tested-by: Impala Public Jenkins <im...@cloudera.com>
    Reviewed-by: Joe McDonnell <jo...@cloudera.com>
---
 tests/common/impala_test_suite.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/common/impala_test_suite.py b/tests/common/impala_test_suite.py
index 5a89cf3..f1db981 100644
--- a/tests/common/impala_test_suite.py
+++ b/tests/common/impala_test_suite.py
@@ -879,7 +879,9 @@ class ImpalaTestSuite(BaseTestSuite):
         raise RuntimeError(stderr)
       return stdout
     finally:
-      if tmpdir is not None: shutil.rmtree(tmpdir)
+      # IMPALA-8315: removing the directory may race with Hive's own cleanup and cause
+      # errors.
+      if tmpdir is not None: shutil.rmtree(tmpdir, ignore_errors=True)
 
   def hive_partition_names(self, table_name):
     """Find the names of the partitions of a table, as Hive sees them.