You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "AshinGau (via GitHub)" <gi...@apache.org> on 2023/07/17 06:50:07 UTC
[GitHub] [doris] AshinGau opened a new pull request, #21871: [opt](hudi) get hudi split concurrently by using parallelStream
AshinGau opened a new pull request, #21871:
URL: https://github.com/apache/doris/pull/21871
## Proposed changes
Issue Number: close #xxx
<!--Describe your changes.-->
## Further comments
If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
--
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.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] hello-stephen commented on pull request #21871: [opt](hudi) get hudi split concurrently by using parallelStream
Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #21871:
URL: https://github.com/apache/doris/pull/21871#issuecomment-1639377536
(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 50.59 seconds
stream load tsv: 539 seconds loaded 74807831229 Bytes, about 132 MB/s
stream load json: 19 seconds loaded 2358488459 Bytes, about 118 MB/s
stream load orc: 65 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 31 seconds loaded 861443392 Bytes, about 26 MB/s
insert into select: 28.7 seconds inserted 10000000 Rows, about 348K ops/s
storage size: 17164718446 Bytes
--
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.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #21871: [opt](hudi) get hudi split concurrently by using parallelStream
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #21871:
URL: https://github.com/apache/doris/pull/21871#issuecomment-1639133359
PR approved by anyone and no changes requested.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] hello-stephen commented on pull request #21871: [opt](hudi) get hudi split concurrently by using parallelStream
Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #21871:
URL: https://github.com/apache/doris/pull/21871#issuecomment-1638030618
(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 54.53 seconds
stream load tsv: 514 seconds loaded 74807831229 Bytes, about 138 MB/s
stream load json: 20 seconds loaded 2358488459 Bytes, about 112 MB/s
stream load orc: 65 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 33 seconds loaded 861443392 Bytes, about 24 MB/s
insert into select: 30.8 seconds inserted 10000000 Rows, about 324K ops/s
storage size: 17162254156 Bytes
--
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.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] AshinGau commented on pull request #21871: [opt](hudi) get hudi split concurrently by using parallelStream
Posted by "AshinGau (via GitHub)" <gi...@apache.org>.
AshinGau commented on PR #21871:
URL: https://github.com/apache/doris/pull/21871#issuecomment-1637974196
run buildall
--
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.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] AshinGau commented on a diff in pull request #21871: [opt](hudi) get hudi split concurrently by using parallelStream
Posted by "AshinGau (via GitHub)" <gi...@apache.org>.
AshinGau commented on code in PR #21871:
URL: https://github.com/apache/doris/pull/21871#discussion_r1266165092
##########
fe/fe-core/src/main/java/org/apache/doris/planner/external/hudi/HudiScanNode.java:
##########
@@ -247,78 +257,76 @@ public List<Split> getSplits() throws UserException {
if (ugi != null) {
try {
partitions = ugi.doAs(
- (PrivilegedExceptionAction<List<HivePartition>>) () -> getPrunedPartitions(hudiClient));
+ (PrivilegedExceptionAction<List<HivePartition>>) () -> getPrunedPartitions(hudiClient,
+ snapshotTimestamp));
} catch (Exception e) {
throw new UserException(e);
}
} else {
- partitions = getPrunedPartitions(hudiClient);
+ partitions = getPrunedPartitions(hudiClient, snapshotTimestamp);
}
- try {
- for (HivePartition partition : partitions) {
- String globPath;
- String partitionName = "";
- if (partition.isDummyPartition()) {
- globPath = hudiClient.getBasePathV2().toString() + "/*";
- } else {
- partitionName = FSUtils.getRelativePartitionPath(hudiClient.getBasePathV2(),
- new Path(partition.getPath()));
- globPath = String.format("%s/%s/*", hudiClient.getBasePathV2().toString(), partitionName);
- }
- List<FileStatus> statuses = FSUtils.getGlobStatusExcludingMetaFolder(hudiClient.getRawFs(),
+ return partitions.parallelStream().flatMap(partition -> {
Review Comment:
Done
##########
fe/fe-core/src/main/java/org/apache/doris/planner/external/hudi/HudiCachedPartitionProcessor.java:
##########
@@ -74,6 +73,31 @@ public void cleanTablePartitions(String dbName, String tblName) {
.forEach(partitionCache::invalidate);
}
+ public TablePartitionValues getSnapshotPartitionValues(HMSExternalTable table,
+ HoodieTableMetaClient tableMetaClient, String timestamp) {
+ assert (catalogId == table.getCatalog().getId());
Review Comment:
Done
--
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.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #21871: [opt](hudi) get hudi split concurrently by using parallelStream
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #21871:
URL: https://github.com/apache/doris/pull/21871#issuecomment-1639487251
PR approved by at least one committer and no changes requested.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] AshinGau commented on pull request #21871: [opt](hudi) get hudi split concurrently by using parallelStream
Posted by "AshinGau (via GitHub)" <gi...@apache.org>.
AshinGau commented on PR #21871:
URL: https://github.com/apache/doris/pull/21871#issuecomment-1639314004
run buildall
--
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.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] morningman merged pull request #21871: [opt](hudi) get hudi split concurrently by using parallelStream
Posted by "morningman (via GitHub)" <gi...@apache.org>.
morningman merged PR #21871:
URL: https://github.com/apache/doris/pull/21871
--
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.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] morningman commented on a diff in pull request #21871: [opt](hudi) get hudi split concurrently by using parallelStream
Posted by "morningman (via GitHub)" <gi...@apache.org>.
morningman commented on code in PR #21871:
URL: https://github.com/apache/doris/pull/21871#discussion_r1265510058
##########
fe/fe-core/src/main/java/org/apache/doris/planner/external/hudi/HudiScanNode.java:
##########
@@ -247,78 +257,76 @@ public List<Split> getSplits() throws UserException {
if (ugi != null) {
try {
partitions = ugi.doAs(
- (PrivilegedExceptionAction<List<HivePartition>>) () -> getPrunedPartitions(hudiClient));
+ (PrivilegedExceptionAction<List<HivePartition>>) () -> getPrunedPartitions(hudiClient,
+ snapshotTimestamp));
} catch (Exception e) {
throw new UserException(e);
}
} else {
- partitions = getPrunedPartitions(hudiClient);
+ partitions = getPrunedPartitions(hudiClient, snapshotTimestamp);
}
- try {
- for (HivePartition partition : partitions) {
- String globPath;
- String partitionName = "";
- if (partition.isDummyPartition()) {
- globPath = hudiClient.getBasePathV2().toString() + "/*";
- } else {
- partitionName = FSUtils.getRelativePartitionPath(hudiClient.getBasePathV2(),
- new Path(partition.getPath()));
- globPath = String.format("%s/%s/*", hudiClient.getBasePathV2().toString(), partitionName);
- }
- List<FileStatus> statuses = FSUtils.getGlobStatusExcludingMetaFolder(hudiClient.getRawFs(),
+ return partitions.parallelStream().flatMap(partition -> {
Review Comment:
Better use a specified thread pool to do this, or it will use global ForkedJoinPool, which may be effected by other process.
How about use executor in ExternalMetaCacheMgr?
##########
fe/fe-core/src/main/java/org/apache/doris/planner/external/hudi/HudiCachedPartitionProcessor.java:
##########
@@ -74,6 +73,31 @@ public void cleanTablePartitions(String dbName, String tblName) {
.forEach(partitionCache::invalidate);
}
+ public TablePartitionValues getSnapshotPartitionValues(HMSExternalTable table,
+ HoodieTableMetaClient tableMetaClient, String timestamp) {
+ assert (catalogId == table.getCatalog().getId());
Review Comment:
Prefer to use `Preconditions.checkState()`
--
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.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org