You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/04/01 21:03:23 UTC

[GitHub] [pulsar] nicoloboschi opened a new pull request #14999: [fix][bookie] Bookie: remove illegal access warning and enable reads optimization on jdk17

nicoloboschi opened a new pull request #14999:
URL: https://github.com/apache/pulsar/pull/14999


   ### Motivation
   
   In BookKeeper there's an optimization in order to improve file reads on Linux using [`posix_fadvise`](https://man7.org/linux/man-pages/man2/posix_fadvise.2.html) native instructions.
   In order to do that it needs to access `java.io.FileDescriptor` using the reflection.
   
   At the moment:
   - if you run the Bookie with jdk11, you see spammy warnings like: ``
   - if you run the Bookie with jdk11, the optimization is disabled 
   
   ### Modifications
   
   * Add `--add-opens java.base/java.io=ALL-UNNAMED` to the command line inside ´bin´ directory and allow reflections on java.io package. This option is available only starting from Java 9. 
   
   note: this is not documented on BookKeeper project, I will follow-up there.
    
   - [x] `no-need-doc` 
     


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] eolivelli commented on a change in pull request #14999: [fix][jdk17] remove illegal access warning and enable reads optimization on jdk17

Posted by GitBox <gi...@apache.org>.
eolivelli commented on a change in pull request #14999:
URL: https://github.com/apache/pulsar/pull/14999#discussion_r841111271



##########
File path: bin/bookkeeper
##########
@@ -166,6 +166,17 @@ OPTS="$OPTS -Dlog4j.configurationFile=`basename $BOOKIE_LOG_CONF`"
 # Allow Netty to use reflection access
 OPTS="$OPTS -Dio.netty.tryReflectionSetAccessible=true"
 
+IS_JAVA_8=`java -version 2>&1 |grep version|grep '"1\.8'`

Review comment:
       I understand better now, you added a double quote in the beginning so it should match only "1.8 
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] eolivelli merged pull request #14999: [fix][jdk17] remove illegal access warning and enable reads optimization on jdk17

Posted by GitBox <gi...@apache.org>.
eolivelli merged pull request #14999:
URL: https://github.com/apache/pulsar/pull/14999


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] eolivelli commented on a change in pull request #14999: [fix][jdk17] remove illegal access warning and enable reads optimization on jdk17

Posted by GitBox <gi...@apache.org>.
eolivelli commented on a change in pull request #14999:
URL: https://github.com/apache/pulsar/pull/14999#discussion_r841111023



##########
File path: bin/bookkeeper
##########
@@ -166,6 +166,17 @@ OPTS="$OPTS -Dlog4j.configurationFile=`basename $BOOKIE_LOG_CONF`"
 # Allow Netty to use reflection access
 OPTS="$OPTS -Dio.netty.tryReflectionSetAccessible=true"
 
+IS_JAVA_8=`java -version 2>&1 |grep version|grep '"1\.8'`

Review comment:
       In BK we have another way to detect modern jdks with modules




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] eolivelli commented on a change in pull request #14999: [fix][jdk17] remove illegal access warning and enable reads optimization on jdk17

Posted by GitBox <gi...@apache.org>.
eolivelli commented on a change in pull request #14999:
URL: https://github.com/apache/pulsar/pull/14999#discussion_r841110993



##########
File path: bin/bookkeeper
##########
@@ -166,6 +166,17 @@ OPTS="$OPTS -Dlog4j.configurationFile=`basename $BOOKIE_LOG_CONF`"
 # Allow Netty to use reflection access
 OPTS="$OPTS -Dio.netty.tryReflectionSetAccessible=true"
 
+IS_JAVA_8=`java -version 2>&1 |grep version|grep '"1\.8'`

Review comment:
       What about jdk 11.0.1.8?
   Will this check fail?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org