sentry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pras...@apache.org
Subject git commit: SENTRY-321: SentryMetastorePostEventListener should use sentry config to create SentryClient (Sravya Tirukkovalur via Prasad Mujumdar)
Date Tue, 01 Jul 2014 01:50:25 GMT
Repository: incubator-sentry
Updated Branches:
  refs/heads/master bbec68b58 -> d1727c512


SENTRY-321: SentryMetastorePostEventListener should use sentry config to create SentryClient
(Sravya Tirukkovalur via Prasad Mujumdar)


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

Branch: refs/heads/master
Commit: d1727c5125fcb68e89d2fc63743cc142a82ffba7
Parents: bbec68b
Author: Prasad Mujumdar <prasadm@cloudera.com>
Authored: Mon Jun 30 18:50:08 2014 -0700
Committer: Prasad Mujumdar <prasadm@cloudera.com>
Committed: Mon Jun 30 18:50:08 2014 -0700

----------------------------------------------------------------------
 .../binding/metastore/SentryMetastorePostEventListener.java      | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/d1727c51/sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/metastore/SentryMetastorePostEventListener.java
----------------------------------------------------------------------
diff --git a/sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/metastore/SentryMetastorePostEventListener.java
b/sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/metastore/SentryMetastorePostEventListener.java
index 5634879..0500483 100644
--- a/sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/metastore/SentryMetastorePostEventListener.java
+++ b/sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/metastore/SentryMetastorePostEventListener.java
@@ -32,6 +32,7 @@ import org.apache.hadoop.hive.metastore.events.DropDatabaseEvent;
 import org.apache.hadoop.hive.metastore.events.DropTableEvent;
 import org.apache.hadoop.security.UserGroupInformation;
 import org.apache.sentry.SentryUserException;
+import org.apache.sentry.binding.hive.HiveAuthzBindingHook;
 import org.apache.sentry.binding.hive.conf.HiveAuthzConf;
 import org.apache.sentry.binding.hive.conf.HiveAuthzConf.AuthzConfVars;
 import org.apache.sentry.core.common.Authorizable;
@@ -49,6 +50,7 @@ public class SentryMetastorePostEventListener extends MetaStoreEventListener
{
   public SentryMetastorePostEventListener(Configuration config) {
     super(config);
     sentryClientFactory = new SentryServiceClientFactory();
+
     authzConf = HiveAuthzConf.getAuthzConf(new HiveConf());
     server = new Server(authzConf.get(AuthzConfVars.AUTHZ_SERVER_NAME.getVar()));
   }
@@ -122,7 +124,7 @@ public class SentryMetastorePostEventListener extends MetaStoreEventListener
{
   private SentryPolicyServiceClient getSentryServiceClient()
       throws MetaException {
     try {
-      return sentryClientFactory.create(getConf());
+      return sentryClientFactory.create(authzConf);
     } catch (Exception e) {
       throw new MetaException("Failed to connect to Sentry service "
           + e.getMessage());


Mime
View raw message