You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sentry.apache.org by ls...@apache.org on 2016/03/05 10:30:35 UTC
incubator-sentry git commit: SENTRY-1112: Change default value of
"sentry.hive.server" to "server1" (Li Li via Lenni Kuff)
Repository: incubator-sentry
Updated Branches:
refs/heads/master a962e2425 -> 1c32c13ad
SENTRY-1112: Change default value of "sentry.hive.server" to "server1" (Li Li via Lenni Kuff)
Change-Id: I59a047d762301940740adbe43d6e640b4963b0e3
Project: http://git-wip-us.apache.org/repos/asf/incubator-sentry/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-sentry/commit/1c32c13a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-sentry/tree/1c32c13a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-sentry/diff/1c32c13a
Branch: refs/heads/master
Commit: 1c32c13ad75f6b299f9047e68615f3d0aaee399b
Parents: a962e24
Author: Lenni Kuff <ls...@cloudera.com>
Authored: Sat Mar 5 01:29:41 2016 -0800
Committer: Lenni Kuff <ls...@cloudera.com>
Committed: Sat Mar 5 01:30:00 2016 -0800
----------------------------------------------------------------------
.../org/apache/sentry/binding/hive/conf/HiveAuthzConf.java | 4 ++--
.../java/org/apache/sentry/binding/hive/TestHiveAuthzConf.java | 6 ++++++
.../sentry-binding-hive/src/test/resources/sentry-site.xml | 4 ----
3 files changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/1c32c13a/sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/conf/HiveAuthzConf.java
----------------------------------------------------------------------
diff --git a/sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/conf/HiveAuthzConf.java b/sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/conf/HiveAuthzConf.java
index 1093a09..5a89af2 100644
--- a/sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/conf/HiveAuthzConf.java
+++ b/sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/conf/HiveAuthzConf.java
@@ -96,7 +96,7 @@ public class HiveAuthzConf extends Configuration {
AUTHZ_POLICY_FILE_FORMATTER(
"sentry.hive.policy.file.formatter",
"org.apache.sentry.binding.hive.SentryIniPolicyFileFormatter"),
- AUTHZ_SERVER_NAME("sentry.hive.server", "HS2"),
+ AUTHZ_SERVER_NAME("sentry.hive.server", ""),
AUTHZ_RESTRICT_DEFAULT_DB("sentry.hive.restrict.defaultDB", "false"),
SENTRY_TESTING_MODE("sentry.hive.testing.mode", "false"),
AUTHZ_ALLOW_HIVE_IMPERSONATION("sentry.hive.allow.hive.impersonation", "false"),
@@ -109,7 +109,7 @@ public class HiveAuthzConf extends Configuration {
AUTHZ_PROVIDER_DEPRECATED("hive.sentry.provider",
"org.apache.sentry.provider.file.ResourceAuthorizationProvider"),
AUTHZ_PROVIDER_RESOURCE_DEPRECATED("hive.sentry.provider.resource", ""),
- AUTHZ_SERVER_NAME_DEPRECATED("hive.sentry.server", "HS2"),
+ AUTHZ_SERVER_NAME_DEPRECATED("hive.sentry.server", ""),
AUTHZ_RESTRICT_DEFAULT_DB_DEPRECATED("hive.sentry.restrict.defaultDB", "false"),
SENTRY_TESTING_MODE_DEPRECATED("hive.sentry.testing.mode", "false"),
AUTHZ_ALLOW_HIVE_IMPERSONATION_DEPRECATED("hive.sentry.allow.hive.impersonation", "false"),
http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/1c32c13a/sentry-binding/sentry-binding-hive/src/test/java/org/apache/sentry/binding/hive/TestHiveAuthzConf.java
----------------------------------------------------------------------
diff --git a/sentry-binding/sentry-binding-hive/src/test/java/org/apache/sentry/binding/hive/TestHiveAuthzConf.java b/sentry-binding/sentry-binding-hive/src/test/java/org/apache/sentry/binding/hive/TestHiveAuthzConf.java
index 4969660..dccbbb6 100644
--- a/sentry-binding/sentry-binding-hive/src/test/java/org/apache/sentry/binding/hive/TestHiveAuthzConf.java
+++ b/sentry-binding/sentry-binding-hive/src/test/java/org/apache/sentry/binding/hive/TestHiveAuthzConf.java
@@ -50,6 +50,12 @@ public class TestHiveAuthzConf {
authzDepConf.get(AuthzConfVars.AUTHZ_PROVIDER_DEPRECATED.getVar()));
Assert.assertEquals("org.apache.sentry.provider.file.fooProvider",
authzConf.get(AuthzConfVars.AUTHZ_PROVIDER.getVar()));
+
+ // Test the default value of authz server name is an empty string.
+ Assert.assertEquals("",
+ authzConf.get(AuthzConfVars.AUTHZ_SERVER_NAME.getVar()));
+ Assert.assertEquals("",
+ authzConf.get(AuthzConfVars.AUTHZ_SERVER_NAME_DEPRECATED.getVar()));
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/1c32c13a/sentry-binding/sentry-binding-hive/src/test/resources/sentry-site.xml
----------------------------------------------------------------------
diff --git a/sentry-binding/sentry-binding-hive/src/test/resources/sentry-site.xml b/sentry-binding/sentry-binding-hive/src/test/resources/sentry-site.xml
index 26fdab1..bac5047 100644
--- a/sentry-binding/sentry-binding-hive/src/test/resources/sentry-site.xml
+++ b/sentry-binding/sentry-binding-hive/src/test/resources/sentry-site.xml
@@ -26,9 +26,5 @@
<name>sentry.hive.provider.resource</name>
<value>classpath:test-authz-provider.ini</value>
</property>
- <property>
- <name>sentry.hive.server</name>
- <value>myHS2</value>
- </property>
</configuration>