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

Mike Drob commented on HBASE-21110:
-----------------------------------

bq. When is Unsafe supposed to go away? Or is it?
It is supposed to go away, but I don't know what the timeline for it is. 
Starting with Java 9, users need to pass an explicit flag to access it, and I 
don't know how hard it will be for large enterprises to get away with that when 
there are security posture concerns.

bq. I believe VarHandles are the blessed replacement for Unsafe access, but 
VarHandles cannot be naively added to a code base that has to still support 
Java 7 and up, like Hadoop 2.x, HBase 1.x, others. We might be able to move 
Unsafe access behind an interface with Java version specific implementations in 
separate Maven modules
We already hide most of our Unsafe access behind a facade, maybe there is 
something we can do to set it up inline.

> Issues with Unsafe and JDK 11
> -----------------------------
>
>                 Key: HBASE-21110
>                 URL: https://issues.apache.org/jira/browse/HBASE-21110
>             Project: HBase
>          Issue Type: Task
>            Reporter: Mike Drob
>            Priority: Major
>             Fix For: 3.0.0
>
>
> Using Java 11 RC 1, I get the following warning, probably need to add the 
> suggested flag to our scripts?
> {noformat}
> mdrob@mdrob-MBP:~/IdeaProjects/hbase$ java -version
> java version "11" 2018-09-25
> Java(TM) SE Runtime Environment 18.9 (build 11+28)
> Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11+28, mixed mode)
> mdrob@mdrob-MBP:~/IdeaProjects/hbase$ bin/start-hbase.sh
> mdrob@mdrob-MBP:~/IdeaProjects/hbase$ cat 
> /Users/mdrob/IdeaProjects/hbase/bin/../logs/hbase-mdrob-master-mdrob-MBP.local.out
> WARNING: An illegal reflective access operation has occurred
> WARNING: Illegal reflective access by 
> org.apache.hadoop.hbase.util.UnsafeAvailChecker 
> (file:/Users/mdrob/IdeaProjects/hbase/hbase-common/target/hbase-common-3.0.0-SNAPSHOT.jar)
>  to method java.nio.Bits.unaligned()
> WARNING: Please consider reporting this to the maintainers of 
> org.apache.hadoop.hbase.util.UnsafeAvailChecker
> WARNING: Use --illegal-access=warn to enable warnings of further illegal 
> reflective access operations
> WARNING: All illegal access operations will be denied in a future release
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to