You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by mi...@apache.org on 2018/08/13 16:04:58 UTC
[1/2] impala git commit: IMPALA-7423: NoSuchMethodError when starting
Sentry
Repository: impala
Updated Branches:
refs/heads/master 9961c33e8 -> 7002ad3b3
IMPALA-7423: NoSuchMethodError when starting Sentry
The issue that is caused by the classpath ordering because of two
conflicting sentry-provider JARs:
- sentry-provider-db-2.0.0-cdh6.x-SNAPSHOT.jar
- sentry-provider-db-2.0.0-cdh6.x-SNAPSHOT-sh.jar (uses shaded Sentry
Thrift)
This patch fixes the issue by removing sentry-provider-db:2.0.0:sh from
FE dependencies.
Testing:
- Ran a clean build and was able to start Sentry
Change-Id: Ie6cdfd184e06009a8d582499b2f6fd3011de6d5a
Reviewed-on: http://gerrit.cloudera.org:8080/11187
Reviewed-by: Impala Public Jenkins <im...@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/83fc1fbb
Tree: http://git-wip-us.apache.org/repos/asf/impala/tree/83fc1fbb
Diff: http://git-wip-us.apache.org/repos/asf/impala/diff/83fc1fbb
Branch: refs/heads/master
Commit: 83fc1fbb6749b5d09089879e5f5e4c618dd91373
Parents: 9961c33
Author: Fredy Wijaya <fw...@cloudera.com>
Authored: Fri Aug 10 11:43:29 2018 -0700
Committer: Impala Public Jenkins <im...@cloudera.com>
Committed: Sat Aug 11 01:53:51 2018 +0000
----------------------------------------------------------------------
fe/pom.xml | 13 -------------
.../main/java/org/apache/impala/util/SentryUtil.java | 6 ++----
2 files changed, 2 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/impala/blob/83fc1fbb/fe/pom.xml
----------------------------------------------------------------------
diff --git a/fe/pom.xml b/fe/pom.xml
index b5f171a..ebb415e 100644
--- a/fe/pom.xml
+++ b/fe/pom.xml
@@ -180,19 +180,6 @@ under the License.
</exclusion>
</exclusions>
</dependency>
- <dependency>
- <groupId>org.apache.sentry</groupId>
- <artifactId>sentry-provider-db</artifactId>
- <version>${sentry.version}</version>
- <exclusions>
- <!-- https://issues.apache.org/jira/browse/HADOOP-14903 -->
- <exclusion>
- <groupId>net.minidev</groupId>
- <artifactId>json-smart</artifactId>
- </exclusion>
- </exclusions>
- <classifier>sh</classifier>
- </dependency>
<dependency>
<groupId>org.apache.sentry</groupId>
http://git-wip-us.apache.org/repos/asf/impala/blob/83fc1fbb/fe/src/main/java/org/apache/impala/util/SentryUtil.java
----------------------------------------------------------------------
diff --git a/fe/src/main/java/org/apache/impala/util/SentryUtil.java b/fe/src/main/java/org/apache/impala/util/SentryUtil.java
index c4aaf73..3eb7319 100644
--- a/fe/src/main/java/org/apache/impala/util/SentryUtil.java
+++ b/fe/src/main/java/org/apache/impala/util/SentryUtil.java
@@ -31,13 +31,11 @@ import org.apache.sentry.core.common.exception.SentryUserException;
*/
public class SentryUtil {
static boolean isSentryAlreadyExists(Exception e) {
- return e instanceof SentryAlreadyExistsException || e instanceof
- sentry.org.apache.sentry.core.common.exception.SentryAlreadyExistsException;
+ return e instanceof SentryAlreadyExistsException;
}
static boolean isSentryAccessDenied(Exception e) {
- return e instanceof SentryAccessDeniedException || e instanceof
- sentry.org.apache.sentry.core.common.exception.SentryAccessDeniedException;
+ return e instanceof SentryAccessDeniedException;
}
public static boolean isSentryGroupNotFound(Exception e) {
[2/2] impala git commit: IMPALA-7398: Add logged_in_user alias for
effective_user
Posted by mi...@apache.org.
IMPALA-7398: Add logged_in_user alias for effective_user
This patch adds an alias to the effective_user function so that
views created in Hive using the logged_in_user function will work
in Impala.
Example:
CREATE VIEW foo.view1 AS SELECT * FROM foo.table1 WHERE
name=logged_in_user();
Tests:
- Added function and ran delegation tests
- Ran backend tests
- Ran custom-cluster tests including delegation
Change-Id: Id63f243e0fffbe2798f1f9dbc4cc3ebe9d9529a6
Reviewed-on: http://gerrit.cloudera.org:8080/11184
Reviewed-by: Impala Public Jenkins <im...@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/7002ad3b
Tree: http://git-wip-us.apache.org/repos/asf/impala/tree/7002ad3b
Diff: http://git-wip-us.apache.org/repos/asf/impala/diff/7002ad3b
Branch: refs/heads/master
Commit: 7002ad3b35a8217daa0f5a1962eaff338030d327
Parents: 83fc1fb
Author: Adam Holley <gi...@holleyism.com>
Authored: Thu Aug 9 16:18:10 2018 -0500
Committer: Impala Public Jenkins <im...@cloudera.com>
Committed: Sat Aug 11 06:02:52 2018 +0000
----------------------------------------------------------------------
be/src/exprs/expr-test.cc | 1 +
common/function-registry/impala_functions.py | 3 ++-
tests/custom_cluster/test_delegation.py | 4 ++--
3 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/impala/blob/7002ad3b/be/src/exprs/expr-test.cc
----------------------------------------------------------------------
diff --git a/be/src/exprs/expr-test.cc b/be/src/exprs/expr-test.cc
index b50ba23..d0e3ff3 100644
--- a/be/src/exprs/expr-test.cc
+++ b/be/src/exprs/expr-test.cc
@@ -4867,6 +4867,7 @@ TEST_F(ExprTest, UtilityFunctions) {
TestStringValue("user()", "impala_test_user");
TestStringValue("current_user()", "impala_test_user");
TestStringValue("effective_user()", "impala_test_user");
+ TestStringValue("logged_in_user()", "impala_test_user");
TestStringValue("session_user()", "impala_test_user");
TestStringValue("version()", GetVersionString());
TestValue("sleep(100)", TYPE_BOOLEAN, true);
http://git-wip-us.apache.org/repos/asf/impala/blob/7002ad3b/common/function-registry/impala_functions.py
----------------------------------------------------------------------
diff --git a/common/function-registry/impala_functions.py b/common/function-registry/impala_functions.py
index b3bf1d4..b29d1a8 100644
--- a/common/function-registry/impala_functions.py
+++ b/common/function-registry/impala_functions.py
@@ -577,7 +577,8 @@ visible_functions = [
[['current_database', 'current_catalog'], 'STRING', [], 'impala::UtilityFunctions::CurrentDatabase'],
[['current_session', 'current_sid'], 'STRING', [], 'impala::UtilityFunctions::CurrentSession'],
[['user', 'session_user'], 'STRING', [], 'impala::UtilityFunctions::User'],
- [['effective_user', 'current_user'], 'STRING', [], 'impala::UtilityFunctions::EffectiveUser'],
+ [['effective_user', 'current_user', 'logged_in_user'], 'STRING', [],
+ 'impala::UtilityFunctions::EffectiveUser'],
[['sleep'], 'BOOLEAN', ['INT'], 'impala::UtilityFunctions::Sleep'],
[['pid'], 'INT', [], 'impala::UtilityFunctions::Pid'],
[['version'], 'STRING', [], 'impala::UtilityFunctions::Version'],
http://git-wip-us.apache.org/repos/asf/impala/blob/7002ad3b/tests/custom_cluster/test_delegation.py
----------------------------------------------------------------------
diff --git a/tests/custom_cluster/test_delegation.py b/tests/custom_cluster/test_delegation.py
index 1c412d7..f63ffc8 100644
--- a/tests/custom_cluster/test_delegation.py
+++ b/tests/custom_cluster/test_delegation.py
@@ -34,7 +34,7 @@ class TestDelegation(CustomClusterTestSuite, HS2TestSuite):
execute_statement_req.sessionHandle = self.session_handle
execute_statement_req.confOverlay = dict()
execute_statement_req.statement = \
- "SELECT effective_user(), current_user(), user(), session_user()";
+ "SELECT effective_user(), current_user(), logged_in_user(), user(), session_user()"
execute_statement_resp = self.hs2_client.ExecuteStatement(execute_statement_req)
HS2TestSuite.check_response(execute_statement_resp)
@@ -44,7 +44,7 @@ class TestDelegation(CustomClusterTestSuite, HS2TestSuite):
fetch_results_resp = self.hs2_client.FetchResults(fetch_results_req)
HS2TestSuite.check_response(fetch_results_resp)
assert (self.column_results_to_string(fetch_results_resp.results.columns) ==
- (1, "%s, %s, %s, %s\n" % (proxy_user, proxy_user,
+ (1, "%s, %s, %s, %s, %s\n" % (proxy_user, proxy_user, proxy_user,
USER_NAME, USER_NAME)))
@pytest.mark.execute_serially