Skip to content

Conversation

@boneanxs
Copy link
Contributor

Tips

What is the purpose of the pull request

(For example: This pull request adds quick-start document.)

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.

props.put(HoodieWriteConfig.AUTO_COMMIT_ENABLE.key(), Boolean.FALSE.toString());
props.put(HoodieStorageConfig.PARQUET_MAX_FILE_SIZE.key(), String.valueOf(getWriteConfig().getClusteringTargetFileMaxBytes()));
HoodieWriteConfig newConfig = HoodieWriteConfig.newBuilder().withProps(props).build();
getWriteConfig().setValue(HoodieWriteConfig.AUTO_COMMIT_ENABLE, Boolean.FALSE.toString());
Copy link
Member

Choose a reason for hiding this comment

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

Isn't it possible this could cause the same issue, because getWriteConfig() is returning the same object? Maybe fix in superclass 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.

As TypedProperties is thread-safe now, so changing this here should not cause the same issue.
Please correct me if I'm wrong, I thought the purpose of this pr is avoiding to set bulk related configures(bulkInsertParallelism, parquet max file size) to the original writeConfig(getWriteConfig).

Copy link
Member

Choose a reason for hiding this comment

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

Yeah TypedProperties is thread-safe. But, why can't we do the same for this config like how you did for bulk related configures(bulkInsertParallelism, parquet max file size) i.e. set auto_commit_enable in newConfig on L64 below.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because disable auto_commit_enable will be checked in

Setting it in newConfig will not take effect as it uses BaseCommitActionExecutor.config to check(which is then same with getWriteConfig()).

Maybe I can set auto_commit_enable in BaseCommitActionExecutor after L236, WDYT?

final Schema schema = HoodieAvroUtils.addMetadataFields(new Schema.Parser().parse(config.getSchema()));

@codope codope self-assigned this Mar 14, 2022
@nsivabalan nsivabalan added the priority:critical Production degraded; pipelines stalled label Mar 15, 2022
@boneanxs
Copy link
Contributor Author

Gentle ping @codope

Copy link
Member

@codope codope left a comment

Choose a reason for hiding this comment

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

@boneanxs Looks good. Can you resolve one comment below?

props.put(HoodieWriteConfig.AUTO_COMMIT_ENABLE.key(), Boolean.FALSE.toString());
props.put(HoodieStorageConfig.PARQUET_MAX_FILE_SIZE.key(), String.valueOf(getWriteConfig().getClusteringTargetFileMaxBytes()));
HoodieWriteConfig newConfig = HoodieWriteConfig.newBuilder().withProps(props).build();
getWriteConfig().setValue(HoodieWriteConfig.AUTO_COMMIT_ENABLE, Boolean.FALSE.toString());
Copy link
Member

Choose a reason for hiding this comment

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

Yeah TypedProperties is thread-safe. But, why can't we do the same for this config like how you did for bulk related configures(bulkInsertParallelism, parquet max file size) i.e. set auto_commit_enable in newConfig on L64 below.

Copy link
Member

@codope codope left a comment

Choose a reason for hiding this comment

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

LGTM. @boneanxs can you please rebase?

@boneanxs
Copy link
Contributor Author

@hudi-bot run azure

@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

@boneanxs
Copy link
Contributor Author

@codope can merge this now

@codope
Copy link
Member

codope commented Mar 26, 2022

Thanks @boneanxs for working on this.

@codope codope merged commit 57b4f39 into apache:master Mar 26, 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:critical Production degraded; pipelines stalled

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants