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

Bhooshan Mogal edited comment on SENTRY-1111 at 3/10/16 1:58 AM:
-----------------------------------------------------------------

Moving this back to 1.7.0 since it already has an LGTM.

[~sravya], we could try 3.0.2. But it will need an exhaustive test, since even 
in that case, both 3.0.1 and 3.0.2 classes will be in the class path. It may 
lead to unpredictable behavior. With 3.1.0, I could see it breaking instantly, 
but I'm not sure what tests it will take to verify completely that 3.0.2 does 
indeed work in all cases. I think it is safer to be on the same version as 
Hadoop.


was (Author: bhooshan):
Moving this back to 1.7.0 since it already has an LGTM.

[~sravya], we could try 3.0.1. But it will need an exhaustive test, since even 
in that case, both 3.0.1 and 3.0.2 classes will be in the class path. It may 
lead to unpredictable behavior. With 3.1.0, I could see it breaking instantly, 
but I'm not sure what tests it will take to verify completely that 3.0.2 does 
indeed work in all cases. I think it is safer to be on the same version as 
Hadoop.

> 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)

Reply via email to