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

Appy commented on HBASE-18942:
------------------------------

By trick, i mean avoid the bug where we -Dhadoop.profile=3.0 
-Dhadoop-three.version=xx are insufficient and require also setting 
hadoop-two.version.
The decision for separate module or common module (which doesn't make sense, 
since we should just refactor things to directly use hadoop libs in relevant 
places) can be taken once testing with hadoop3 is complete.


> hbase-hadoop2-compat module ignores hadoop-3 profile
> ----------------------------------------------------
>
>                 Key: HBASE-18942
>                 URL: https://issues.apache.org/jira/browse/HBASE-18942
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Ted Yu
>              Labels: build
>         Attachments: HBASE-18942.master.001.patch
>
>
> In hbase-hadoop2-compat/pom.xml :
> {code}
>     <dependency>
>       <groupId>org.apache.hadoop</groupId>
>       <artifactId>hadoop-common</artifactId>
>       <version>${hadoop-two.version}</version>
>     </dependency>
> {code}
> The version for hadoop-common defaults to hadoop-two.
> This means that when hadoop-3.0 profile is used, hadoop-three.version would 
> be ignored.
> The following error would be observed:
> {code}
> Caused by: java.util.ServiceConfigurationError: 
> org.apache.hadoop.hbase.zookeeper.MetricsZooKeeperSource: Provider 
> org.apache.hadoop.hbase.zookeeper.MetricsZooKeeperSourceImpl could not be 
> instantiated
>   at java.util.ServiceLoader.fail(ServiceLoader.java:232)
>   at java.util.ServiceLoader.access$100(ServiceLoader.java:185)
>   at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:384)
>   at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
>   at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
>   at 
> org.apache.hadoop.hbase.CompatibilitySingletonFactory.getInstance(CompatibilitySingletonFactory.java:59)
>   ... 34 more
> Caused by: java.lang.NoClassDefFoundError: Could not initialize class 
> com.sun.proxy.$Proxy17
>   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>   at 
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
>   at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>   at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
>   at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:739)
>   at 
> org.apache.commons.configuration2.builder.fluent.Parameters.createParametersProxy(Parameters.java:294)
>   at 
> org.apache.commons.configuration2.builder.fluent.Parameters.fileBased(Parameters.java:185)
>   at 
> org.apache.commons.configuration2.builder.fluent.Configurations.fileParams(Configurations.java:602)
>   at 
> org.apache.commons.configuration2.builder.fluent.Configurations.fileParams(Configurations.java:638)
>   at 
> org.apache.commons.configuration2.builder.fluent.Configurations.fileBasedBuilder(Configurations.java:164)
>   at 
> org.apache.commons.configuration2.builder.fluent.Configurations.propertiesBuilder(Configurations.java:264)
>   at 
> org.apache.hadoop.metrics2.impl.MetricsConfig.loadFirst(MetricsConfig.java:115)
>   at 
> org.apache.hadoop.metrics2.impl.MetricsConfig.create(MetricsConfig.java:98)
>   at 
> org.apache.hadoop.metrics2.impl.MetricsSystemImpl.configure(MetricsSystemImpl.java:478)
>   at 
> org.apache.hadoop.metrics2.impl.MetricsSystemImpl.start(MetricsSystemImpl.java:188)
>   at 
> org.apache.hadoop.metrics2.impl.MetricsSystemImpl.init(MetricsSystemImpl.java:163)
>   at 
> org.apache.hadoop.metrics2.lib.DefaultMetricsSystem.init(DefaultMetricsSystem.java:62)
>   at 
> org.apache.hadoop.metrics2.lib.DefaultMetricsSystem.initialize(DefaultMetricsSystem.java:58)
>   at 
> org.apache.hadoop.hbase.metrics.BaseSourceImpl$DefaultMetricsSystemInitializer.init(BaseSourceImpl.java:51)
>   at 
> org.apache.hadoop.hbase.metrics.BaseSourceImpl.<init>(BaseSourceImpl.java:112)
>   at 
> org.apache.hadoop.hbase.zookeeper.MetricsZooKeeperSourceImpl.<init>(MetricsZooKeeperSourceImpl.java:56)
>   at 
> org.apache.hadoop.hbase.zookeeper.MetricsZooKeeperSourceImpl.<init>(MetricsZooKeeperSourceImpl.java:51)
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to