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
[HUDI-2167] HoodieCompactionConfig get HoodieCleaningPolicy NullPointerException #3402
Conversation
@@ -152,6 +153,7 @@ public static HoodieWriteConfig getHoodieClientConfig(Configuration conf) { | |||
// actually Flink cleaning is always with parallelism 1 now | |||
.withCleanerParallelism(20) | |||
.archiveCommitsWith(conf.getInteger(FlinkOptions.ARCHIVE_MIN_COMMITS), conf.getInteger(FlinkOptions.ARCHIVE_MAX_COMMITS)) | |||
.withCleanerPolicy(HoodieCleaningPolicy.KEEP_LATEST_COMMITS) | |||
.build()) |
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.
Isn't HoodieCleaningPolicy.KEEP_LATEST_COMMITS
the default value ?
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.
build() method get policy use compactionConfig.getString(CLEANER_POLICY_PROP),this method doesn't return default value, but null. if not set then will return null.
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.
The HoodieCompactionConfig
would setDefaults
first before build.
Not a valid fix, close it. |
What is the purpose of the pull request
HUDI-2167
Fix org.apache.hudi.util.StreamerUtil#getHoodieClientConfig does not set HoodieCleaningPolicy but org.apache.hudi.config.HoodieCompactionConfig.Builder#build check the policy. Then will got NullPointerException.
Exception stack is:
Brief change log
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:)
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.