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/05/16 21:56:16 UTC

[impala] 02/03: IMPALA-8369 : Skip test_owner_privileges test when running against Hive-3

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 f203dfa983f90624e371b229e1f4f8898b7106d4
Author: Vihang Karajgaonkar <vi...@cloudera.com>
AuthorDate: Tue May 14 17:51:28 2019 -0700

    IMPALA-8369 : Skip test_owner_privileges test when running against Hive-3
    
    Currently, when running with USE_CDP_HIVE=true, Sentry service's sync
    with HMS is very slow. This is most likely due to the fact that in HMS-3
    the notification events are generated using the JSONMessageFactory
    provided by Metastore, unlike in case of HMS-2 setup. When running
    against HMS-2, Sentry provides its own MessageFactory implementation
    which has its limitations and cannot be used in HMS-3. In order to fix
    this Sentry should add support for the out-of-box message factory
    available in Hive-3 (See SENTRY-2518).
    
    Due to these additional delays from Sentry test_owner_privileges fails
    due to race conditions between the cached information in catalog and
    Sentry server (See IMPALA-8550). This patch disables this
    test when running against HMS-3 until we fix the issues both on
    the Sentry and Impala side.
    
    Testing done:
    1. Confirmed the test is skipped when using USE_CDP_HIVE=true
    2. Confirmed the test is not skipped when using USE_CDP_HIVE=false
    
    Change-Id: I9f904446f50b5095443bf27b3092a2e3665b76d3
    Reviewed-on: http://gerrit.cloudera.org:8080/13339
    Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
    Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
 tests/authorization/test_owner_privileges.py | 2 ++
 tests/common/skip.py                         | 7 ++++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/tests/authorization/test_owner_privileges.py b/tests/authorization/test_owner_privileges.py
index ea0e4ac..4a183e9 100644
--- a/tests/authorization/test_owner_privileges.py
+++ b/tests/authorization/test_owner_privileges.py
@@ -24,6 +24,7 @@ from os import getenv
 
 from tests.common.sentry_cache_test_suite import SentryCacheTestSuite, TestObject
 from tests.common.test_dimensions import create_uncompressed_text_dimension
+from tests.common.skip import SkipIfHive3
 
 # Sentry long polling frequency to make Sentry refresh not run.
 SENTRY_LONG_POLLING_FREQUENCY_S = 3600
@@ -35,6 +36,7 @@ SENTRY_CONFIG_FILE_OO_NOGRANT = SENTRY_CONFIG_DIR + 'sentry-site_oo_nogrant.xml'
 SENTRY_CONFIG_FILE_NO_OO = SENTRY_CONFIG_DIR + 'sentry-site_no_oo.xml'
 
 
+@SkipIfHive3.sentry_not_supported
 class TestOwnerPrivileges(SentryCacheTestSuite):
   @classmethod
   def add_test_dimensions(cls):
diff --git a/tests/common/skip.py b/tests/common/skip.py
index 8c2bdfb..e1b060a 100644
--- a/tests/common/skip.py
+++ b/tests/common/skip.py
@@ -25,7 +25,7 @@ import pytest
 from functools import partial
 
 from tests.common.environ import (IMPALA_TEST_CLUSTER_PROPERTIES,
-    IS_DOCKERIZED_TEST_CLUSTER, IS_BUGGY_EL6_KERNEL)
+    IS_DOCKERIZED_TEST_CLUSTER, IS_BUGGY_EL6_KERNEL, HIVE_MAJOR_VERSION)
 from tests.common.kudu_test_suite import get_kudu_master_flag
 from tests.util.filesystem_utils import (
     IS_ABFS,
@@ -199,6 +199,11 @@ class SkipIfDockerizedCluster:
       reason="IMPALA-8384: insert ACL tests are broken on dockerised minicluster.")
 
 
+class SkipIfHive3:
+  sentry_not_supported = pytest.mark.skipif(HIVE_MAJOR_VERSION >= 3,
+      reason="Sentry HMS follower does not work with HMS-3. See SENTRY-2518 for details")
+
+
 class SkipIfCatalogV2:
   """Expose decorators as methods so that is_catalog_v2_cluster() can be evaluated lazily
   when needed, instead of whenever this module is imported."""