public class WriteProfile extends Object
BucketAssigner,
such as the average record size and small files.
The profile is re-constructed when there are new commits on the timeline.
| Modifier and Type | Field and Description |
|---|---|
protected HoodieWriteConfig |
config
The write config.
|
protected SyncableFileSystemView |
fsView
The file system view cache for one checkpoint interval.
|
protected HoodieTableMetaClient |
metaClient
The meta client.
|
| Constructor and Description |
|---|
WriteProfile(HoodieWriteConfig config,
HoodieFlinkEngineContext context) |
| Modifier and Type | Method and Description |
|---|---|
long |
getAvgSize() |
protected SyncableFileSystemView |
getFileSystemView() |
HoodieTableMetaClient |
getMetaClient() |
Map<String,HoodieCommitMetadata> |
getMetadataCache() |
long |
getRecordsPerBucket() |
List<SmallFile> |
getSmallFiles(String partitionPath)
Returns a list of small files in the given partition path.
|
protected HoodieTable<?,?,?,?> |
getTable() |
void |
reload(long checkpointId)
Reload the write profile, should do once for each checkpoint.
|
protected List<SmallFile> |
smallFilesProfile(String partitionPath)
Returns a list of small files in the given partition path from the latest filesystem view.
|
protected final HoodieWriteConfig config
protected final HoodieTableMetaClient metaClient
protected SyncableFileSystemView fsView
public WriteProfile(HoodieWriteConfig config, HoodieFlinkEngineContext context)
public long getAvgSize()
public long getRecordsPerBucket()
public HoodieTableMetaClient getMetaClient()
protected HoodieTable<?,?,?,?> getTable()
public List<SmallFile> getSmallFiles(String partitionPath)
Note: This method should be thread safe.
protected List<SmallFile> smallFilesProfile(String partitionPath)
protected SyncableFileSystemView getFileSystemView()
public void reload(long checkpointId)
We do these things: i). reload the timeline; ii). re-construct the record profile; iii) clean the small files cache.
Note: This method should be thread safe.
@VisibleForTesting public Map<String,HoodieCommitMetadata> getMetadataCache()
Copyright © 2022 The Apache Software Foundation. All rights reserved.