@NotThreadSafe public class HoodieCreateHandle<T,I,K,O> extends HoodieWriteHandle<T,I,K,O>
| Modifier and Type | Field and Description |
|---|---|
protected HoodieFileWriter |
fileWriter |
protected long |
insertRecordsWritten |
protected org.apache.hadoop.fs.Path |
path |
protected long |
recordsDeleted |
protected long |
recordsWritten |
fileId, newRecordLocation, partitionPath, recordMerger, schemaOnReadEnabled, taskContextSupplier, timer, writeSchema, writeSchemaWithMetaFields, writeStatus, writeTokenconfig, fs, hoodieTable, instantTime| Constructor and Description |
|---|
HoodieCreateHandle(HoodieWriteConfig config,
String instantTime,
HoodieTable<T,I,K,O> hoodieTable,
String partitionPath,
String fileId,
Map<String,HoodieRecord<T>> recordMap,
TaskContextSupplier taskContextSupplier)
Called by the compactor code path.
|
HoodieCreateHandle(HoodieWriteConfig config,
String instantTime,
HoodieTable<T,I,K,O> hoodieTable,
String partitionPath,
String fileId,
Option<org.apache.avro.Schema> overriddenSchema,
TaskContextSupplier taskContextSupplier) |
HoodieCreateHandle(HoodieWriteConfig config,
String instantTime,
HoodieTable<T,I,K,O> hoodieTable,
String partitionPath,
String fileId,
Option<org.apache.avro.Schema> overriddenSchema,
TaskContextSupplier taskContextSupplier,
boolean preserveMetadata) |
HoodieCreateHandle(HoodieWriteConfig config,
String instantTime,
HoodieTable<T,I,K,O> hoodieTable,
String partitionPath,
String fileId,
TaskContextSupplier taskContextSupplier) |
HoodieCreateHandle(HoodieWriteConfig config,
String instantTime,
HoodieTable<T,I,K,O> hoodieTable,
String partitionPath,
String fileId,
TaskContextSupplier taskContextSupplier,
boolean preserveMetadata) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canWrite(HoodieRecord record)
Determines whether we can accept the incoming records, into the current file.
|
List<WriteStatus> |
close()
Performs actions to durably, persist the current changes and returns a WriteStatus object.
|
protected void |
doWrite(HoodieRecord record,
org.apache.avro.Schema schema,
TypedProperties props)
Perform the actual writing of the given record into the backing file.
|
IOType |
getIOType() |
protected void |
setupWriteStatus()
Set up the write status.
|
void |
write()
Writes all records passed.
|
createLogWriter, createLogWriter, createLogWriter, createMarkerFile, getAttemptId, getConfig, getFileId, getFileSystem, getHoodieTableMetaClient, getPartitionId, getPartitionPath, getStageId, getWriterSchema, getWriterSchemaWithMetaFields, isClosed, makeNewFilePath, makeNewPath, markClosed, toAvroRecord, write, writeStatusesprotected HoodieFileWriter fileWriter
protected final org.apache.hadoop.fs.Path path
protected long recordsWritten
protected long insertRecordsWritten
protected long recordsDeleted
public HoodieCreateHandle(HoodieWriteConfig config, String instantTime, HoodieTable<T,I,K,O> hoodieTable, String partitionPath, String fileId, TaskContextSupplier taskContextSupplier)
public HoodieCreateHandle(HoodieWriteConfig config, String instantTime, HoodieTable<T,I,K,O> hoodieTable, String partitionPath, String fileId, TaskContextSupplier taskContextSupplier, boolean preserveMetadata)
public HoodieCreateHandle(HoodieWriteConfig config, String instantTime, HoodieTable<T,I,K,O> hoodieTable, String partitionPath, String fileId, Option<org.apache.avro.Schema> overriddenSchema, TaskContextSupplier taskContextSupplier)
public HoodieCreateHandle(HoodieWriteConfig config, String instantTime, HoodieTable<T,I,K,O> hoodieTable, String partitionPath, String fileId, Option<org.apache.avro.Schema> overriddenSchema, TaskContextSupplier taskContextSupplier, boolean preserveMetadata)
public HoodieCreateHandle(HoodieWriteConfig config, String instantTime, HoodieTable<T,I,K,O> hoodieTable, String partitionPath, String fileId, Map<String,HoodieRecord<T>> recordMap, TaskContextSupplier taskContextSupplier)
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
protected void doWrite(HoodieRecord record, org.apache.avro.Schema schema, TypedProperties props)
public void write()
public List<WriteStatus> close()
protected void setupWriteStatus()
throws IOException
IOException - if error occursCopyright © 2023 The Apache Software Foundation. All rights reserved.