Search in sources :

Example 1 with BulkInsertWriterHelper

use of org.apache.hudi.sink.bulk.BulkInsertWriterHelper in project hudi by apache.

the class AppendWriteFunction method initWriterHelper.

// -------------------------------------------------------------------------
// Utilities
// -------------------------------------------------------------------------
private void initWriterHelper() {
    this.currentInstant = instantToWrite(true);
    if (this.currentInstant == null) {
        // in case there are empty checkpoints that has no input data
        throw new HoodieException("No inflight instant when flushing data!");
    }
    this.writerHelper = new BulkInsertWriterHelper(this.config, this.writeClient.getHoodieTable(), this.writeClient.getConfig(), this.currentInstant, this.taskID, getRuntimeContext().getNumberOfParallelSubtasks(), getRuntimeContext().getAttemptNumber(), this.rowType);
}
Also used : BulkInsertWriterHelper(org.apache.hudi.sink.bulk.BulkInsertWriterHelper) HoodieException(org.apache.hudi.exception.HoodieException)

Aggregations

HoodieException (org.apache.hudi.exception.HoodieException)1 BulkInsertWriterHelper (org.apache.hudi.sink.bulk.BulkInsertWriterHelper)1