You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sentry.apache.org by "Bhooshan Mogal (JIRA)" <ji...@apache.org> on 2016/03/06 04:14:40 UTC

[jira] [Comment Edited] (SENTRY-1111) Apache Sentry should depend on the same version of metrics-core as hadoop

    [ https://issues.apache.org/jira/browse/SENTRY-1111?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15181971#comment-15181971 ] 

Bhooshan Mogal edited comment on SENTRY-1111 at 3/6/16 3:14 AM:
----------------------------------------------------------------

Looks like I was at an older revision when I created the initial patch. Should work now. [~hahao], please take a look now.


was (Author: bhooshan):
Looks like I was at an older revision when I created the initial patch. Should work now.

> Apache Sentry should depend on the same version of metrics-core as hadoop
> -------------------------------------------------------------------------
>
>                 Key: SENTRY-1111
>                 URL: https://issues.apache.org/jira/browse/SENTRY-1111
>             Project: Sentry
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 1.6.0
>            Reporter: Bhooshan Mogal
>             Fix For: 1.7.0
>
>         Attachments: SENTRY-1111.001.patch, SENTRY-1111.002.patch, SENTRY-1111.003.patch
>
>
> Currently, Sentry uses metrics version 3.1.0. However, hadoop trunk still uses version 3.0.1 - https://github.com/apache/hadoop/blob/trunk/hadoop-project/pom.xml#L891. This can cause errors like the following when you try to start sentry because of multiple versions of metrics-core in the HADOOP_CLASSPATH. 
> {code}
> Exception in thread "main" java.util.concurrent.ExecutionException: java.lang.NoSuchMethodError: com.codahale.metrics.JmxAttributeGauge.<init>(Ljavax/management/MBeanServerConnection;Ljavax/management/ObjectName;Ljava/lang/String;)V
>     at java.util.concurrent.FutureTask.report(FutureTask.java:122)
>     at java.util.concurrent.FutureTask.get(FutureTask.java:188)
>     at org.apache.sentry.service.thrift.SentryService.waitOnFuture(SentryService.java:311)
>     at org.apache.sentry.service.thrift.SentryService$CommandImpl.run(SentryService.java:397)
>     at org.apache.sentry.SentryMain.main(SentryMain.java:114)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke(Method.java:606)
>     at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
>     at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
> Caused by: java.lang.NoSuchMethodError: com.codahale.metrics.JmxAttributeGauge.<init>(Ljavax/management/MBeanServerConnection;Ljavax/management/ObjectName;Ljava/lang/String;)V
>     at com.codahale.metrics.jvm.BufferPoolMetricSet.getMetrics(BufferPoolMetricSet.java:45)
>     at org.apache.sentry.provider.db.service.thrift.SentryMetrics.registerMetricSet(SentryMetrics.java:149)
>     at org.apache.sentry.provider.db.service.thrift.SentryMetrics.<init>(SentryMetrics.java:97)
>     at org.apache.sentry.provider.db.service.thrift.SentryMetrics.getInstance(SentryMetrics.java:105)
>     at org.apache.sentry.provider.db.service.thrift.SentryPolicyStoreProcessor.initMetrics(SentryPolicyStoreProcessor.java:129)
>     at org.apache.sentry.provider.db.service.thrift.SentryPolicyStoreProcessor.<init>(SentryPolicyStoreProcessor.java:125)
>     at org.apache.sentry.provider.db.service.thrift.SentryPolicyStoreProcessorFactory.register(SentryPolicyStoreProcessorFactory.java:31)
>     at org.apache.sentry.service.thrift.SentryService.runServer(SentryService.java:200)
>     at org.apache.sentry.service.thrift.SentryService.call(SentryService.java:167)
>     at org.apache.sentry.service.thrift.SentryService.call(SentryService.java:71)
>     at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>     at java.lang.Thread.run(Thread.java:745)
> {code}
> I am able to reproduce this on a single node cluster running hadoop version 2.6.0-cdh5.5.2 and Sentry built off of master (or branch-1.6.0). The metrics dependencies are required for the sentry-provider-db module. The same should apply for other metrics libraries from io.dropwizard.metrics.
> Please let me know if you'd like me to work on a patch.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)