You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "cshuo (via GitHub)" <gi...@apache.org> on 2025/07/09 08:22:46 UTC
[PR] [HUDI-9574] Avoid creating InternalSchemaManager for each file in Fil… [hudi]
cshuo opened a new pull request, #13535:
URL: https://github.com/apache/hudi/pull/13535
…eGroup reader based Flink Compaction
### Change Logs
Avoid creating InternalSchemaManager for each file in FileGroup reader based Flink Compaction
### Impact
Constructing InternalSchemaManager will incur meta file listing, we can reduce unnecessary cost to avoid creating InternalSchemaManager for each file.
### Risk level (write none, low medium or high below)
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 create a Jira ticket, attach the
ticket number here and 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)
- [ ] Change Logs and Impact were stated clearly
- [ ] Adequate tests were added if applicable
- [ ] CI passed
--
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] [HUDI-9574] Avoid creating InternalSchemaManager for each file in Fil… [hudi]
Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 commented on code in PR #13535:
URL: https://github.com/apache/hudi/pull/13535#discussion_r2194525465
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/table/format/FlinkReaderContextFactory.java:
##########
@@ -27,23 +27,22 @@
import org.apache.flink.table.data.RowData;
import java.util.Collections;
-import java.util.function.Supplier;
/**
* Factory for creating a Flink-specific reader context.
* This context is used specifically for table services such as compaction and clustering.
*/
public class FlinkReaderContextFactory implements ReaderContextFactory<RowData> {
private final HoodieTableMetaClient metaClient;
+ private final InternalSchemaManager internalSchemaManager;
public FlinkReaderContextFactory(HoodieTableMetaClient metaClient) {
this.metaClient = metaClient;
+ this.internalSchemaManager = InternalSchemaManager.get(metaClient.getStorageConf().unwrapAs(Configuration.class), metaClient);
}
@Override
public HoodieReaderContext<RowData> getContext() {
- Supplier<InternalSchemaManager> internalSchemaManager = () -> InternalSchemaManager.get(metaClient.getStorageConf().unwrapAs(Configuration.class), metaClient);
Review Comment:
Got it.
--
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] [HUDI-9574] Avoid creating InternalSchemaManager for each file in Fil… [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #13535:
URL: https://github.com/apache/hudi/pull/13535#issuecomment-3054758694
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "277b4e7d4f07868d399a37434bb61c9d6beec4a8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=6658",
"triggerID" : "277b4e7d4f07868d399a37434bb61c9d6beec4a8",
"triggerType" : "PUSH"
}, {
"hash" : "92831e3784db83ff9c22526da1826b49ca1a2b29",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=6661",
"triggerID" : "92831e3784db83ff9c22526da1826b49ca1a2b29",
"triggerType" : "PUSH"
}, {
"hash" : "0541f82d0092c6896cffb12a027617f0e031732b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "0541f82d0092c6896cffb12a027617f0e031732b",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 92831e3784db83ff9c22526da1826b49ca1a2b29 Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=6661)
* 0541f82d0092c6896cffb12a027617f0e031732b 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] [HUDI-9574] Avoid creating InternalSchemaManager for each file in Fil… [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #13535:
URL: https://github.com/apache/hudi/pull/13535#issuecomment-3052719973
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "277b4e7d4f07868d399a37434bb61c9d6beec4a8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=6658",
"triggerID" : "277b4e7d4f07868d399a37434bb61c9d6beec4a8",
"triggerType" : "PUSH"
}, {
"hash" : "92831e3784db83ff9c22526da1826b49ca1a2b29",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=6661",
"triggerID" : "92831e3784db83ff9c22526da1826b49ca1a2b29",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 92831e3784db83ff9c22526da1826b49ca1a2b29 Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=6661)
<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] [HUDI-9574] Avoid creating InternalSchemaManager for each file in Fil… [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #13535:
URL: https://github.com/apache/hudi/pull/13535#issuecomment-3051660388
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "277b4e7d4f07868d399a37434bb61c9d6beec4a8",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "277b4e7d4f07868d399a37434bb61c9d6beec4a8",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 277b4e7d4f07868d399a37434bb61c9d6beec4a8 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] [HUDI-9574] Avoid creating InternalSchemaManager for each file in Fil… [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #13535:
URL: https://github.com/apache/hudi/pull/13535#issuecomment-3054898893
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "277b4e7d4f07868d399a37434bb61c9d6beec4a8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=6658",
"triggerID" : "277b4e7d4f07868d399a37434bb61c9d6beec4a8",
"triggerType" : "PUSH"
}, {
"hash" : "92831e3784db83ff9c22526da1826b49ca1a2b29",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=6661",
"triggerID" : "92831e3784db83ff9c22526da1826b49ca1a2b29",
"triggerType" : "PUSH"
}, {
"hash" : "0541f82d0092c6896cffb12a027617f0e031732b",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=6663",
"triggerID" : "0541f82d0092c6896cffb12a027617f0e031732b",
"triggerType" : "PUSH"
}, {
"hash" : "a692234ac217fc89a719e753d1228f30992dcd23",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "a692234ac217fc89a719e753d1228f30992dcd23",
"triggerType" : "PUSH"
}, {
"hash" : "ed8d32a7e2efe5eda009efda8ca41470821ccea6",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "ed8d32a7e2efe5eda009efda8ca41470821ccea6",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 0541f82d0092c6896cffb12a027617f0e031732b Azure: [CANCELED](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=6663)
* a692234ac217fc89a719e753d1228f30992dcd23 UNKNOWN
* ed8d32a7e2efe5eda009efda8ca41470821ccea6 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] [HUDI-9574] Avoid creating InternalSchemaManager for each file in Fil… [hudi]
Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 merged PR #13535:
URL: https://github.com/apache/hudi/pull/13535
--
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] [HUDI-9574] Avoid creating InternalSchemaManager for each file in Fil… [hudi]
Posted by "cshuo (via GitHub)" <gi...@apache.org>.
cshuo commented on code in PR #13535:
URL: https://github.com/apache/hudi/pull/13535#discussion_r2194499066
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/table/format/FlinkReaderContextFactory.java:
##########
@@ -27,23 +27,22 @@
import org.apache.flink.table.data.RowData;
import java.util.Collections;
-import java.util.function.Supplier;
/**
* Factory for creating a Flink-specific reader context.
* This context is used specifically for table services such as compaction and clustering.
*/
public class FlinkReaderContextFactory implements ReaderContextFactory<RowData> {
private final HoodieTableMetaClient metaClient;
+ private final InternalSchemaManager internalSchemaManager;
public FlinkReaderContextFactory(HoodieTableMetaClient metaClient) {
this.metaClient = metaClient;
+ this.internalSchemaManager = InternalSchemaManager.get(metaClient.getStorageConf().unwrapAs(Configuration.class), metaClient);
}
@Override
public HoodieReaderContext<RowData> getContext() {
- Supplier<InternalSchemaManager> internalSchemaManager = () -> InternalSchemaManager.get(metaClient.getStorageConf().unwrapAs(Configuration.class), metaClient);
Review Comment:
`FlinkReaderContextFactory#getContext` is called to create reader context perf FileSlice during clustering or compaction. If `internalSchemaManager` is instantiated in `getContext`, meta files will be listed for each file slice reading.
--
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] [HUDI-9574] Avoid creating InternalSchemaManager for each file in Fil… [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #13535:
URL: https://github.com/apache/hudi/pull/13535#issuecomment-3051845918
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "277b4e7d4f07868d399a37434bb61c9d6beec4a8",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=6658",
"triggerID" : "277b4e7d4f07868d399a37434bb61c9d6beec4a8",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 277b4e7d4f07868d399a37434bb61c9d6beec4a8 Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=6658)
<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] [HUDI-9574] Avoid creating InternalSchemaManager for each file in Fil… [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #13535:
URL: https://github.com/apache/hudi/pull/13535#issuecomment-3051666212
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "277b4e7d4f07868d399a37434bb61c9d6beec4a8",
"status" : "PENDING",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=6658",
"triggerID" : "277b4e7d4f07868d399a37434bb61c9d6beec4a8",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 277b4e7d4f07868d399a37434bb61c9d6beec4a8 Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=6658)
<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] [HUDI-9574] Avoid creating InternalSchemaManager for each file in Fil… [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #13535:
URL: https://github.com/apache/hudi/pull/13535#issuecomment-3052494629
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "277b4e7d4f07868d399a37434bb61c9d6beec4a8",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=6658",
"triggerID" : "277b4e7d4f07868d399a37434bb61c9d6beec4a8",
"triggerType" : "PUSH"
}, {
"hash" : "92831e3784db83ff9c22526da1826b49ca1a2b29",
"status" : "PENDING",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=6661",
"triggerID" : "92831e3784db83ff9c22526da1826b49ca1a2b29",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 277b4e7d4f07868d399a37434bb61c9d6beec4a8 Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=6658)
* 92831e3784db83ff9c22526da1826b49ca1a2b29 Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=6661)
<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] [HUDI-9574] Avoid creating InternalSchemaManager for each file in Fil… [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #13535:
URL: https://github.com/apache/hudi/pull/13535#issuecomment-3055203257
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "277b4e7d4f07868d399a37434bb61c9d6beec4a8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=6658",
"triggerID" : "277b4e7d4f07868d399a37434bb61c9d6beec4a8",
"triggerType" : "PUSH"
}, {
"hash" : "92831e3784db83ff9c22526da1826b49ca1a2b29",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=6661",
"triggerID" : "92831e3784db83ff9c22526da1826b49ca1a2b29",
"triggerType" : "PUSH"
}, {
"hash" : "0541f82d0092c6896cffb12a027617f0e031732b",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=6663",
"triggerID" : "0541f82d0092c6896cffb12a027617f0e031732b",
"triggerType" : "PUSH"
}, {
"hash" : "a692234ac217fc89a719e753d1228f30992dcd23",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "a692234ac217fc89a719e753d1228f30992dcd23",
"triggerType" : "PUSH"
}, {
"hash" : "ed8d32a7e2efe5eda009efda8ca41470821ccea6",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=6665",
"triggerID" : "ed8d32a7e2efe5eda009efda8ca41470821ccea6",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* a692234ac217fc89a719e753d1228f30992dcd23 UNKNOWN
* ed8d32a7e2efe5eda009efda8ca41470821ccea6 Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=6665)
<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] [HUDI-9574] Avoid creating InternalSchemaManager for each file in Fil… [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #13535:
URL: https://github.com/apache/hudi/pull/13535#issuecomment-3055012575
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "277b4e7d4f07868d399a37434bb61c9d6beec4a8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=6658",
"triggerID" : "277b4e7d4f07868d399a37434bb61c9d6beec4a8",
"triggerType" : "PUSH"
}, {
"hash" : "92831e3784db83ff9c22526da1826b49ca1a2b29",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=6661",
"triggerID" : "92831e3784db83ff9c22526da1826b49ca1a2b29",
"triggerType" : "PUSH"
}, {
"hash" : "0541f82d0092c6896cffb12a027617f0e031732b",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=6663",
"triggerID" : "0541f82d0092c6896cffb12a027617f0e031732b",
"triggerType" : "PUSH"
}, {
"hash" : "a692234ac217fc89a719e753d1228f30992dcd23",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "a692234ac217fc89a719e753d1228f30992dcd23",
"triggerType" : "PUSH"
}, {
"hash" : "ed8d32a7e2efe5eda009efda8ca41470821ccea6",
"status" : "PENDING",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=6665",
"triggerID" : "ed8d32a7e2efe5eda009efda8ca41470821ccea6",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 0541f82d0092c6896cffb12a027617f0e031732b Azure: [CANCELED](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=6663)
* a692234ac217fc89a719e753d1228f30992dcd23 UNKNOWN
* ed8d32a7e2efe5eda009efda8ca41470821ccea6 Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=6665)
<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] [HUDI-9574] Avoid creating InternalSchemaManager for each file in Fil… [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #13535:
URL: https://github.com/apache/hudi/pull/13535#issuecomment-3054820325
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "277b4e7d4f07868d399a37434bb61c9d6beec4a8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=6658",
"triggerID" : "277b4e7d4f07868d399a37434bb61c9d6beec4a8",
"triggerType" : "PUSH"
}, {
"hash" : "92831e3784db83ff9c22526da1826b49ca1a2b29",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=6661",
"triggerID" : "92831e3784db83ff9c22526da1826b49ca1a2b29",
"triggerType" : "PUSH"
}, {
"hash" : "0541f82d0092c6896cffb12a027617f0e031732b",
"status" : "PENDING",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=6663",
"triggerID" : "0541f82d0092c6896cffb12a027617f0e031732b",
"triggerType" : "PUSH"
}, {
"hash" : "a692234ac217fc89a719e753d1228f30992dcd23",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "a692234ac217fc89a719e753d1228f30992dcd23",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 92831e3784db83ff9c22526da1826b49ca1a2b29 Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=6661)
* 0541f82d0092c6896cffb12a027617f0e031732b Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=6663)
* a692234ac217fc89a719e753d1228f30992dcd23 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] [HUDI-9574] Avoid creating InternalSchemaManager for each file in Fil… [hudi]
Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 commented on code in PR #13535:
URL: https://github.com/apache/hudi/pull/13535#discussion_r2194937434
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/compact/CompactOperator.java:
##########
@@ -168,28 +187,28 @@ private void doCompaction(String instantTime,
compactionOperation,
instantTime,
flinkTable.getTaskContextSupplier(),
- readerContextOpt,
+ createReaderContext(writeClient, needReloadMetaClient),
flinkTable);
compactionMetrics.endCompaction();
collector.collect(new CompactionCommitEvent(instantTime, compactionOperation.getFileId(), writeStatuses, taskID));
}
- private Option<HoodieReaderContext<?>> initReaderContext(HoodieFlinkWriteClient<?> writeClient) {
- HoodieTableMetaClient metaClient = flinkTable.getMetaClient();
- boolean useFileGroupReaderBasedCompaction = !metaClient.isMetadataTable()
- && writeClient.getConfig().getBooleanOrDefault(HoodieReaderConfig.FILE_GROUP_READER_ENABLED)
- && writeClient.getConfig().populateMetaFields() // Virtual key support by fg reader is not ready
- && !(metaClient.getTableConfig().isCDCEnabled() && writeClient.getConfig().isYieldingPureLogForMor()); // do not support produce cdc log during fg reader
+ private Option<HoodieReaderContext<?>> createReaderContext(HoodieFlinkWriteClient<?> writeClient, boolean needReloadMetaClient) {
if (useFileGroupReaderBasedCompaction) {
- // CAUTION: reuse the meta client so that the timeline is updated
- Supplier<InternalSchemaManager> internalSchemaManager = () -> InternalSchemaManager.get(conf, metaClient);
+ HoodieTableMetaClient metaClient = flinkTable.getMetaClient();
// initialize storage conf lazily.
StorageConfiguration<?> readerConf = writeClient.getEngineContext().getStorageConf();
- return Option.of(new FlinkRowDataReaderContext(readerConf, internalSchemaManager, Collections.emptyList(), metaClient.getTableConfig(), Option.empty()));
- } else {
- // always using avro record merger for legacy compaction since log scanner do not support rowdata reading yet.
- writeClient.getConfig().setRecordMergerClass(HoodieAvroRecordMerger.class.getName());
+ return Option.of(new FlinkRowDataReaderContext(
+ readerConf, () -> {
+ // CAUTION: InternalSchemaManager will scan timeline, reusing the meta client so that the timeline is updated.
+ if (internalSchemaManager == null || needReloadMetaClient) {
+ internalSchemaManager = InternalSchemaManager.get(conf, metaClient);
+ }
Review Comment:
Supplier usually does not have side-effect.
--
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] [HUDI-9574] Avoid creating InternalSchemaManager for each file in Fil… [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #13535:
URL: https://github.com/apache/hudi/pull/13535#issuecomment-3054828632
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "277b4e7d4f07868d399a37434bb61c9d6beec4a8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=6658",
"triggerID" : "277b4e7d4f07868d399a37434bb61c9d6beec4a8",
"triggerType" : "PUSH"
}, {
"hash" : "92831e3784db83ff9c22526da1826b49ca1a2b29",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=6661",
"triggerID" : "92831e3784db83ff9c22526da1826b49ca1a2b29",
"triggerType" : "PUSH"
}, {
"hash" : "0541f82d0092c6896cffb12a027617f0e031732b",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=6663",
"triggerID" : "0541f82d0092c6896cffb12a027617f0e031732b",
"triggerType" : "PUSH"
}, {
"hash" : "a692234ac217fc89a719e753d1228f30992dcd23",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "a692234ac217fc89a719e753d1228f30992dcd23",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 0541f82d0092c6896cffb12a027617f0e031732b Azure: [CANCELED](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=6663)
* a692234ac217fc89a719e753d1228f30992dcd23 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] [HUDI-9574] Avoid creating InternalSchemaManager for each file in Fil… [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #13535:
URL: https://github.com/apache/hudi/pull/13535#issuecomment-3054780056
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "277b4e7d4f07868d399a37434bb61c9d6beec4a8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=6658",
"triggerID" : "277b4e7d4f07868d399a37434bb61c9d6beec4a8",
"triggerType" : "PUSH"
}, {
"hash" : "92831e3784db83ff9c22526da1826b49ca1a2b29",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=6661",
"triggerID" : "92831e3784db83ff9c22526da1826b49ca1a2b29",
"triggerType" : "PUSH"
}, {
"hash" : "0541f82d0092c6896cffb12a027617f0e031732b",
"status" : "PENDING",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=6663",
"triggerID" : "0541f82d0092c6896cffb12a027617f0e031732b",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 92831e3784db83ff9c22526da1826b49ca1a2b29 Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=6661)
* 0541f82d0092c6896cffb12a027617f0e031732b Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=6663)
<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] [HUDI-9574] Avoid creating InternalSchemaManager for each file in Fil… [hudi]
Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 commented on code in PR #13535:
URL: https://github.com/apache/hudi/pull/13535#discussion_r2194432599
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/table/format/FlinkReaderContextFactory.java:
##########
@@ -27,23 +27,22 @@
import org.apache.flink.table.data.RowData;
import java.util.Collections;
-import java.util.function.Supplier;
/**
* Factory for creating a Flink-specific reader context.
* This context is used specifically for table services such as compaction and clustering.
*/
public class FlinkReaderContextFactory implements ReaderContextFactory<RowData> {
private final HoodieTableMetaClient metaClient;
+ private final InternalSchemaManager internalSchemaManager;
public FlinkReaderContextFactory(HoodieTableMetaClient metaClient) {
this.metaClient = metaClient;
+ this.internalSchemaManager = InternalSchemaManager.get(metaClient.getStorageConf().unwrapAs(Configuration.class), metaClient);
}
@Override
public HoodieReaderContext<RowData> getContext() {
- Supplier<InternalSchemaManager> internalSchemaManager = () -> InternalSchemaManager.get(metaClient.getStorageConf().unwrapAs(Configuration.class), metaClient);
Review Comment:
Can `internalSchemaManager` still be a local variable?
--
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] [HUDI-9574] Avoid creating InternalSchemaManager for each file in Fil… [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #13535:
URL: https://github.com/apache/hudi/pull/13535#issuecomment-3052489313
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "277b4e7d4f07868d399a37434bb61c9d6beec4a8",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=6658",
"triggerID" : "277b4e7d4f07868d399a37434bb61c9d6beec4a8",
"triggerType" : "PUSH"
}, {
"hash" : "92831e3784db83ff9c22526da1826b49ca1a2b29",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "92831e3784db83ff9c22526da1826b49ca1a2b29",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 277b4e7d4f07868d399a37434bb61c9d6beec4a8 Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=6658)
* 92831e3784db83ff9c22526da1826b49ca1a2b29 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