JIRA: https://issues.apache.org/jira/browse/BOOKKEEPER-1049
Reporter: Enrico Olivelli @eolivelli
I am tring to run BookKeeper on Java9, a part from simple issues:
- exclude the transitive dependency to jdk.tools in bookkeeer-benchmarks
- fix a warning due to the fact the Class.forName in java9 is deprecated and we are running javac with the "Werror" option (warning = error)
we have a real stopper, in fact we want to access the low level ID of FileDescriptors using the reflaction and by default this is not allowed.
This is the error:
{code}
java.lang.AssertionError
at org.apache.bookkeeper.util.NativeIO.getFieldByReflection(NativeIO.java:63)
at org.apache.bookkeeper.util.NativeIO.getSysFileDescriptor(NativeIO.java:75)
at org.apache.bookkeeper.bookie.JournalChannel.(JournalChannel.java:218)
at org.apache.bookkeeper.bookie.JournalChannel.(JournalChannel.java:97)
at org.apache.bookkeeper.bookie.JournalChannel.(JournalChannel.java:86)
at org.apache.bookkeeper.bookie.UpgradeTest.writeJournal(UpgradeTest.java:83)
at org.apache.bookkeeper.bookie.UpgradeTest.newV1JournalDirectory(UpgradeTest.java:114)
at org.apache.bookkeeper.bookie.UpgradeTest.testUpgradeV1toCurrent(UpgradeTest.java:192)
{code}
Comments from JIRA
Enrico Olivelli 2017-05-08T13:11:05.656+0000
I am investigating if there is another way to access the information
Enrico Olivelli 2017-05-09T06:45:14.292+0000
The best solution is to use Native Code to access the internal "fd" field inside the FieldDescriptor object:
- we need the 'fd' only if we can load our native library
- accessing object internals using JNI is allowed by JigSaw
http://mail.openjdk.java.net/pipermail/core-libs-dev/2017-May/047510.html
I will create a patch based on the work of BOOKKEEPER-816 which introduces a BookKeeper specific native-io library
JIRA: https://issues.apache.org/jira/browse/BOOKKEEPER-1049
Reporter: Enrico Olivelli @eolivelli
I am tring to run BookKeeper on Java9, a part from simple issues:
we have a real stopper, in fact we want to access the low level ID of FileDescriptors using the reflaction and by default this is not allowed.
This is the error:
{code}
java.lang.AssertionError
at org.apache.bookkeeper.util.NativeIO.getFieldByReflection(NativeIO.java:63)
at org.apache.bookkeeper.util.NativeIO.getSysFileDescriptor(NativeIO.java:75)
at org.apache.bookkeeper.bookie.JournalChannel.(JournalChannel.java:218)
at org.apache.bookkeeper.bookie.JournalChannel.(JournalChannel.java:97)
at org.apache.bookkeeper.bookie.JournalChannel.(JournalChannel.java:86)
at org.apache.bookkeeper.bookie.UpgradeTest.writeJournal(UpgradeTest.java:83)
at org.apache.bookkeeper.bookie.UpgradeTest.newV1JournalDirectory(UpgradeTest.java:114)
at org.apache.bookkeeper.bookie.UpgradeTest.testUpgradeV1toCurrent(UpgradeTest.java:192)
{code}
Comments from JIRA
Enrico Olivelli 2017-05-08T13:11:05.656+0000
I am investigating if there is another way to access the information
Enrico Olivelli 2017-05-09T06:45:14.292+0000
The best solution is to use Native Code to access the internal "fd" field inside the FieldDescriptor object:
http://mail.openjdk.java.net/pipermail/core-libs-dev/2017-May/047510.html
I will create a patch based on the work of BOOKKEEPER-816 which introduces a BookKeeper specific native-io library