Packages

trait DeltaWriter[T] extends DataWriter[T]

A data writer returned by long) and is responsible for writing a delta of rows.

Annotations
@Experimental()
Source
DeltaWriter.java
Since

3.4.0

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DeltaWriter
  2. DataWriter
  3. Closeable
  4. AutoCloseable
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def abort(): Unit

    Aborts this writer if it is failed.

    Aborts this writer if it is failed. Implementations should clean up the data for already written records.

    This method will only be called if there is one record failed to write, or #commit() failed.

    If this method fails(by throwing an exception), the underlying data source may have garbage that need to be cleaned by BatchWrite#abort(WriterCommitMessage[]) or manually, but these garbage should not be visible to data source readers.

    Definition Classes
    DataWriter
    Exceptions thrown

    IOException if failure happens during disk/network IO like writing files.

  2. abstract def close(): Unit
    Definition Classes
    Closeable → AutoCloseable
    Annotations
    @throws(classOf[java.io.IOException])
  3. abstract def commit(): WriterCommitMessage

    Commits this writer after all records are written successfully, returns a commit message which will be sent back to driver side and passed to BatchWrite#commit(WriterCommitMessage[]).

    Commits this writer after all records are written successfully, returns a commit message which will be sent back to driver side and passed to BatchWrite#commit(WriterCommitMessage[]).

    The written data should only be visible to data source readers after BatchWrite#commit(WriterCommitMessage[]) succeeds, which means this method should still "hide" the written data and ask the BatchWrite at driver side to do the final commit via WriterCommitMessage.

    If this method fails (by throwing an exception), #abort() will be called and this data writer is considered to have been failed.

    Definition Classes
    DataWriter
    Exceptions thrown

    IOException if failure happens during disk/network IO like writing files.

  4. abstract def delete(metadata: T, id: T): Unit

    Deletes a row.

    Deletes a row.

    metadata

    values for metadata columns that were projected but are not part of the row ID

    id

    a row ID to delete

    Exceptions thrown

    IOException if failure happens during disk/network IO like writing files

  5. abstract def insert(row: T): Unit

    Inserts a new row.

    Inserts a new row.

    row

    a row to insert

    Exceptions thrown

    IOException if failure happens during disk/network IO like writing files

  6. abstract def update(metadata: T, id: T, row: T): Unit

    Updates a row.

    Updates a row.

    metadata

    values for metadata columns that were projected but are not part of the row ID

    id

    a row ID to update

    row

    a row with updated values

    Exceptions thrown

    IOException if failure happens during disk/network IO like writing files

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  6. def currentMetricsValues(): Array[CustomTaskMetric]

    Returns an array of custom task metrics.

    Returns an array of custom task metrics. By default it returns empty array. Note that it is not recommended to put heavy logic in this method as it may affect writing performance.

    Definition Classes
    DataWriter
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  9. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  15. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  16. def toString(): String
    Definition Classes
    AnyRef → Any
  17. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  18. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  19. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  20. def write(row: T): Unit

    Writes one record.

    Writes one record.

    If this method fails (by throwing an exception), #abort() will be called and this data writer is considered to have been failed.

    Definition Classes
    DeltaWriterDataWriter
    Annotations
    @Override()
    Exceptions thrown

    IOException if failure happens during disk/network IO like writing files.

  21. def writeAll(records: Iterator[T]): Unit

    Writes all records provided by the given iterator.

    Writes all records provided by the given iterator. By default, it calls the #write method for each record in the iterator.

    If this method fails (by throwing an exception), #abort() will be called and this data writer is considered to have been failed.

    Definition Classes
    DataWriter
    Since

    4.0.0

    Exceptions thrown

    IOException if failure happens during disk/network IO like writing files.

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from DataWriter[T]

Inherited from Closeable

Inherited from AutoCloseable

Inherited from AnyRef

Inherited from Any

Ungrouped