Repository: incubator-ranger Updated Branches: refs/heads/master 8e07c02c7 -> febe19357
RANGER-717:Hive and Hbase ranger plugin Audit to DB failed to log after plugin modification for not to add dependent libraries to component's CLASSPATH Project: http://git-wip-us.apache.org/repos/asf/incubator-ranger/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ranger/commit/febe1935 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ranger/tree/febe1935 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ranger/diff/febe1935 Branch: refs/heads/master Commit: febe19357cdf4957e4da2007e244d12e5dc8b3f1 Parents: 8e07c02 Author: rmani <[email protected]> Authored: Mon Nov 9 09:46:23 2015 -0800 Committer: rmani <[email protected]> Committed: Mon Nov 9 09:46:23 2015 -0800 ---------------------------------------------------------------------- .../hive/authorizer/RangerHiveAuthorizerFactory.java | 8 ++++++-- src/main/assembly/hbase-agent.xml | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/febe1935/ranger-hive-plugin-shim/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizerFactory.java ---------------------------------------------------------------------- diff --git a/ranger-hive-plugin-shim/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizerFactory.java b/ranger-hive-plugin-shim/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizerFactory.java index 02d6db3..4b3a196 100644 --- a/ranger-hive-plugin-shim/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizerFactory.java +++ b/ranger-hive-plugin-shim/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizerFactory.java @@ -97,8 +97,12 @@ public class RangerHiveAuthorizerFactory implements HiveAuthorizerFactory { LOG.debug("==> RangerHiveAuthorizerFactory.createHiveAuthorizer()"); } - ret = rangerHiveAuthorizerFactoryImpl.createHiveAuthorizer(metastoreClientFactory, conf, hiveAuthenticator, sessionContext); - + try { + activatePluginClassLoader(); + ret = rangerHiveAuthorizerFactoryImpl.createHiveAuthorizer(metastoreClientFactory, conf, hiveAuthenticator, sessionContext); + } finally { + deactivatePluginClassLoader(); + } if(LOG.isDebugEnabled()) { LOG.debug("<== RangerHiveAuthorizerFactory.createHiveAuthorizer()"); } http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/febe1935/src/main/assembly/hbase-agent.xml ---------------------------------------------------------------------- diff --git a/src/main/assembly/hbase-agent.xml b/src/main/assembly/hbase-agent.xml index 0ffc65c..122c8c7 100644 --- a/src/main/assembly/hbase-agent.xml +++ b/src/main/assembly/hbase-agent.xml @@ -49,6 +49,7 @@ <includes> <include>com.google.code.gson:gson*</include> <include>org.eclipse.persistence:eclipselink</include> + <include>org.eclipse.persistence:javax.persistence</include> <include>org.apache.httpcomponents:httpmime:jar:${httpcomponent.httpmime.version}</include> <include>org.noggit:noggit:jar:${noggit.version}</include> </includes>
