You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "the-other-tim-brown (via GitHub)" <gi...@apache.org> on 2025/10/13 17:54:28 UTC
[PR] perf(ingest): Improve perf for checking if file exists for S3 and GCS Streamer Sources [hudi]
the-other-tim-brown opened a new pull request, #14082:
URL: https://github.com/apache/hudi/pull/14082
### Describe the issue this Pull Request addresses
<!-- Either describe the issue inline here with motivation behind the changes
(or) link to an issue by including `Closes #<issue-number>` for context.
If this PR includes changes to the storage format, public APIs,
or has breaking changes, use `!` (e.g., feat!: ...) -->
In the GCS and S3 sources, there is an option to check if the file exists before trying to read it. In practice this check can happen on a single thread and it causes a bottleneck. We can delegate this check to Spark instead.
### Summary and Changelog
<!-- Short, plain-English summary of what users gain or what changed in behavior.
Followed by a detailed log of all the changes. Highlight if any code was copied. -->
Updates the file existence check to instead delegate to Spark
### Impact
<!-- Describe any public API or user-facing feature change or any performance impact. -->
Improves performance when `checkIfFileExists` is true for the S3 and GCS Sources
### Risk Level
<!-- Accepted values: none, low, medium or high. Other than `none`, explain the risk.
If medium or high, explain what verification was done to mitigate the risks. -->
Low
### Documentation Update
<!-- Describe any necessary documentation update if there is any new feature, config, or user-facing change. If not, put "none".
- The config description must be updated if new configs are added or the default value of the configs are changed.
- Any new feature or user-facing change requires updating the Hudi website. Please follow the
[instruction](https://hudi.apache.org/contribute/developer-setup#website) to make changes to the website. -->
### Contributor's checklist
- [ ] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute)
- [ ] Enough context is provided in the sections above
- [ ] Adequate tests were added if applicable
--
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@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] perf(ingest): Improve perf for checking if file exists for S3 and GCS Streamer Sources [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #14082:
URL: https://github.com/apache/hudi/pull/14082#issuecomment-3398528704
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "bfb2a42311960f4d37329b7f86e4d34107a839d4",
"status" : "PENDING",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9134",
"triggerID" : "bfb2a42311960f4d37329b7f86e4d34107a839d4",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* bfb2a42311960f4d37329b7f86e4d34107a839d4 Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9134)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
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@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] perf(ingest): Improve perf for checking if file exists for S3 and GCS Streamer Sources [hudi]
Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 commented on code in PR #14082:
URL: https://github.com/apache/hudi/pull/14082#discussion_r2427756097
##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/sources/helpers/CloudObjectsSelectorCommon.java:
##########
@@ -282,7 +257,7 @@ public Option<Dataset<Row>> loadAsDataset(SparkSession spark, List<CloudObjectMe
if (isNullOrEmpty(cloudObjectMetadata)) {
return Option.empty();
}
- DataFrameReader reader = spark.read().format(fileFormat);
+ DataFrameReader reader = spark.read().format(fileFormat).option("ignoreMissingFiles", Boolean.toString(checkIfExists));
Review Comment:
is the option key `ignoreMissingFiles` buliltin for Spark data source?
--
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@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] perf(ingest): Improve perf for checking if file exists for S3 and GCS Streamer Sources [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #14082:
URL: https://github.com/apache/hudi/pull/14082#issuecomment-3398525294
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "bfb2a42311960f4d37329b7f86e4d34107a839d4",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "bfb2a42311960f4d37329b7f86e4d34107a839d4",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* bfb2a42311960f4d37329b7f86e4d34107a839d4 UNKNOWN
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
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@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] perf(ingest): Improve perf for checking if file exists for S3 and GCS Streamer Sources [hudi]
Posted by "the-other-tim-brown (via GitHub)" <gi...@apache.org>.
the-other-tim-brown closed pull request #14082: perf(ingest): Improve perf for checking if file exists for S3 and GCS Streamer Sources
URL: https://github.com/apache/hudi/pull/14082
--
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@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] perf(ingest): Improve perf for checking if file exists for S3 and GCS Streamer Sources [hudi]
Posted by "the-other-tim-brown (via GitHub)" <gi...@apache.org>.
the-other-tim-brown commented on code in PR #14082:
URL: https://github.com/apache/hudi/pull/14082#discussion_r2430010557
##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/sources/helpers/CloudObjectsSelectorCommon.java:
##########
@@ -282,7 +257,7 @@ public Option<Dataset<Row>> loadAsDataset(SparkSession spark, List<CloudObjectMe
if (isNullOrEmpty(cloudObjectMetadata)) {
return Option.empty();
}
- DataFrameReader reader = spark.read().format(fileFormat);
+ DataFrameReader reader = spark.read().format(fileFormat).option("ignoreMissingFiles", Boolean.toString(checkIfExists));
Review Comment:
Yes, it was added in Spark 3. It looks like it is not implemented for all the file types though so I will need to find another way to avoid the bottleneck
--
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@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] perf(ingest): Improve perf for checking if file exists for S3 and GCS Streamer Sources [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #14082:
URL: https://github.com/apache/hudi/pull/14082#issuecomment-3398787285
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "bfb2a42311960f4d37329b7f86e4d34107a839d4",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9134",
"triggerID" : "bfb2a42311960f4d37329b7f86e4d34107a839d4",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* bfb2a42311960f4d37329b7f86e4d34107a839d4 Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9134)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
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@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org