Github user kellyzly commented on a diff in the pull request: https://github.com/apache/spark/pull/19854#discussion_r155083419 --- Diff: common/unsafe/src/main/java/org/apache/spark/unsafe/Platform.java --- @@ -169,8 +169,10 @@ public static ByteBuffer allocateDirectBuffer(int size) { cleanerField.setAccessible(true); long memory = allocateMemory(size); ByteBuffer buffer = (ByteBuffer) constructor.newInstance(memory, size); - Cleaner cleaner = Cleaner.create(buffer, () -> freeMemory(memory)); - cleanerField.set(buffer, cleaner); +// sun.misc.Cleaner is not used in JDK9(see SPARK-22659), we can use CleanUtil in HADOOP-12760 to solve it +// Cleaner cleaner = Cleaner.create(buffer, () -> freeMemory(memory)); +// cleanerField.set(buffer, cleaner); --- End diff -- Sure I can remove the comment like " sun.misc.Cleaner is not used in JDK9(see SPARK-22659), we can use CleanUtil in HADOOP-12760 to solve it" sun.misc.Cleaner has moved to a new location in OpenJDK 9. If uncommenting code about Cleaner, compile will fail. Cleaner is used to [release memory](http://www.docjar.com/html/api/sun/misc/Cleaner.java.html). If commenting code about cleaner, there maybe some function lost. Can you give me some suggestions?
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org