You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Wellington Chevreuil (Jira)" <ji...@apache.org> on 2022/03/31 22:09:00 UTC

[jira] [Resolved] (HBASE-26838) Junit jar is not included in the hbase tar ball, causing issues for some hbase tools that do rely on it

     [ https://issues.apache.org/jira/browse/HBASE-26838?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Wellington Chevreuil resolved HBASE-26838.
------------------------------------------
    Resolution: Fixed

Merged into master, then cherry-picked into branch-2, branch-2.4 and branch-2.4. Thanks for reviewing it, [~elserj] , [~ndimiduk] !

> Junit jar is not included in the hbase tar ball, causing issues for some  hbase tools that do rely on it
> --------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-26838
>                 URL: https://issues.apache.org/jira/browse/HBASE-26838
>             Project: HBase
>          Issue Type: Bug
>          Components: integration tests, tooling
>    Affects Versions: 2.5.0, 3.0.0-alpha-2, 2.6.0, 2.4.11
>            Reporter: Wellington Chevreuil
>            Assignee: Wellington Chevreuil
>            Priority: Major
>             Fix For: 2.5.0, 2.6.0, 3.0.0-alpha-3, 2.4.12
>
>
> We used to include junit jar on the generated tar ball lib directory. After some sanitisation of unnecessary libs for most of hbase processes, junit got removed from the packing, so that it don't end in hbase classpath by default. 
> Some testing tools, however do depend on junit at runtime, and would now fail with NoClassDefFoundError, like [IntegrationTestIngest:|https://hbase.apache.org/book.html#chaos.monkey.properties]
> {noformat}
> 2022-03-14T21:54:50,483 INFO  [main] client.AsyncConnectionImpl: Connection has been closed by main.
> Exception in thread "main" java.lang.NoClassDefFoundError: org/junit/Assert
> 	at org.apache.hadoop.hbase.IntegrationTestIngest.initTable(IntegrationTestIngest.java:101)
> 	at org.apache.hadoop.hbase.IntegrationTestIngest.setUpCluster(IntegrationTestIngest.java:92)
> 	at org.apache.hadoop.hbase.IntegrationTestBase.setUp(IntegrationTestBase.java:170)
> 	at org.apache.hadoop.hbase.IntegrationTestBase.doWork(IntegrationTestBase.java:153)
> 	at org.apache.hadoop.hbase.util.AbstractHBaseTool.run(AbstractHBaseTool.java:153)
> 	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
> 	at org.apache.hadoop.hbase.IntegrationTestIngest.main(IntegrationTestIngest.java:259)
> Caused by: java.lang.ClassNotFoundException: org.junit.Assert
> 	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
> 	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
> 	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
> 	... 7 more {noformat}
> Discussing with [~elserj] internally, we believe a reasonable solution would be to include junit jar back into the tarball, under "lib/test" dir so that it's not automatically added to hbase processes classpath, but still allow operators to manually define it in a convenient way, like below:
> {noformat}
> HBASE_CLASSPATH="$HBASE_HOME/lib/tests/*" hbase org.apache.hadoop.hbase.IntegrationTesngest -m slowDeterministic {noformat}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)