You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2021/04/08 02:24:43 UTC
[GitHub] [hudi] danny0405 opened a new pull request #2785: [HUDI-1775] Add option for compaction parallelism
danny0405 opened a new pull request #2785:
URL: https://github.com/apache/hudi/pull/2785
## *Tips*
- *Thank you very much for contributing to Apache Hudi.*
- *Please review https://hudi.apache.org/contributing.html before opening a pull request.*
## 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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] yanghua commented on a change in pull request #2785: [HUDI-1775] Add option for compaction parallelism
Posted by GitBox <gi...@apache.org>.
yanghua commented on a change in pull request #2785:
URL: https://github.com/apache/hudi/pull/2785#discussion_r609610921
##########
File path: hudi-flink/src/main/java/org/apache/hudi/sink/partitioner/BucketAssignFunction.java
##########
@@ -159,8 +164,11 @@ public void processElement(I value, Context ctx, Collector<O> out) throws Except
final BucketInfo bucketInfo;
final HoodieRecordLocation location;
- if (!partitionLoadState.contains(hoodieKey.getPartitionPath())) {
+ if (bootstrapIndex && !partitionLoadState.contains(hoodieKey.getPartitionPath())) {
// If the partition records are never loaded, load the records first.
+
+ // The dataset may be huge, thus the processing would block for long,
Review comment:
Is it the right place to add this comment?
##########
File path: hudi-flink/src/main/java/org/apache/hudi/configuration/FlinkOptions.java
##########
@@ -255,8 +264,14 @@ private FlinkOptions() {
public static final ConfigOption<Double> WRITE_BATCH_SIZE = ConfigOptions
.key("write.batch.size.MB")
.doubleType()
- .defaultValue(2D) // 2MB
- .withDescription("Batch buffer size in MB to flush data into the underneath filesystem");
+ .defaultValue(64D) // 64MB
+ .withDescription("Batch buffer size in MB to flush data into the underneath filesystem, default 64MB");
+
+ public static final ConfigOption<Integer> WRITE_LOG_BLOCK_SIZE = ConfigOptions
+ .key("write.log_block.size")
Review comment:
Can we also add a unit like `WRITE_BATCH_SIZE `?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] danny0405 closed pull request #2785: [HUDI-1775] Add option for compaction parallelism
Posted by GitBox <gi...@apache.org>.
danny0405 closed pull request #2785:
URL: https://github.com/apache/hudi/pull/2785
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] codecov-io commented on pull request #2785: [HUDI-1775] Add option for compaction parallelism
Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #2785:
URL: https://github.com/apache/hudi/pull/2785#issuecomment-815400787
# [Codecov](https://codecov.io/gh/apache/hudi/pull/2785?src=pr&el=h1) Report
> Merging [#2785](https://codecov.io/gh/apache/hudi/pull/2785?src=pr&el=desc) (4fca1f0) into [master](https://codecov.io/gh/apache/hudi/commit/3a926aacf6552fc06005db4a7880a233db904330?el=desc) (3a926aa) will **decrease** coverage by `37.68%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/hudi/pull/2785?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #2785 +/- ##
============================================
- Coverage 47.05% 9.37% -37.69%
+ Complexity 3357 48 -3309
============================================
Files 484 54 -430
Lines 23094 1995 -21099
Branches 2456 235 -2221
============================================
- Hits 10868 187 -10681
+ Misses 11280 1795 -9485
+ Partials 946 13 -933
```
| Flag | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| hudicli | `?` | `?` | |
| hudiclient | `?` | `?` | |
| hudicommon | `?` | `?` | |
| hudiflink | `?` | `?` | |
| hudihadoopmr | `?` | `?` | |
| hudisparkdatasource | `?` | `?` | |
| hudisync | `?` | `?` | |
| huditimelineservice | `?` | `?` | |
| hudiutilities | `9.37% <ø> (ø)` | `0.00 <ø> (ø)` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/hudi/pull/2785?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [.../org/apache/hudi/cli/commands/MetadataCommand.java](https://codecov.io/gh/apache/hudi/pull/2785/diff?src=pr&el=tree#diff-aHVkaS1jbGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvY2xpL2NvbW1hbmRzL01ldGFkYXRhQ29tbWFuZC5qYXZh) | | | |
| [...di/common/table/log/block/HoodieAvroDataBlock.java](https://codecov.io/gh/apache/hudi/pull/2785/diff?src=pr&el=tree#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvY29tbW9uL3RhYmxlL2xvZy9ibG9jay9Ib29kaWVBdnJvRGF0YUJsb2NrLmphdmE=) | | | |
| [...ache/hudi/cli/commands/ArchivedCommitsCommand.java](https://codecov.io/gh/apache/hudi/pull/2785/diff?src=pr&el=tree#diff-aHVkaS1jbGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvY2xpL2NvbW1hbmRzL0FyY2hpdmVkQ29tbWl0c0NvbW1hbmQuamF2YQ==) | | | |
| [...rg/apache/hudi/common/model/HoodieAvroPayload.java](https://codecov.io/gh/apache/hudi/pull/2785/diff?src=pr&el=tree#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvY29tbW9uL21vZGVsL0hvb2RpZUF2cm9QYXlsb2FkLmphdmE=) | | | |
| [...di/hadoop/hive/HoodieCombineRealtimeFileSplit.java](https://codecov.io/gh/apache/hudi/pull/2785/diff?src=pr&el=tree#diff-aHVkaS1oYWRvb3AtbXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvaGFkb29wL2hpdmUvSG9vZGllQ29tYmluZVJlYWx0aW1lRmlsZVNwbGl0LmphdmE=) | | | |
| [...oning/compaction/CompactionV1MigrationHandler.java](https://codecov.io/gh/apache/hudi/pull/2785/diff?src=pr&el=tree#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvY29tbW9uL3RhYmxlL3RpbWVsaW5lL3ZlcnNpb25pbmcvY29tcGFjdGlvbi9Db21wYWN0aW9uVjFNaWdyYXRpb25IYW5kbGVyLmphdmE=) | | | |
| [.../hudi/table/format/cow/CopyOnWriteInputFormat.java](https://codecov.io/gh/apache/hudi/pull/2785/diff?src=pr&el=tree#diff-aHVkaS1mbGluay9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvaHVkaS90YWJsZS9mb3JtYXQvY293L0NvcHlPbldyaXRlSW5wdXRGb3JtYXQuamF2YQ==) | | | |
| [...hudi/hadoop/hive/HoodieCombineHiveInputFormat.java](https://codecov.io/gh/apache/hudi/pull/2785/diff?src=pr&el=tree#diff-aHVkaS1oYWRvb3AtbXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvaGFkb29wL2hpdmUvSG9vZGllQ29tYmluZUhpdmVJbnB1dEZvcm1hdC5qYXZh) | | | |
| [...in/java/org/apache/hudi/common/model/BaseFile.java](https://codecov.io/gh/apache/hudi/pull/2785/diff?src=pr&el=tree#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvY29tbW9uL21vZGVsL0Jhc2VGaWxlLmphdmE=) | | | |
| [...g/apache/hudi/common/function/FunctionWrapper.java](https://codecov.io/gh/apache/hudi/pull/2785/diff?src=pr&el=tree#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvY29tbW9uL2Z1bmN0aW9uL0Z1bmN0aW9uV3JhcHBlci5qYXZh) | | | |
| ... and [418 more](https://codecov.io/gh/apache/hudi/pull/2785/diff?src=pr&el=tree-more) | |
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] danny0405 closed pull request #2785: [HUDI-1775] Add option for compaction parallelism
Posted by GitBox <gi...@apache.org>.
danny0405 closed pull request #2785:
URL: https://github.com/apache/hudi/pull/2785
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] yanghua commented on pull request #2785: [HUDI-1775] Add option for compaction parallelism
Posted by GitBox <gi...@apache.org>.
yanghua commented on pull request #2785:
URL: https://github.com/apache/hudi/pull/2785#issuecomment-816369965
Will merge after the Travis turns to green.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] codecov-io edited a comment on pull request #2785: [HUDI-1775] Add option for compaction parallelism
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #2785:
URL: https://github.com/apache/hudi/pull/2785#issuecomment-815400787
# [Codecov](https://codecov.io/gh/apache/hudi/pull/2785?src=pr&el=h1) Report
> Merging [#2785](https://codecov.io/gh/apache/hudi/pull/2785?src=pr&el=desc) (a53b11e) into [master](https://codecov.io/gh/apache/hudi/commit/3a926aacf6552fc06005db4a7880a233db904330?el=desc) (3a926aa) will **increase** coverage by `0.01%`.
> The diff coverage is `94.11%`.
[](https://codecov.io/gh/apache/hudi/pull/2785?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #2785 +/- ##
============================================
+ Coverage 47.05% 47.07% +0.01%
- Complexity 3357 3359 +2
============================================
Files 484 484
Lines 23094 23107 +13
Branches 2456 2457 +1
============================================
+ Hits 10868 10878 +10
- Misses 11280 11282 +2
- Partials 946 947 +1
```
| Flag | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| hudicli | `36.94% <ø> (ø)` | `0.00 <ø> (ø)` | |
| hudiclient | `∅ <ø> (∅)` | `0.00 <ø> (ø)` | |
| hudicommon | `50.77% <ø> (-0.02%)` | `0.00 <ø> (ø)` | |
| hudiflink | `56.71% <94.11%> (+0.12%)` | `0.00 <0.00> (ø)` | |
| hudihadoopmr | `33.44% <ø> (ø)` | `0.00 <ø> (ø)` | |
| hudisparkdatasource | `71.33% <ø> (ø)` | `0.00 <ø> (ø)` | |
| hudisync | `45.47% <ø> (ø)` | `0.00 <ø> (ø)` | |
| huditimelineservice | `64.36% <ø> (ø)` | `0.00 <ø> (ø)` | |
| hudiutilities | `9.37% <ø> (ø)` | `0.00 <ø> (ø)` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/hudi/pull/2785?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [...in/java/org/apache/hudi/table/HoodieTableSink.java](https://codecov.io/gh/apache/hudi/pull/2785/diff?src=pr&el=tree#diff-aHVkaS1mbGluay9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvaHVkaS90YWJsZS9Ib29kaWVUYWJsZVNpbmsuamF2YQ==) | `11.90% <0.00%> (-0.30%)` | `2.00 <0.00> (ø)` | |
| [...va/org/apache/hudi/configuration/FlinkOptions.java](https://codecov.io/gh/apache/hudi/pull/2785/diff?src=pr&el=tree#diff-aHVkaS1mbGluay9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvaHVkaS9jb25maWd1cmF0aW9uL0ZsaW5rT3B0aW9ucy5qYXZh) | `89.42% <100.00%> (+0.35%)` | `11.00 <0.00> (ø)` | |
| [...he/hudi/sink/partitioner/BucketAssignFunction.java](https://codecov.io/gh/apache/hudi/pull/2785/diff?src=pr&el=tree#diff-aHVkaS1mbGluay9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvaHVkaS9zaW5rL3BhcnRpdGlvbmVyL0J1Y2tldEFzc2lnbkZ1bmN0aW9uLmphdmE=) | `88.00% <100.00%> (+0.32%)` | `17.00 <0.00> (+2.00)` | |
| [...e/hudi/common/table/log/HoodieLogFormatWriter.java](https://codecov.io/gh/apache/hudi/pull/2785/diff?src=pr&el=tree#diff-aHVkaS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvY29tbW9uL3RhYmxlL2xvZy9Ib29kaWVMb2dGb3JtYXRXcml0ZXIuamF2YQ==) | `78.12% <0.00%> (-1.57%)` | `26.00% <0.00%> (ø%)` | |
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] danny0405 commented on a change in pull request #2785: [HUDI-1775] Add option for compaction parallelism
Posted by GitBox <gi...@apache.org>.
danny0405 commented on a change in pull request #2785:
URL: https://github.com/apache/hudi/pull/2785#discussion_r609661804
##########
File path: hudi-flink/src/main/java/org/apache/hudi/configuration/FlinkOptions.java
##########
@@ -255,8 +264,14 @@ private FlinkOptions() {
public static final ConfigOption<Double> WRITE_BATCH_SIZE = ConfigOptions
.key("write.batch.size.MB")
.doubleType()
- .defaultValue(2D) // 2MB
- .withDescription("Batch buffer size in MB to flush data into the underneath filesystem");
+ .defaultValue(64D) // 64MB
+ .withDescription("Batch buffer size in MB to flush data into the underneath filesystem, default 64MB");
+
+ public static final ConfigOption<Integer> WRITE_LOG_BLOCK_SIZE = ConfigOptions
+ .key("write.log_block.size")
Review comment:
No, i found the unit is verbose. People should see the comment in the document if they want to use this config option.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] yanghua commented on a change in pull request #2785: [HUDI-1775] Add option for compaction parallelism
Posted by GitBox <gi...@apache.org>.
yanghua commented on a change in pull request #2785:
URL: https://github.com/apache/hudi/pull/2785#discussion_r610278459
##########
File path: hudi-flink/src/main/java/org/apache/hudi/sink/partitioner/BucketAssignFunction.java
##########
@@ -159,8 +164,11 @@ public void processElement(I value, Context ctx, Collector<O> out) throws Except
final BucketInfo bucketInfo;
final HoodieRecordLocation location;
- if (!partitionLoadState.contains(hoodieKey.getPartitionPath())) {
+ if (bootstrapIndex && !partitionLoadState.contains(hoodieKey.getPartitionPath())) {
// If the partition records are never loaded, load the records first.
+
+ // The dataset may be huge, thus the processing would block for long,
Review comment:
I did not question the necessity of this comment, just to see if it has a more suitable position. Because when I see this comment, the method is already executing. And your comment contains "disabled by default", but this method does not accept a flag. Personally, I think a better position is placed before the above if statement, where the execution switch is.
##########
File path: hudi-flink/src/main/java/org/apache/hudi/configuration/FlinkOptions.java
##########
@@ -255,8 +264,14 @@ private FlinkOptions() {
public static final ConfigOption<Double> WRITE_BATCH_SIZE = ConfigOptions
.key("write.batch.size.MB")
.doubleType()
- .defaultValue(2D) // 2MB
- .withDescription("Batch buffer size in MB to flush data into the underneath filesystem");
+ .defaultValue(64D) // 64MB
+ .withDescription("Batch buffer size in MB to flush data into the underneath filesystem, default 64MB");
+
+ public static final ConfigOption<Integer> WRITE_LOG_BLOCK_SIZE = ConfigOptions
+ .key("write.log_block.size")
Review comment:
IMO, between verbosity and following a uniform style, I think the latter is more important and allows users to feel a consistent experience.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] yanghua merged pull request #2785: [HUDI-1775] Add option for compaction parallelism
Posted by GitBox <gi...@apache.org>.
yanghua merged pull request #2785:
URL: https://github.com/apache/hudi/pull/2785
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] danny0405 commented on a change in pull request #2785: [HUDI-1775] Add option for compaction parallelism
Posted by GitBox <gi...@apache.org>.
danny0405 commented on a change in pull request #2785:
URL: https://github.com/apache/hudi/pull/2785#discussion_r609662357
##########
File path: hudi-flink/src/main/java/org/apache/hudi/sink/partitioner/BucketAssignFunction.java
##########
@@ -159,8 +164,11 @@ public void processElement(I value, Context ctx, Collector<O> out) throws Except
final BucketInfo bucketInfo;
final HoodieRecordLocation location;
- if (!partitionLoadState.contains(hoodieKey.getPartitionPath())) {
+ if (bootstrapIndex && !partitionLoadState.contains(hoodieKey.getPartitionPath())) {
// If the partition records are never loaded, load the records first.
+
+ // The dataset may be huge, thus the processing would block for long,
Review comment:
I think it is okey, for better understand the code logic.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org