[
https://issues.apache.org/jira/browse/HBASE-28773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17872390#comment-17872390
]
guluo commented on HBASE-28773:
-------------------------------
Thanks for your good suggestion.
Running UT successfully with hbase 2.4.16.
And I noted that above issue was fixed by HBASE-25516 in hbase 2.4.16.
So Upgrading the dependency version of hbase to 2.4.16 maybe is a good choice
in hbase-operator-tools ?
The result of running UT with hbase 2.4.16 as follow.
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.apache.hbase.TestHBCK2
[INFO] Tests run: 38, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 83.088
s - in org.apache.hbase.TestHBCK2
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 38, Failures: 0, Errors: 0, Skipped: 0
> Failed to start HBase MiniCluster when running UT with JDK 17 in hbase-hbck2
> ----------------------------------------------------------------------------
>
> Key: HBASE-28773
> URL: https://issues.apache.org/jira/browse/HBASE-28773
> Project: HBase
> Issue Type: Bug
> Components: hbase-operator-tools
> Affects Versions: 1.2.0
> Reporter: guluo
> Priority: Major
>
> I noted that we have already supported to build hbase-operator-tools with
> JDK17.
> [HBASE-28381] Support building hbase-operator-tools with JDK17 - ASF JIRA
> (apache.org)
>
> But, when running UT in the hbase-hbck2 project using JDK17, an error occurs
> when starting the hbase MiniCluster cluster.
>
> java.lang.NoSuchFieldException: modifiers
> at java.lang.Class.getDeclaredField(Class.java:2610) ~[?:?]
> at
> org.apache.hadoop.hbase.fs.HFileSystem.addLocationsOrderInterceptor(HFileSystem.java:338)
> [hbase-server-2.4.4.jar:2.4.4]
> at
> org.apache.hadoop.hbase.fs.HFileSystem.addLocationsOrderInterceptor(HFileSystem.java:295)
> [hbase-server-2.4.4.jar:2.4.4]
> at
> org.apache.hadoop.hbase.fs.HFileSystem.<init>(HFileSystem.java:100)
> [hbase-server-2.4.4.jar:2.4.4]
> at
> org.apache.hadoop.hbase.regionserver.HRegionServer.initializeFileSystem(HRegionServer.java:767)
> [hbase-server-2.4.4.jar:2.4.4]
> at
> org.apache.hadoop.hbase.regionserver.HRegionServer.<init>(HRegionServer.java:654)
> [hbase-server-2.4.4.jar:2.4.4]
>
>
> The reason is that the 'modifiers' field is not accessible in JDK17.
> Since HBase 2.5.0 supports JDK 17, I updated the HBase dependencies, and the
> test cases can pass successfully.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)