Class SparkClassLoaderOverride

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    public class SparkClassLoaderOverride
    extends java.lang.Object
    implements java.lang.AutoCloseable
    This class is an AutoCloseable wrapper that allows to temporarily substitute the instance of ClassLoader in use by a ObjectInputStream constructed by Spark for performing JDK deserialization. Such substitution is required in order to resolve types of Cassandra-version-dependent objects, specifically those defined under org.apache.cassandra.spark.data.types and used by the CqlTable.
    • Constructor Summary

      Constructors 
      Constructor Description
      SparkClassLoaderOverride​(java.io.ObjectInputStream in, java.lang.ClassLoader loader)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SparkClassLoaderOverride

        public SparkClassLoaderOverride​(@NotNull
                                        java.io.ObjectInputStream in,
                                        @NotNull
                                        java.lang.ClassLoader loader)
    • Method Detail

      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable