Github user skonto commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22993#discussion_r232846926
  
    --- Diff: common/unsafe/src/main/java/org/apache/spark/unsafe/Platform.java 
---
    @@ -67,6 +67,60 @@
         unaligned = _unaligned;
       }
     
    +  // Access fields and constructors once and store them, for performance:
    +
    +  private static final Constructor<?> DBB_CONSTRUCTOR;
    +  private static final Field DBB_CLEANER_FIELD;
    +  static {
    +    try {
    +      Class<?> cls = Class.forName("java.nio.DirectByteBuffer");
    +      Constructor<?> constructor = cls.getDeclaredConstructor(Long.TYPE, 
Integer.TYPE);
    +      constructor.setAccessible(true);
    +      Field cleanerField = cls.getDeclaredField("cleaner");
    +      cleanerField.setAccessible(true);
    +      DBB_CONSTRUCTOR = constructor;
    +      DBB_CLEANER_FIELD = cleanerField;
    +    } catch (ClassNotFoundException | NoSuchMethodException | 
NoSuchFieldException e) {
    +      throw new IllegalStateException(e);
    +    }
    +  }
    +
    +  private static final Method CLEANER_CREATE_METHOD;
    +  static {
    +    // The implementation of Cleaner changed from JDK 8 to 9
    --- End diff --
    
    is this same in java 11? Why do we need to reference java 9, its dead right 
and it will have no LTS AFAIK.
    Shouldnt we only support LTS?


---

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

Reply via email to