Skip to content

Conversation

@boneanxs
Copy link
Contributor

@boneanxs boneanxs commented Feb 16, 2022

Tips

What is the purpose of the pull request

Method getSmallFiles could be very time consuming if there are many small files in one partitionPath. Though we already set hoodie.parquet.small.file.limit to 0, it will still call getSmallFiles to do the comparison, this could be avoided.

Brief change log

(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.

@nsivabalan nsivabalan self-assigned this Feb 16, 2022
@nsivabalan nsivabalan added the priority:high Significant impact; potential bugs label Feb 16, 2022
@boneanxs
Copy link
Contributor Author

@hudi-bot run azure

1 similar comment
@boneanxs
Copy link
Contributor Author

@hudi-bot run azure

private Map<String, List<SmallFile>> getSmallFilesForPartitions(List<String> partitionPaths, HoodieEngineContext context) {
Map<String, List<SmallFile>> partitionSmallFilesMap = new HashMap<>();

if (config.getParquetSmallFileLimit() == 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

How about using <= 0 to indicate always writing to new file group? And maybe add a description of this behavior to the document of PARQUET_SMALL_FILE_LIMIT.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can PARQUET_SMALL_FILE_LIMIT be set to be negative? I'm not sure.

Yeah, I'll add the description to the PARQUET_SMALL_FILE_LIMIT

Copy link
Contributor

Choose a reason for hiding this comment

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

It is possible to be set it to negative, which is meaningless of course. So I guess we could cover it as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@hudi-bot
Copy link
Collaborator

CI report:

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

@nsivabalan nsivabalan merged commit 5009138 into apache:master Feb 18, 2022
vingov pushed a commit to vingov/hudi that referenced this pull request Apr 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority:high Significant impact; potential bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants