flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephan Ewen (Jira)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-15094) Warning about using private constructor of java.nio.DirectByteBuffer in Java 11
Date Fri, 31 Jan 2020 14:05:00 GMT

    [ https://issues.apache.org/jira/browse/FLINK-15094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17027523#comment-17027523

Stephan Ewen commented on FLINK-15094:

I did some research about how netty handles this, and it seems that with Java 9+, they simply
go with DirectByteBuffers, meaning there is no way to allocate the memory without
  - either contributing to MaxDirectMemory
  - or getting these mean warnings
  - or separating MemorySegments completely from DirectByteBuffer (

Concerning the last point: We can get the network stack free of MemorySegment, but we need
MemorySegment/DirectByteBuffer interplay for batch algorithm spilling).

> Warning about using private constructor of java.nio.DirectByteBuffer in Java 11
> -------------------------------------------------------------------------------
>                 Key: FLINK-15094
>                 URL: https://issues.apache.org/jira/browse/FLINK-15094
>             Project: Flink
>          Issue Type: Improvement
>          Components: Runtime / Task
>            Reporter: Andrey Zagrebin
>            Priority: Major
> The unsafe off-heap in [FLINK-13985|https://jira.apache.org/jira/browse/FLINK-13985] was
implemented by hacking into a private constructor of java.nio.DirectByteBuffer. This causes
undesirable warnings in Java 11:
> {code:java}
> WARNING: An illegal reflective access operation has occurred
> WARNING: Illegal reflective access by org.apache.flink.core.memory.MemoryUtils (file:/C:/Development/repos/flink/flink-core/target/classes/)
to constructor java.nio.DirectByteBuffer(long,int)
> WARNING: Please consider reporting this to the maintainers of org.apache.flink.core.memory.MemoryUtils
> WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access
> WARNING: All illegal access operations will be denied in a future release{code}
> We should look into this, confirm that it is harmless and try to silence it to avoid
confusion for users.

This message was sent by Atlassian Jira

View raw message