-
Notifications
You must be signed in to change notification settings - Fork 2.5k
[HUDI-6334] Integrate logcompaction table service to metadata table and provides various bugfixes to metadata table #8900
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
48fe456
e586d49
f8bb9f4
e839b4d
55f1e4a
e5c0315
e3dc34b
e40785a
3bb5fe6
4d26a4d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,6 +26,8 @@ | |
| import org.apache.hudi.config.HoodieWriteConfig; | ||
| import org.apache.hudi.keygen.BaseKeyGenerator; | ||
| import org.apache.hudi.table.HoodieTable; | ||
| import org.slf4j.Logger; | ||
| import org.slf4j.LoggerFactory; | ||
|
|
||
| import java.util.Iterator; | ||
| import java.util.Map; | ||
|
|
@@ -34,6 +36,7 @@ | |
| * Factory class for hoodie merge handle. | ||
| */ | ||
| public class HoodieMergeHandleFactory { | ||
| private static final Logger LOG = LoggerFactory.getLogger(HoodieMergeHandleFactory.class); | ||
| /** | ||
| * Creates a merge handle for normal write path. | ||
| */ | ||
|
|
@@ -47,6 +50,7 @@ public static <T, I, K, O> HoodieMergeHandle<T, I, K, O> create( | |
| String fileId, | ||
| TaskContextSupplier taskContextSupplier, | ||
| Option<BaseKeyGenerator> keyGeneratorOpt) { | ||
| LOG.info("Create update handle for fileId {} and partition path {} at commit {}", fileId, partitionPath, instantTime); | ||
| if (table.requireSortedRecords()) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we just remove this log, it's verbose. |
||
| if (table.getMetaClient().getTableConfig().isCDCEnabled()) { | ||
| return new HoodieSortedMergeHandleWithChangeLog<>(writeConfig, instantTime, table, recordItr, partitionPath, fileId, taskContextSupplier, | ||
|
|
@@ -79,6 +83,7 @@ public static <T, I, K, O> HoodieMergeHandle<T, I, K, O> create( | |
| HoodieBaseFile dataFileToBeMerged, | ||
| TaskContextSupplier taskContextSupplier, | ||
| Option<BaseKeyGenerator> keyGeneratorOpt) { | ||
| LOG.info("Get updateHandle for fileId {} and partitionPath {} at commit {}", fileId, partitionPath, instantTime); | ||
| if (table.requireSortedRecords()) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we just remove this log, it's verbose.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, will change it to debug mode in subsequent patch. |
||
| return new HoodieSortedMergeHandle<>(writeConfig, instantTime, table, keyToNewRecords, partitionPath, fileId, | ||
| dataFileToBeMerged, taskContextSupplier, keyGeneratorOpt); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems only MDT uses the log compaction. If that is true, kind of think this belongs to a MDT config.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Log compaction can also be done on a main table, if it of MOR table type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think enable log compaction is still required so created another config in HoodieMetadataConfig class.