public class HoodieAppendHandle<T extends HoodieRecordPayload,I,K,O> extends HoodieWriteHandle<T,I,K,O>
| Modifier and Type | Field and Description |
|---|---|
protected long |
estimatedNumberOfBytesWritten |
protected String |
fileId |
protected Map<HoodieLogBlock.HeaderMetadataType,String> |
header |
protected long |
insertRecordsWritten |
protected Iterator<HoodieRecord<T>> |
recordItr |
protected long |
recordsDeleted |
protected long |
recordsWritten |
protected List<WriteStatus> |
statuses |
protected long |
updatedRecordsWritten |
protected HoodieLogFormat.Writer |
writer |
IGNORE_RECORD, partitionPath, schemaOnReadEnabled, tableSchema, tableSchemaWithMetaFields, taskContextSupplier, timer, writeSchema, writeSchemaWithMetaFields, writeStatus, writeTokenconfig, fs, hoodieTable, instantTime| Constructor and Description |
|---|
HoodieAppendHandle(HoodieWriteConfig config,
String instantTime,
HoodieTable<T,I,K,O> hoodieTable,
String partitionPath,
String fileId,
Iterator<HoodieRecord<T>> recordItr,
TaskContextSupplier taskContextSupplier) |
HoodieAppendHandle(HoodieWriteConfig config,
String instantTime,
HoodieTable<T,I,K,O> hoodieTable,
String partitionPath,
String fileId,
TaskContextSupplier sparkTaskContextSupplier) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
appendDataAndDeleteBlocks(Map<HoodieLogBlock.HeaderMetadataType,String> header) |
boolean |
canWrite(HoodieRecord record)
Determines whether we can accept the incoming records, into the current file.
|
List<WriteStatus> |
close() |
void |
doAppend() |
IOType |
getIOType() |
protected boolean |
isUpdateRecord(HoodieRecord<T> hoodieRecord)
Returns whether the hoodie record is an UPDATE.
|
protected boolean |
needsUpdateLocation()
Whether there is need to update the record location.
|
void |
write(HoodieRecord record,
Option<org.apache.avro.generic.IndexedRecord> insertValue)
Perform the actual writing of the given record into the backing file.
|
List<WriteStatus> |
writeStatuses() |
createMarkerFile, createNewFileWriter, getAttemptId, getFileSystem, getPartitionId, getPartitionPath, getStageId, getWriterSchemaWithMetaFields, makeNewFilePath, makeNewPath, rewriteRecord, rewriteRecordWithMetadata, writeprotected final String fileId
protected Iterator<HoodieRecord<T extends HoodieRecordPayload>> recordItr
protected HoodieLogFormat.Writer writer
protected final List<WriteStatus> statuses
protected long recordsWritten
protected long recordsDeleted
protected long updatedRecordsWritten
protected long insertRecordsWritten
protected long estimatedNumberOfBytesWritten
protected final Map<HoodieLogBlock.HeaderMetadataType,String> header
public HoodieAppendHandle(HoodieWriteConfig config, String instantTime, HoodieTable<T,I,K,O> hoodieTable, String partitionPath, String fileId, Iterator<HoodieRecord<T>> recordItr, TaskContextSupplier taskContextSupplier)
public HoodieAppendHandle(HoodieWriteConfig config, String instantTime, HoodieTable<T,I,K,O> hoodieTable, String partitionPath, String fileId, TaskContextSupplier sparkTaskContextSupplier)
protected boolean isUpdateRecord(HoodieRecord<T> hoodieRecord)
public void doAppend()
protected void appendDataAndDeleteBlocks(Map<HoodieLogBlock.HeaderMetadataType,String> header)
public boolean canWrite(HoodieRecord record)
HoodieWriteHandle- Whether it belongs to the same partitionPath as existing records - Whether the current file written bytes lt max file size
canWrite in class HoodieWriteHandle<T extends HoodieRecordPayload,I,K,O>public void write(HoodieRecord record, Option<org.apache.avro.generic.IndexedRecord> insertValue)
HoodieWriteHandlewrite in class HoodieWriteHandle<T extends HoodieRecordPayload,I,K,O>public List<WriteStatus> close()
close in class HoodieWriteHandle<T extends HoodieRecordPayload,I,K,O>public IOType getIOType()
getIOType in class HoodieWriteHandle<T extends HoodieRecordPayload,I,K,O>public List<WriteStatus> writeStatuses()
writeStatuses in class HoodieWriteHandle<T extends HoodieRecordPayload,I,K,O>protected boolean needsUpdateLocation()
Copyright © 2022 The Apache Software Foundation. All rights reserved.