public class HoodieCommitMetadata extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
protected Boolean |
compacted |
protected Map<String,String> |
extraMetadata |
protected WriteOperationType |
operationType |
protected Map<String,List<HoodieWriteStat>> |
partitionToWriteStats |
static String |
SCHEMA_KEY |
| Constructor and Description |
|---|
HoodieCommitMetadata() |
HoodieCommitMetadata(boolean compacted) |
public static final String SCHEMA_KEY
protected Map<String,List<HoodieWriteStat>> partitionToWriteStats
protected Boolean compacted
protected WriteOperationType operationType
public HoodieCommitMetadata()
public HoodieCommitMetadata(boolean compacted)
public void addWriteStat(String partitionPath, HoodieWriteStat stat)
public List<HoodieWriteStat> getWriteStats(String partitionPath)
public Map<String,List<HoodieWriteStat>> getPartitionToWriteStats()
public List<HoodieWriteStat> getWriteStats()
public Boolean getCompacted()
public void setCompacted(Boolean compacted)
public void setOperationType(WriteOperationType type)
public WriteOperationType getOperationType()
public HashMap<String,String> getFileIdAndFullPaths(StoragePath basePath)
public List<String> getFullPathsByPartitionPath(String basePath, String partitionPath)
public Map<HoodieFileGroupId,String> getFileGroupIdAndFullPaths(String basePath)
public Map<String,StoragePathInfo> getFullPathToInfo(HoodieStorage storage, String basePath)
storage - HoodieStorage instance.basePath - The base pathpublic Map<String,StoragePathInfo> getFileIdToInfo(String basePath)
Note: different with getFullPathToInfo(HoodieStorage, String),
only the latest commit file for a file group is returned,
this is an optimization for COPY_ON_WRITE table to eliminate legacy files for filesystem view.
basePath - The base pathpublic String toJsonString() throws IOException
IOExceptionpublic static <T> T fromJsonString(String jsonStr, Class<T> clazz) throws Exception
Exceptionpublic static Option<Pair<String,List<String>>> getFileSliceForFileGroupFromDeltaCommit(byte[] bytes, HoodieFileGroupId fileGroupId)
public long fetchTotalPartitionsWritten()
public long fetchTotalFilesInsert()
public long fetchTotalFilesUpdated()
public long fetchTotalUpdateRecordsWritten()
public long fetchTotalInsertRecordsWritten()
public long fetchTotalRecordsWritten()
public long fetchTotalBytesWritten()
public long fetchTotalWriteErrors()
public long getTotalRecordsDeleted()
public Long getTotalLogRecordsCompacted()
public Long getTotalLogFilesCompacted()
public Long getTotalCompactedRecordsUpdated()
public Long getTotalCorruptLogBlocks()
public Long getTotalRollbackLogBlocks()
public Long getTotalLogFilesSize()
public Long getTotalScanTime()
public Long getTotalCreateTime()
public Long getTotalUpsertTime()
public static <T> T fromBytes(byte[] bytes,
Class<T> clazz)
throws IOException
IOExceptionCopyright © 2024 The Apache Software Foundation. All rights reserved.