[jira] [Commented] (SPARK-24421) Accessing sun.misc.Cleaner in JDK11

2018-11-11 Thread Alan (JIRA)


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

Alan commented on SPARK-24421:
--

Sean - In the proposed release note text you say that access to the internal 
JDK classes "is no longer possible in Java 9 and later, because of the new 
module encapsulation system". I don't think this is quite right as the main 
issue you ran into is that the JDK's internal cleaner mechanism was refactored 
and moved from sun.misc to jdk.internal.ref. Also the comment about using 
`--add-opens` may need update too as java.lang remains open to code on the 
class path in JDK 9/10/11. I suspect the the comments in this issue about 
`--add-opens` meant to say jdk.internal.ref instead (although you just don't 
want to go there as directly using anything in that package may break at any 
time).

> 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
>  Labels: release-notes
>
> 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



[jira] [Commented] (SPARK-24421) Accessing sun.misc.Cleaner in JDK11

2018-11-11 Thread Assaf Mendelson (JIRA)


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

Assaf Mendelson commented on SPARK-24421:
-

Would it be possible to add {{Add-Opens java.base/java.lang=ALL-UNNAMED to the 
manifest file to avoid the need to do so when running the jar?}}

> 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
>  Labels: release-notes
>
> 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



[jira] [Commented] (SPARK-24421) Accessing sun.misc.Cleaner in JDK11

2018-11-09 Thread Apache Spark (JIRA)


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

Apache Spark commented on SPARK-24421:
--

User 'srowen' has created a pull request for this issue:
https://github.com/apache/spark/pull/22993

> 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
>  Labels: release-notes
>
> 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



[jira] [Commented] (SPARK-24421) Accessing sun.misc.Cleaner in JDK11

2018-11-09 Thread Alan (JIRA)


[ 
https://issues.apache.org/jira/browse/SPARK-24421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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