class DeltaCommitter extends Committer[DeltaCommittable]
Committer implementation for DeltaSink.
This committer is responsible for taking staged part-files, i.e. part-files in "pending"
state, created by the io.delta.flink.sink.internal.writer.DeltaWriter
and put them in "finished" state ready to be committed to the DeltaLog during "global" commit.
This class behaves almost in the same way as its equivalent
org.apache.flink.connector.file.sink.committer.FileCommitter
in the org.apache.flink.connector.file.sink.FileSink. The only differences are:
- use of the
DeltaCommittableinstead oforg.apache.flink.connector.file.sink.FileSinkCommittable - some simplifications for the committable's internal information and commit behaviour.
In particular in
DeltaCommitter#commitmethod we do not take care of any inprogress file's state (as opposite toorg.apache.flink.connector.file.sink.committer.FileCommitter#commitbecause inDeltaWriter#prepareCommitwe always roll all of the in-progress files. Valid note here is that's also the defaultorg.apache.flink.connector.file.sink.FileSink's behaviour for all of the bulk formats (Parquet included).
Lifecycle of instances of this class is as follows:
- Instances of this class are being created during a commit stage
- For every
DeltaWriterobject there is only one of correspondingDeltaCommittercreated, thus the number of created instances is equal to the parallelism of the application's sink - Every instance exists only during given commit stage after finishing particular
checkpoint interval. Despite being bundled to a finish phase of a checkpoint interval
a single instance of
DeltaCommittermay process committables from multiple checkpoints intervals (it happens e.g. when there was a app's failure and Flink has recovered committables from previous commit stage to be re-committed.
- Alphabetic
- By Inheritance
- DeltaCommitter
- Committer
- AutoCloseable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new DeltaCommitter(bucketWriter: BucketWriter[_, _])
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
close(): Unit
- Definition Classes
- DeltaCommitter → AutoCloseable
- Annotations
- @Override()
-
def
commit(committables: List[DeltaCommittable]): List[DeltaCommittable]
This method is responsible for "committing" files locally.
This method is responsible for "committing" files locally.
"Local" commit in our case means the same as in
org.apache.flink.connector.file.sink.committer.FileCommitter#commit, namely it's the simple process of renaming the hidden file to make it visible and removing from the name some 'in-progress file' marker. For details see internal interfaces inorg.apache.flink.streaming.api.functions.sink.filesystem.BucketWriter.- committables
list of committables. May contain committables from multiple checkpoint intervals
- returns
always empty list as we do not allow or expect any retry behaviour
- Definition Classes
- DeltaCommitter → Committer
- Annotations
- @Override()
- Exceptions thrown
IOExceptionif committing files (e.g. I/O errors occurs)
-
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()