Hello, I'm hitting this problem and unsure what's the best way to go
forward.

I want to build HBase (master) on top of Hadoop 3.2 but tests failed right
away.

Build:
mvn clean install -Dhadoop.profile=3.0 -Dhadoop-three.version=3.2.1
-DskipTests

Test:
mvn test -Dtest=TestHelloHBase -Dhadoop.profile=3.0
-Dhadoop-three.version=3.2.1


[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed:
1.296 s <<< FAILURE! - in
org.apache.hbase.archetypes.exemplars.shaded_client.TestHelloHBase
[ERROR] org.apache.hbase.archetypes.exemplars.shaded_client.TestHelloHBase
 Time elapsed: 1.284 s  <<< ERROR!
java.lang.NoClassDefFoundError:
org/apache/hadoop/hdfs/protocol/HdfsConstants$StoragePolicySatisfierMode
at
org.apache.hbase.archetypes.exemplars.shaded_client.TestHelloHBase.beforeClass(TestHelloHBase.java:54)
Caused by: java.lang.ClassNotFoundException:
org.apache.hadoop.hdfs.protocol.HdfsConstants$StoragePolicySatisfierMode
at
org.apache.hbase.archetypes.exemplars.shaded_client.TestHelloHBase.beforeClass(TestHelloHBase.java:54)

Adding mvn -X parameter, I was able to tell that it was because the
hbase-server module includes hadoop-distcp and hadoop-dfs-client 3.1.2 (the
default Hadoop 3 dependency version) while it uses version 3.2.1 of
other hadoop jars . The classpath conflict (the storage policy satisfier is
a new feature in Hadoop 3.2) failed the test.

This is reproducible on any Hadoop version 3.2 and above.

Did I specify the parameter correctly? It looks to me the version of
hadoop-distcp and hadoop-hdfs-client should be specified at the top level
pom (they are specified in hbase-server/pom.xml). I can file a jira if this
is indeed a bug.

Reply via email to