Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Duplicate
-
2.3.2
-
None
-
None
-
ProductName: Mac OS X
ProductVersion: 10.14
BuildVersion: 18A391
Description
Spark build fails with Java 9 since sun.misc.Cleaner referred in Platform.java does not exist anymore. This should be replaced with java.lang.ref.Cleaner.
Additional information:
https://docs.oracle.com/javase/9/docs/api/java/lang/ref/Cleaner.html
The create method accepts only the Threadable object.
Error Log :
[error] warning: [options] bootstrap class path not set in conjunction with -source 1.8
[error] /Users/deepaknair/myprojects/spark/common/unsafe/src/main/java/org/apache/spark/unsafe/Platform.java:25: error: cannot find symbol
[error] import sun.misc.Cleaner;
[error] ^
[error] symbol: class Cleaner
[error] location: package sun.misc
[error] /Users/deepaknair/myprojects/spark/common/unsafe/src/main/java/org/apache/spark/unsafe/Platform.java:172: error: cannot find symbol
[error] Cleaner cleaner = Cleaner.create(buffer, () -> freeMemory(memory));
[error] ^
[error] symbol: class Cleaner
[error] location: class Platform
[error] /Users/deepaknair/myprojects/spark/common/unsafe/src/main/java/org/apache/spark/unsafe/Platform.java:172: error: cannot find symbol
[error] Cleaner cleaner = Cleaner.create(buffer, () -> freeMemory(memory));
[error] ^
[error] symbol: variable Cleaner
[error] location: class Platform
[error] 3 errors
[error] 1 warning
[error] Compile failed at Oct 24, 2018, 8:31:37 AM [0.094s]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Spark Project Parent POM 3.0.0-SNAPSHOT ............ SUCCESS [ 2.433 s]
[INFO] Spark Project Tags ................................. SUCCESS [ 0.969 s]
[INFO] Spark Project Sketch ............................... SUCCESS [ 1.710 s]
[INFO] Spark Project Local DB ............................. SUCCESS [ 1.081 s]
[INFO] Spark Project Networking ........................... SUCCESS [ 2.983 s]
[INFO] Spark Project Shuffle Streaming Service ............ SUCCESS [ 1.042 s]
[INFO] Spark Project Unsafe ............................... FAILURE [ 0.272 s]
Attachments
Issue Links
- duplicates
-
SPARK-24417 Build and Run Spark on JDK11
- Resolved