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

Alan commented on SPARK-24421:
------------------------------

If I understanding correctly, the high-level need is 
-XX:MaxDirectMemorySize=unlimited but without specifying a command line option. 
Do you specify any other arguments? Maybe you could include an arg file with 
all options?

As regards the hack then it looks like it involves the non-public constructor 
needed for JNI NewDirectMemoryBuffer and then patching the cleaner field. Ugh, 
that it way too fragile as the JDK internals can change at any time, also 
hacking into buffer fields will break once java.base is fully encapsulated.

 

 

> Accessing sun.misc.Cleaner in JDK11
> -----------------------------------
>
>                 Key: SPARK-24421
>                 URL: https://issues.apache.org/jira/browse/SPARK-24421
>             Project: Spark
>          Issue Type: Sub-task
>          Components: Build
>    Affects Versions: 3.0.0
>            Reporter: DB Tsai
>            Priority: Major
>
> Many internal APIs such as unsafe are encapsulated in JDK9+, see 
> http://openjdk.java.net/jeps/260 for detail.
> To use Unsafe, we need to add *jdk.unsupported* to our code’s module 
> declaration:
> {code:java}
> module java9unsafe {
>     requires jdk.unsupported;
> }
> {code}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to