Class CassandraBulkSourceRelation

  • All Implemented Interfaces:
    org.apache.spark.sql.sources.InsertableRelation

    public class CassandraBulkSourceRelation
    extends org.apache.spark.sql.sources.BaseRelation
    implements org.apache.spark.sql.sources.InsertableRelation
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void cancelJob​(CancelJobEvent cancelJobEvent)  
      void insert​(org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> data, boolean overwrite)  
      org.apache.spark.sql.types.StructType schema()  
      long sizeInBytes()  
      org.apache.spark.sql.SQLContext sqlContext()  
      protected void unpersist()
      Deletes cached copies of the broadcast on the executors
      • Methods inherited from class org.apache.spark.sql.sources.BaseRelation

        needConversion, unhandledFilters
      • Methods inherited from class java.lang.Object

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

      • CassandraBulkSourceRelation

        public CassandraBulkSourceRelation​(BulkWriterContext writerContext,
                                           org.apache.spark.sql.SQLContext sqlContext)
    • Method Detail

      • sqlContext

        @NotNull
        public org.apache.spark.sql.SQLContext sqlContext()
        Specified by:
        sqlContext in class org.apache.spark.sql.sources.BaseRelation
      • schema

        @NotNull
        public org.apache.spark.sql.types.StructType schema()
        Specified by:
        schema in class org.apache.spark.sql.sources.BaseRelation
        Returns:
        An empty StructType, as this is a writer only, so schema is not applicable
      • sizeInBytes

        public long sizeInBytes()
        Overrides:
        sizeInBytes in class org.apache.spark.sql.sources.BaseRelation
        Returns:
        0 size as not applicable use by the planner in the writer-only use case
      • insert

        public void insert​(@NotNull
                           org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> data,
                           boolean overwrite)
        Specified by:
        insert in interface org.apache.spark.sql.sources.InsertableRelation
      • cancelJob

        public void cancelJob​(@NotNull
                              CancelJobEvent cancelJobEvent)
      • unpersist

        protected void unpersist()
        Deletes cached copies of the broadcast on the executors