trait DeltaWriter[T] extends DataWriter[T]
A data writer returned by long) and is
responsible for writing a delta of rows.
- Annotations
- @Experimental()
- Since
3.4.0
- Alphabetic
- By Inheritance
- DeltaWriter
- DataWriter
- Closeable
- AutoCloseable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
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
IOExceptionif failure happens during disk/network IO like writing files.
-
abstract
def
close(): Unit
- Definition Classes
- Closeable → AutoCloseable
- Annotations
- @throws( classOf[java.io.IOException] )
-
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 theBatchWriteat driver side to do the final commit viaWriterCommitMessage.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
IOExceptionif failure happens during disk/network IO like writing files.
-
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
IOExceptionif failure happens during disk/network IO like writing files
-
abstract
def
insert(row: T): Unit
Inserts a new row.
Inserts a new row.
- row
a row to insert
- Exceptions thrown
IOExceptionif failure happens during disk/network IO like writing files
-
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
IOExceptionif failure happens during disk/network IO like writing files
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
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
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
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
- DeltaWriter → DataWriter
- Annotations
- @Override()
- Exceptions thrown
IOExceptionif failure happens during disk/network IO like writing files.