Skip to content

Conversation

@manojpec
Copy link
Contributor

@manojpec manojpec commented Feb 4, 2022

What is the purpose of the pull request

When metadata table is created and when it decides to the initialization
from the filesystem for the user dataset, all the enabled partitions need
to be initialized along with FILES partition. This fix adds init support
for bloom filter and column stats partitions.

Brief change log

Since the initialization can be for a huge set of files, the records prepared
are in HoodieData format so that they can be passed on
to engine specific commit without materialization at the driver and avoid OOME.

PS: This is stacked on top of #4740
Commit to review: 9c4b90b

(for example:)

  • Modify AnnotationLocation checkstyle rule in checkstyle.xml

Verify this pull request

(Please pick either of the following options)

This pull request is a trivial rework / code cleanup without any test coverage.

(or)

This pull request is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end.
  • Added HoodieClientWriteTest to verify the change.
  • Manually verified the change by running a job locally.

Committer checklist

  • Has a corresponding JIRA in PR title & commit

  • Commit message is descriptive of the change

  • CI is green

  • Necessary doc changes done or have another open PR

  • For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.

…lter construction from index based on the type param

 - Write stats are converted to metadata index records during the commit.
   Making them use the HoodieData<HoodieRecord> type so that the record
   generation scales up with needs.

 - When building the BloomFilter from the index records, using the type param
   stored in the payload instead of hardcoded type.
…n stats partitions

 - When metadata table is created and when it decides to the initialization
   from the filesystem for the user dataset, all the enabled partitions need
   to be initialized along with FILES partition. This fix adds init support
   for bloom filter and column stats partitions.
@hudi-bot
Copy link
Collaborator

hudi-bot commented Feb 4, 2022

CI report:

Bot commands @hudi-bot supports the following commands:
  • @hudi-bot run azure re-run the last Azure build


return appendedFileMap.entrySet().stream().flatMap(appendedFileNameLengthPair -> {
if (!FSUtils.isBaseFile(new Path(appendedFileNameLengthPair.getKey()))
|| !appendedFileNameLengthPair.getKey().endsWith(HoodieFileFormat.PARQUET.getFileExtension())) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should try to generalize this if-condition to a method. I know right now we just get stats from base parquet file but it might change tomorrow.

List<String> partitions = partitionInfoList.stream().map(p ->
p.getRelativePath().isEmpty() ? NON_PARTITIONED_NAME : p.getRelativePath()).collect(Collectors.toList());
final int totalFiles = partitionInfoList.stream().mapToInt(p -> p.getTotalFiles()).sum();
private void initialCommit(String createInstantTime) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for extracting the actual commit part out of bootstrap (initialize filegroup). This will help me for async indexing.
How about adding partitionType as another parameter and making initialCommit part of the HoodieTableMetadataWriter interface? That way we can call from write client or any action executor if needed. Not necessary to do this in PR but just a suggestion to consider.

@codope
Copy link
Member

codope commented Feb 18, 2022

Covered in #4848

@codope codope closed this Feb 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants