Repository: incubator-ranger Updated Branches: refs/heads/ranger-0.5 ae3697584 -> 2c8c3c749
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/2c8c3c74 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ranger/tree/2c8c3c74 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ranger/diff/2c8c3c74 Branch: refs/heads/ranger-0.5 Commit: 2c8c3c7492f169490ff29974f18a6f1d1be39c34 Parents: ae36975 Author: rmani <[email protected]> Authored: Mon Nov 9 09:46:23 2015 -0800 Committer: rmani <[email protected]> Committed: Mon Nov 9 09:48:09 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/2c8c3c74/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/2c8c3c74/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>
