IMPALA-7579: fix test_query_profile_contains_all_events on S3

This bug was introduced by IMPALA-6568 which added the
test_query_profile_contains_all_events test. This test creates a file
in the filesystem so that it can be used by 'load data inpath'. The
test was using the hdfs_client object to do file system operations, but
this client only works with hdfs. Switch to using the filesystem_client
object which can work on other filesystems, including s3. Also create
the file that will be moved by 'load data inpath' under the unique
database directory; this means the file can be created without having to
check if it exists already and must be deleted.

Change-Id: I7c6e0899455dd4e12636b959fab4bde79f02fb95
Reviewed-on: http://gerrit.cloudera.org:8080/11461
Reviewed-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com>


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

Branch: refs/heads/master
Commit: e4b349e15a47fc113f20233fed19d2a494f5878c
Parents: 1d4a3f0
Author: Andrew Sherman <asher...@cloudera.com>
Authored: Mon Sep 17 15:03:49 2018 -0700
Committer: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Committed: Wed Sep 19 22:07:06 2018 +0000

----------------------------------------------------------------------
 tests/query_test/test_observability.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/impala/blob/e4b349e1/tests/query_test/test_observability.py
----------------------------------------------------------------------
diff --git a/tests/query_test/test_observability.py 
b/tests/query_test/test_observability.py
index 73a58b1..7e5c757 100644
--- a/tests/query_test/test_observability.py
+++ b/tests/query_test/test_observability.py
@@ -221,9 +221,8 @@ class TestObservability(ImpalaTestSuite):
   def test_query_profile_contains_all_events(self, unique_database):
     """Test that the expected events show up in a query profile for various 
queries"""
     # make a data file to load data from
-    path = "tmp/{0}/data_file".format(unique_database)
-    self.hdfs_client.delete_file_dir(path)
-    self.hdfs_client.create_file(path, "1")
+    path = "test-warehouse/{0}.db/data_file".format(unique_database)
+    self.filesystem_client.create_file(path, "1")
     use_query = "use {0}".format(unique_database)
     self.execute_query(use_query)
     # all the events we will see for every query

Reply via email to