You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "HuangZhenQiu (via GitHub)" <gi...@apache.org> on 2026/01/28 17:43:27 UTC
[PR] feat: enable new Hoodie source in HoodieTableSource [hudi]
HuangZhenQiu opened a new pull request, #18022:
URL: https://github.com/apache/hudi/pull/18022
### Describe the issue this Pull Request addresses
Enable the new hoodie source in HoodieTableSource with a Flink flag.
### Summary and Changelog
1. Added the new Hoodie source creation in HoodieTableSource
2. Added test cases for code coverage
### Impact
none
### Risk Level
none
### Documentation Update
none
### 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] feat: enable new Hoodie source in HoodieTableSource [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #18022:
URL: https://github.com/apache/hudi/pull/18022#issuecomment-3821395265
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "e224a910d9578fcfe16962df532f6324fa6bc7e5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11446",
"triggerID" : "e224a910d9578fcfe16962df532f6324fa6bc7e5",
"triggerType" : "PUSH"
}, {
"hash" : "f0848719a25e24ab52f3a6b456696e0f58138aef",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11447",
"triggerID" : "f0848719a25e24ab52f3a6b456696e0f58138aef",
"triggerType" : "PUSH"
}, {
"hash" : "a58b200f1bd4156ac7e92dccbfb800df3b263c60",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11455",
"triggerID" : "a58b200f1bd4156ac7e92dccbfb800df3b263c60",
"triggerType" : "PUSH"
}, {
"hash" : "46ce30f6ab523fa2df0045091bf0fc45393a23bf",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11479",
"triggerID" : "46ce30f6ab523fa2df0045091bf0fc45393a23bf",
"triggerType" : "PUSH"
}, {
"hash" : "44882f3346e4361ab9b5aa04d31f43b8a7e1a223",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11486",
"triggerID" : "44882f3346e4361ab9b5aa04d31f43b8a7e1a223",
"triggerType" : "PUSH"
}, {
"hash" : "8119132f42784901c19c81839c7c7878ee8600ca",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11522",
"triggerID" : "8119132f42784901c19c81839c7c7878ee8600ca",
"triggerType" : "PUSH"
}, {
"hash" : "ff004b3ffec752c9fd54af6751d4cf7eeb4ce1bc",
"status" : "PENDING",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11527",
"triggerID" : "ff004b3ffec752c9fd54af6751d4cf7eeb4ce1bc",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 8119132f42784901c19c81839c7c7878ee8600ca Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11522)
* ff004b3ffec752c9fd54af6751d4cf7eeb4ce1bc Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11527)
<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] feat: enable new Hoodie source in HoodieTableSource [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #18022:
URL: https://github.com/apache/hudi/pull/18022#issuecomment-3814018186
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "e224a910d9578fcfe16962df532f6324fa6bc7e5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11446",
"triggerID" : "e224a910d9578fcfe16962df532f6324fa6bc7e5",
"triggerType" : "PUSH"
}, {
"hash" : "f0848719a25e24ab52f3a6b456696e0f58138aef",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11447",
"triggerID" : "f0848719a25e24ab52f3a6b456696e0f58138aef",
"triggerType" : "PUSH"
}, {
"hash" : "a58b200f1bd4156ac7e92dccbfb800df3b263c60",
"status" : "PENDING",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11455",
"triggerID" : "a58b200f1bd4156ac7e92dccbfb800df3b263c60",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* f0848719a25e24ab52f3a6b456696e0f58138aef Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11447)
* a58b200f1bd4156ac7e92dccbfb800df3b263c60 Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11455)
<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] feat: enable new Hoodie source in HoodieTableSource [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #18022:
URL: https://github.com/apache/hudi/pull/18022#issuecomment-3814302937
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "e224a910d9578fcfe16962df532f6324fa6bc7e5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11446",
"triggerID" : "e224a910d9578fcfe16962df532f6324fa6bc7e5",
"triggerType" : "PUSH"
}, {
"hash" : "f0848719a25e24ab52f3a6b456696e0f58138aef",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11447",
"triggerID" : "f0848719a25e24ab52f3a6b456696e0f58138aef",
"triggerType" : "PUSH"
}, {
"hash" : "a58b200f1bd4156ac7e92dccbfb800df3b263c60",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11455",
"triggerID" : "a58b200f1bd4156ac7e92dccbfb800df3b263c60",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* a58b200f1bd4156ac7e92dccbfb800df3b263c60 Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11455)
<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] feat: enable new Hoodie source in HoodieTableSource [hudi]
Posted by "HuangZhenQiu (via GitHub)" <gi...@apache.org>.
HuangZhenQiu commented on code in PR #18022:
URL: https://github.com/apache/hudi/pull/18022#discussion_r2744054901
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/configuration/FlinkOptions.java:
##########
@@ -440,6 +440,12 @@ public class FlinkOptions extends HoodieConfig {
+ "the avg read splits number per-second would be 'read.splits.limit'/'read.streaming.check-interval', by "
+ "default no limit");
+ public static final ConfigOption<Boolean> READ_NEW_SOURCE_ENABLED = ConfigOptions
+ .key("read.new-source.enabled")
+ .booleanType()
+ .defaultValue(false)
+ .withDescription("Whether to use Flink FLIP27 new source to consume data files.");
Review Comment:
Flink Improvement Proposals (FLIPs) that led to the development and implementation of the new Source API (also known as the "Source V2" or FLIP-27 API) in Apache Flink. how about use read.source-v2.enabled?
--
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] feat: enable new Hoodie source in HoodieTableSource [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #18022:
URL: https://github.com/apache/hudi/pull/18022#issuecomment-3813238144
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "e224a910d9578fcfe16962df532f6324fa6bc7e5",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11446",
"triggerID" : "e224a910d9578fcfe16962df532f6324fa6bc7e5",
"triggerType" : "PUSH"
}, {
"hash" : "f0848719a25e24ab52f3a6b456696e0f58138aef",
"status" : "PENDING",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11447",
"triggerID" : "f0848719a25e24ab52f3a6b456696e0f58138aef",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* e224a910d9578fcfe16962df532f6324fa6bc7e5 Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11446)
* f0848719a25e24ab52f3a6b456696e0f58138aef Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11447)
<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] feat: enable new Hoodie source in HoodieTableSource [hudi]
Posted by "HuangZhenQiu (via GitHub)" <gi...@apache.org>.
HuangZhenQiu commented on code in PR #18022:
URL: https://github.com/apache/hudi/pull/18022#discussion_r2744152754
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/source/HoodieSource.java:
##########
@@ -55,20 +55,25 @@
import java.util.stream.Collectors;
/**
- * Hoodie Source implementation.
- * @param <T> record Type
+ * Hoodie FLIP-27 Source implementation for Flink streaming and batch reads.
Review Comment:
Make sense. How about Hudi Flink Source V2 implementation?
--
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] feat: enable new Hoodie source in HoodieTableSource [hudi]
Posted by "xushiyan (via GitHub)" <gi...@apache.org>.
xushiyan commented on code in PR #18022:
URL: https://github.com/apache/hudi/pull/18022#discussion_r2744069343
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/source/HoodieSource.java:
##########
@@ -55,20 +55,25 @@
import java.util.stream.Collectors;
/**
- * Hoodie Source implementation.
- * @param <T> record Type
+ * Hoodie FLIP-27 Source implementation for Flink streaming and batch reads.
Review Comment:
```suggestion
* Hudi FLIP-27 Source implementation for Flink streaming and batch reads.
```
Pls keep in mind `Hoodie` is only for class name prefix, in proper text, don't call it Hoodie, it's just Hudi
--
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] feat: enable new Hoodie source in HoodieTableSource [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #18022:
URL: https://github.com/apache/hudi/pull/18022#issuecomment-3815387013
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "e224a910d9578fcfe16962df532f6324fa6bc7e5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11446",
"triggerID" : "e224a910d9578fcfe16962df532f6324fa6bc7e5",
"triggerType" : "PUSH"
}, {
"hash" : "f0848719a25e24ab52f3a6b456696e0f58138aef",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11447",
"triggerID" : "f0848719a25e24ab52f3a6b456696e0f58138aef",
"triggerType" : "PUSH"
}, {
"hash" : "a58b200f1bd4156ac7e92dccbfb800df3b263c60",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11455",
"triggerID" : "a58b200f1bd4156ac7e92dccbfb800df3b263c60",
"triggerType" : "PUSH"
}, {
"hash" : "46ce30f6ab523fa2df0045091bf0fc45393a23bf",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11479",
"triggerID" : "46ce30f6ab523fa2df0045091bf0fc45393a23bf",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 46ce30f6ab523fa2df0045091bf0fc45393a23bf Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11479)
<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] feat: enable new Hoodie source in HoodieTableSource [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #18022:
URL: https://github.com/apache/hudi/pull/18022#issuecomment-3812903430
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "e224a910d9578fcfe16962df532f6324fa6bc7e5",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11446",
"triggerID" : "e224a910d9578fcfe16962df532f6324fa6bc7e5",
"triggerType" : "PUSH"
}, {
"hash" : "f0848719a25e24ab52f3a6b456696e0f58138aef",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "f0848719a25e24ab52f3a6b456696e0f58138aef",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* e224a910d9578fcfe16962df532f6324fa6bc7e5 Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11446)
* f0848719a25e24ab52f3a6b456696e0f58138aef 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] feat: enable new Hoodie source in HoodieTableSource [hudi]
Posted by "xushiyan (via GitHub)" <gi...@apache.org>.
xushiyan commented on code in PR #18022:
URL: https://github.com/apache/hudi/pull/18022#discussion_r2744151601
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/table/HoodieTableSource.java:
##########
@@ -221,32 +231,117 @@ public DataStream<RowData> produceDataStream(StreamExecutionEnvironment execEnv)
TypeInformation<RowData> typeInfo =
(TypeInformation<RowData>) TypeInfoDataTypeConverter.fromDataTypeToTypeInfo(getProducedDataType());
OptionsInference.setupSourceTasks(conf, execEnv.getParallelism());
- if (conf.get(FlinkOptions.READ_AS_STREAMING)) {
- StreamReadMonitoringFunction monitoringFunction = new StreamReadMonitoringFunction(
- conf, FilePathUtils.toFlinkPath(path), tableRowType, maxCompactionMemoryInBytes, partitionPruner);
- InputFormat<RowData, ?> inputFormat = getInputFormat(true);
- OneInputStreamOperatorFactory<MergeOnReadInputSplit, RowData> factory = StreamReadOperator.factory((MergeOnReadInputFormat) inputFormat);
- SingleOutputStreamOperator<MergeOnReadInputSplit> monitorOperatorStream = execEnv.addSource(monitoringFunction, getSourceOperatorName("split_monitor"))
- .uid(Pipelines.opUID("split_monitor", conf))
- .setParallelism(1)
- .setMaxParallelism(1);
-
- DataStream<MergeOnReadInputSplit> sourceWithKey = addFileDistributionStrategy(monitorOperatorStream);
-
- SingleOutputStreamOperator<RowData> streamReadSource = sourceWithKey
- .transform("split_reader", typeInfo, factory)
- .uid(Pipelines.opUID("split_reader", conf))
- .setParallelism(conf.get(FlinkOptions.READ_TASKS));
- return new DataStreamSource<>(streamReadSource);
+
+ if (conf.get(FlinkOptions.READ_SOURCE_V2_ENABLED)) {
+ return produceNewSourceDataStream(execEnv);
} else {
- InputFormatSourceFunctionAdapter<RowData> func = new InputFormatSourceFunctionAdapter<>(getInputFormat(), typeInfo);
- DataStreamSource<RowData> source = execEnv.addSource(func, asSummaryString(), typeInfo);
- return source.name(getSourceOperatorName("bounded_source")).setParallelism(conf.get(FlinkOptions.READ_TASKS));
+ return produceLegacySourceDataStream(execEnv, typeInfo);
}
}
};
}
+ /**
+ * Produces a DataStream using the new FLIP-27 HoodieSource.
+ *
+ * @param execEnv the stream execution environment
+ * @return the configured DataStream
+ */
+ private DataStream<RowData> produceNewSourceDataStream(StreamExecutionEnvironment execEnv) {
+ HoodieSource<RowData> hoodieSource = createHoodieSource();
+ DataStreamSource<RowData> source = execEnv.fromSource(
+ hoodieSource, WatermarkStrategy.noWatermarks(), "hudi_source");
+ return source.name(getSourceOperatorName("hudi_source")).uid(Pipelines.opUID("hudi_source", conf)).setParallelism(conf.get(FlinkOptions.READ_TASKS));
+ }
+
+ /**
+ * Produces a DataStream using the legacy source implementation.
+ *
+ * @param execEnv the stream execution environment
+ * @param typeInfo type information for RowData
+ * @return the configured DataStream
+ */
+ private DataStream<RowData> produceLegacySourceDataStream(
+ StreamExecutionEnvironment execEnv,
+ TypeInformation<RowData> typeInfo) {
+ if (conf.get(FlinkOptions.READ_AS_STREAMING)) {
+ StreamReadMonitoringFunction monitoringFunction = new StreamReadMonitoringFunction(
+ conf, FilePathUtils.toFlinkPath(path), tableRowType, maxCompactionMemoryInBytes, partitionPruner);
Review Comment:
legacy source takes in partition pruner. does the new source handles partition pruning in some way?
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/table/HoodieTableSource.java:
##########
@@ -221,32 +231,117 @@ public DataStream<RowData> produceDataStream(StreamExecutionEnvironment execEnv)
TypeInformation<RowData> typeInfo =
(TypeInformation<RowData>) TypeInfoDataTypeConverter.fromDataTypeToTypeInfo(getProducedDataType());
OptionsInference.setupSourceTasks(conf, execEnv.getParallelism());
- if (conf.get(FlinkOptions.READ_AS_STREAMING)) {
- StreamReadMonitoringFunction monitoringFunction = new StreamReadMonitoringFunction(
- conf, FilePathUtils.toFlinkPath(path), tableRowType, maxCompactionMemoryInBytes, partitionPruner);
- InputFormat<RowData, ?> inputFormat = getInputFormat(true);
- OneInputStreamOperatorFactory<MergeOnReadInputSplit, RowData> factory = StreamReadOperator.factory((MergeOnReadInputFormat) inputFormat);
- SingleOutputStreamOperator<MergeOnReadInputSplit> monitorOperatorStream = execEnv.addSource(monitoringFunction, getSourceOperatorName("split_monitor"))
- .uid(Pipelines.opUID("split_monitor", conf))
- .setParallelism(1)
- .setMaxParallelism(1);
-
- DataStream<MergeOnReadInputSplit> sourceWithKey = addFileDistributionStrategy(monitorOperatorStream);
-
- SingleOutputStreamOperator<RowData> streamReadSource = sourceWithKey
- .transform("split_reader", typeInfo, factory)
- .uid(Pipelines.opUID("split_reader", conf))
- .setParallelism(conf.get(FlinkOptions.READ_TASKS));
- return new DataStreamSource<>(streamReadSource);
+
+ if (conf.get(FlinkOptions.READ_SOURCE_V2_ENABLED)) {
+ return produceNewSourceDataStream(execEnv);
} else {
- InputFormatSourceFunctionAdapter<RowData> func = new InputFormatSourceFunctionAdapter<>(getInputFormat(), typeInfo);
- DataStreamSource<RowData> source = execEnv.addSource(func, asSummaryString(), typeInfo);
- return source.name(getSourceOperatorName("bounded_source")).setParallelism(conf.get(FlinkOptions.READ_TASKS));
+ return produceLegacySourceDataStream(execEnv, typeInfo);
}
}
};
}
+ /**
+ * Produces a DataStream using the new FLIP-27 HoodieSource.
+ *
+ * @param execEnv the stream execution environment
+ * @return the configured DataStream
+ */
+ private DataStream<RowData> produceNewSourceDataStream(StreamExecutionEnvironment execEnv) {
+ HoodieSource<RowData> hoodieSource = createHoodieSource();
+ DataStreamSource<RowData> source = execEnv.fromSource(
+ hoodieSource, WatermarkStrategy.noWatermarks(), "hudi_source");
+ return source.name(getSourceOperatorName("hudi_source")).uid(Pipelines.opUID("hudi_source", conf)).setParallelism(conf.get(FlinkOptions.READ_TASKS));
+ }
+
+ /**
+ * Produces a DataStream using the legacy source implementation.
+ *
+ * @param execEnv the stream execution environment
+ * @param typeInfo type information for RowData
+ * @return the configured DataStream
+ */
+ private DataStream<RowData> produceLegacySourceDataStream(
+ StreamExecutionEnvironment execEnv,
+ TypeInformation<RowData> typeInfo) {
+ if (conf.get(FlinkOptions.READ_AS_STREAMING)) {
+ StreamReadMonitoringFunction monitoringFunction = new StreamReadMonitoringFunction(
+ conf, FilePathUtils.toFlinkPath(path), tableRowType, maxCompactionMemoryInBytes, partitionPruner);
+ InputFormat<RowData, ?> inputFormat = getInputFormat(true);
+ OneInputStreamOperatorFactory<MergeOnReadInputSplit, RowData> factory = StreamReadOperator.factory((MergeOnReadInputFormat) inputFormat);
+ SingleOutputStreamOperator<MergeOnReadInputSplit> monitorOperatorStream = execEnv.addSource(monitoringFunction, getSourceOperatorName("split_monitor"))
+ .uid(Pipelines.opUID("split_monitor", conf))
+ .setParallelism(1)
+ .setMaxParallelism(1);
+
+ DataStream<MergeOnReadInputSplit> sourceWithKey = addFileDistributionStrategy(monitorOperatorStream);
Review Comment:
does the new source support setting file distribution strategy ?
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/table/HoodieTableSource.java:
##########
@@ -221,32 +231,117 @@ public DataStream<RowData> produceDataStream(StreamExecutionEnvironment execEnv)
TypeInformation<RowData> typeInfo =
(TypeInformation<RowData>) TypeInfoDataTypeConverter.fromDataTypeToTypeInfo(getProducedDataType());
OptionsInference.setupSourceTasks(conf, execEnv.getParallelism());
- if (conf.get(FlinkOptions.READ_AS_STREAMING)) {
- StreamReadMonitoringFunction monitoringFunction = new StreamReadMonitoringFunction(
- conf, FilePathUtils.toFlinkPath(path), tableRowType, maxCompactionMemoryInBytes, partitionPruner);
- InputFormat<RowData, ?> inputFormat = getInputFormat(true);
- OneInputStreamOperatorFactory<MergeOnReadInputSplit, RowData> factory = StreamReadOperator.factory((MergeOnReadInputFormat) inputFormat);
- SingleOutputStreamOperator<MergeOnReadInputSplit> monitorOperatorStream = execEnv.addSource(monitoringFunction, getSourceOperatorName("split_monitor"))
- .uid(Pipelines.opUID("split_monitor", conf))
- .setParallelism(1)
- .setMaxParallelism(1);
-
- DataStream<MergeOnReadInputSplit> sourceWithKey = addFileDistributionStrategy(monitorOperatorStream);
-
- SingleOutputStreamOperator<RowData> streamReadSource = sourceWithKey
- .transform("split_reader", typeInfo, factory)
- .uid(Pipelines.opUID("split_reader", conf))
- .setParallelism(conf.get(FlinkOptions.READ_TASKS));
- return new DataStreamSource<>(streamReadSource);
+
+ if (conf.get(FlinkOptions.READ_SOURCE_V2_ENABLED)) {
+ return produceNewSourceDataStream(execEnv);
} else {
- InputFormatSourceFunctionAdapter<RowData> func = new InputFormatSourceFunctionAdapter<>(getInputFormat(), typeInfo);
- DataStreamSource<RowData> source = execEnv.addSource(func, asSummaryString(), typeInfo);
- return source.name(getSourceOperatorName("bounded_source")).setParallelism(conf.get(FlinkOptions.READ_TASKS));
+ return produceLegacySourceDataStream(execEnv, typeInfo);
}
}
};
}
+ /**
+ * Produces a DataStream using the new FLIP-27 HoodieSource.
+ *
+ * @param execEnv the stream execution environment
+ * @return the configured DataStream
+ */
+ private DataStream<RowData> produceNewSourceDataStream(StreamExecutionEnvironment execEnv) {
+ HoodieSource<RowData> hoodieSource = createHoodieSource();
+ DataStreamSource<RowData> source = execEnv.fromSource(
+ hoodieSource, WatermarkStrategy.noWatermarks(), "hudi_source");
+ return source.name(getSourceOperatorName("hudi_source")).uid(Pipelines.opUID("hudi_source", conf)).setParallelism(conf.get(FlinkOptions.READ_TASKS));
+ }
+
+ /**
+ * Produces a DataStream using the legacy source implementation.
+ *
+ * @param execEnv the stream execution environment
+ * @param typeInfo type information for RowData
+ * @return the configured DataStream
+ */
+ private DataStream<RowData> produceLegacySourceDataStream(
+ StreamExecutionEnvironment execEnv,
+ TypeInformation<RowData> typeInfo) {
+ if (conf.get(FlinkOptions.READ_AS_STREAMING)) {
+ StreamReadMonitoringFunction monitoringFunction = new StreamReadMonitoringFunction(
+ conf, FilePathUtils.toFlinkPath(path), tableRowType, maxCompactionMemoryInBytes, partitionPruner);
+ InputFormat<RowData, ?> inputFormat = getInputFormat(true);
+ OneInputStreamOperatorFactory<MergeOnReadInputSplit, RowData> factory = StreamReadOperator.factory((MergeOnReadInputFormat) inputFormat);
+ SingleOutputStreamOperator<MergeOnReadInputSplit> monitorOperatorStream = execEnv.addSource(monitoringFunction, getSourceOperatorName("split_monitor"))
+ .uid(Pipelines.opUID("split_monitor", conf))
+ .setParallelism(1)
+ .setMaxParallelism(1);
+
+ DataStream<MergeOnReadInputSplit> sourceWithKey = addFileDistributionStrategy(monitorOperatorStream);
+
+ SingleOutputStreamOperator<RowData> streamReadSource = sourceWithKey
+ .transform("split_reader", typeInfo, factory)
+ .uid(Pipelines.opUID("split_reader", conf))
+ .setParallelism(conf.get(FlinkOptions.READ_TASKS));
+ return new DataStreamSource<>(streamReadSource);
+ } else {
+ InputFormatSourceFunctionAdapter<RowData> func = new InputFormatSourceFunctionAdapter<>(getInputFormat(), typeInfo);
+ DataStreamSource<RowData> source = execEnv.addSource(func, asSummaryString(), typeInfo);
+ return source.name(getSourceOperatorName("bounded_source")).setParallelism(conf.get(FlinkOptions.READ_TASKS));
+ }
+ }
+
+ /**
+ * Creates a new Flink FLIP-27 HoodieSource for reading data from the Hudi table.
+ *
+ * @return the configured HoodieSource instance
Review Comment:
name fixes: "Hoodie", and FLIP-27 ref
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/table/HoodieTableSource.java:
##########
@@ -221,32 +231,117 @@ public DataStream<RowData> produceDataStream(StreamExecutionEnvironment execEnv)
TypeInformation<RowData> typeInfo =
(TypeInformation<RowData>) TypeInfoDataTypeConverter.fromDataTypeToTypeInfo(getProducedDataType());
OptionsInference.setupSourceTasks(conf, execEnv.getParallelism());
- if (conf.get(FlinkOptions.READ_AS_STREAMING)) {
- StreamReadMonitoringFunction monitoringFunction = new StreamReadMonitoringFunction(
- conf, FilePathUtils.toFlinkPath(path), tableRowType, maxCompactionMemoryInBytes, partitionPruner);
- InputFormat<RowData, ?> inputFormat = getInputFormat(true);
- OneInputStreamOperatorFactory<MergeOnReadInputSplit, RowData> factory = StreamReadOperator.factory((MergeOnReadInputFormat) inputFormat);
- SingleOutputStreamOperator<MergeOnReadInputSplit> monitorOperatorStream = execEnv.addSource(monitoringFunction, getSourceOperatorName("split_monitor"))
- .uid(Pipelines.opUID("split_monitor", conf))
- .setParallelism(1)
- .setMaxParallelism(1);
-
- DataStream<MergeOnReadInputSplit> sourceWithKey = addFileDistributionStrategy(monitorOperatorStream);
-
- SingleOutputStreamOperator<RowData> streamReadSource = sourceWithKey
- .transform("split_reader", typeInfo, factory)
- .uid(Pipelines.opUID("split_reader", conf))
- .setParallelism(conf.get(FlinkOptions.READ_TASKS));
- return new DataStreamSource<>(streamReadSource);
+
+ if (conf.get(FlinkOptions.READ_SOURCE_V2_ENABLED)) {
+ return produceNewSourceDataStream(execEnv);
} else {
- InputFormatSourceFunctionAdapter<RowData> func = new InputFormatSourceFunctionAdapter<>(getInputFormat(), typeInfo);
- DataStreamSource<RowData> source = execEnv.addSource(func, asSummaryString(), typeInfo);
- return source.name(getSourceOperatorName("bounded_source")).setParallelism(conf.get(FlinkOptions.READ_TASKS));
+ return produceLegacySourceDataStream(execEnv, typeInfo);
}
}
};
}
+ /**
+ * Produces a DataStream using the new FLIP-27 HoodieSource.
+ *
+ * @param execEnv the stream execution environment
+ * @return the configured DataStream
+ */
+ private DataStream<RowData> produceNewSourceDataStream(StreamExecutionEnvironment execEnv) {
+ HoodieSource<RowData> hoodieSource = createHoodieSource();
+ DataStreamSource<RowData> source = execEnv.fromSource(
+ hoodieSource, WatermarkStrategy.noWatermarks(), "hudi_source");
+ return source.name(getSourceOperatorName("hudi_source")).uid(Pipelines.opUID("hudi_source", conf)).setParallelism(conf.get(FlinkOptions.READ_TASKS));
+ }
+
+ /**
+ * Produces a DataStream using the legacy source implementation.
+ *
+ * @param execEnv the stream execution environment
+ * @param typeInfo type information for RowData
+ * @return the configured DataStream
+ */
+ private DataStream<RowData> produceLegacySourceDataStream(
+ StreamExecutionEnvironment execEnv,
+ TypeInformation<RowData> typeInfo) {
+ if (conf.get(FlinkOptions.READ_AS_STREAMING)) {
+ StreamReadMonitoringFunction monitoringFunction = new StreamReadMonitoringFunction(
+ conf, FilePathUtils.toFlinkPath(path), tableRowType, maxCompactionMemoryInBytes, partitionPruner);
+ InputFormat<RowData, ?> inputFormat = getInputFormat(true);
+ OneInputStreamOperatorFactory<MergeOnReadInputSplit, RowData> factory = StreamReadOperator.factory((MergeOnReadInputFormat) inputFormat);
+ SingleOutputStreamOperator<MergeOnReadInputSplit> monitorOperatorStream = execEnv.addSource(monitoringFunction, getSourceOperatorName("split_monitor"))
+ .uid(Pipelines.opUID("split_monitor", conf))
+ .setParallelism(1)
+ .setMaxParallelism(1);
+
+ DataStream<MergeOnReadInputSplit> sourceWithKey = addFileDistributionStrategy(monitorOperatorStream);
+
+ SingleOutputStreamOperator<RowData> streamReadSource = sourceWithKey
+ .transform("split_reader", typeInfo, factory)
+ .uid(Pipelines.opUID("split_reader", conf))
+ .setParallelism(conf.get(FlinkOptions.READ_TASKS));
+ return new DataStreamSource<>(streamReadSource);
+ } else {
+ InputFormatSourceFunctionAdapter<RowData> func = new InputFormatSourceFunctionAdapter<>(getInputFormat(), typeInfo);
+ DataStreamSource<RowData> source = execEnv.addSource(func, asSummaryString(), typeInfo);
+ return source.name(getSourceOperatorName("bounded_source")).setParallelism(conf.get(FlinkOptions.READ_TASKS));
+ }
+ }
+
+ /**
+ * Creates a new Flink FLIP-27 HoodieSource for reading data from the Hudi table.
+ *
+ * @return the configured HoodieSource instance
+ */
+ private HoodieSource<RowData> createHoodieSource() {
+ ValidationUtils.checkState(metaClient != null, "MetaClient must be initialized before creating HoodieSource");
+ ValidationUtils.checkState(hadoopConf != null, "Hadoop configuration must be initialized");
+ ValidationUtils.checkState(conf != null, "Configuration must be initialized");
+
+ HoodieSchema tableSchema = !tableDataExists() ? inferSchemaFromDdl() : getTableSchema();
+ final DataType rowDataType = HoodieSchemaConverter.convertToDataType(tableSchema);
+ final RowType rowType = (RowType) rowDataType.getLogicalType();
+ final RowType requiredRowType = (RowType) getProducedDataType().notNull().getLogicalType();
+
+ HoodieScanContext context = createHoodieScanContext(rowType);
+ HoodieWriteConfig writeConfig = FlinkWriteClients.getHoodieClientConfig(conf, false, false);
+ HoodieFlinkEngineContext flinkEngineContext = new HoodieFlinkEngineContext(hadoopConf.unwrap());
+ HoodieFlinkTable<RowData> flinkTable = HoodieFlinkTable.create(writeConfig, flinkEngineContext);
+ FlinkReaderContextFactory readerContextFactory = new FlinkReaderContextFactory(metaClient);
+ HoodieSplitReaderFunction splitReaderFunction = new HoodieSplitReaderFunction(
+ flinkTable,
+ readerContextFactory.getContext(),
+ conf,
+ tableSchema,
+ HoodieSchemaConverter.convertToSchema(requiredRowType),
+ conf.get(FlinkOptions.MERGE_TYPE),
+ Option.empty());
+ return new HoodieSource<>(context, splitReaderFunction, new HoodieSourceSplitComparator(), metaClient, new HoodieRecordEmitter<>());
+ }
+
+ /**
+ * Creates a HoodieScanContext for configuring the scan operation.
+ *
+ * @param rowType the row type for the scan
+ * @return the configured HoodieScanContext instance
+ */
+ private HoodieScanContext createHoodieScanContext(RowType rowType) {
+ return new HoodieScanContext
+ .Builder()
+ .conf(conf)
+ .path(new Path(path.toUri().getPath()))
+ .cdcEnabled(conf.get(FlinkOptions.CDC_ENABLED))
+ .rowType(rowType)
+ .startInstant(conf.get(FlinkOptions.READ_START_COMMIT))
+ .endInstant(conf.get(FlinkOptions.READ_END_COMMIT))
+ .skipCompaction(conf.get(FlinkOptions.READ_STREAMING_SKIP_COMPACT))
+ .skipClustering(conf.get(FlinkOptions.READ_STREAMING_SKIP_CLUSTERING))
+ .skipInsertOverwrite(conf.get(FlinkOptions.READ_STREAMING_SKIP_INSERT_OVERWRITE))
+ .maxCompactionMemoryInBytes(conf.get(FlinkOptions.COMPACTION_MAX_MEMORY))
+ .isStreaming(conf.get(FlinkOptions.READ_AS_STREAMING))
+ .build();
Review Comment:
don't see maxPendingSplits set here
--
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] feat: enable new Hoodie source in HoodieTableSource [hudi]
Posted by "xushiyan (via GitHub)" <gi...@apache.org>.
xushiyan merged PR #18022:
URL: https://github.com/apache/hudi/pull/18022
--
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] feat: enable new Hoodie source in HoodieTableSource [hudi]
Posted by "cshuo (via GitHub)" <gi...@apache.org>.
cshuo commented on code in PR #18022:
URL: https://github.com/apache/hudi/pull/18022#discussion_r2739665834
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/configuration/FlinkOptions.java:
##########
@@ -440,6 +440,12 @@ public class FlinkOptions extends HoodieConfig {
+ "the avg read splits number per-second would be 'read.splits.limit'/'read.streaming.check-interval', by "
+ "default no limit");
+ public static final ConfigOption<Boolean> READ_NEW_SOURCE = ConfigOptions
+ .key("read.new.source")
Review Comment:
`read.new-source.enabled` or `read.flip27-source.enabled`
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/table/HoodieTableSource.java:
##########
@@ -221,32 +231,117 @@ public DataStream<RowData> produceDataStream(StreamExecutionEnvironment execEnv)
TypeInformation<RowData> typeInfo =
(TypeInformation<RowData>) TypeInfoDataTypeConverter.fromDataTypeToTypeInfo(getProducedDataType());
OptionsInference.setupSourceTasks(conf, execEnv.getParallelism());
- if (conf.get(FlinkOptions.READ_AS_STREAMING)) {
- StreamReadMonitoringFunction monitoringFunction = new StreamReadMonitoringFunction(
- conf, FilePathUtils.toFlinkPath(path), tableRowType, maxCompactionMemoryInBytes, partitionPruner);
- InputFormat<RowData, ?> inputFormat = getInputFormat(true);
- OneInputStreamOperatorFactory<MergeOnReadInputSplit, RowData> factory = StreamReadOperator.factory((MergeOnReadInputFormat) inputFormat);
- SingleOutputStreamOperator<MergeOnReadInputSplit> monitorOperatorStream = execEnv.addSource(monitoringFunction, getSourceOperatorName("split_monitor"))
- .uid(Pipelines.opUID("split_monitor", conf))
- .setParallelism(1)
- .setMaxParallelism(1);
-
- DataStream<MergeOnReadInputSplit> sourceWithKey = addFileDistributionStrategy(monitorOperatorStream);
-
- SingleOutputStreamOperator<RowData> streamReadSource = sourceWithKey
- .transform("split_reader", typeInfo, factory)
- .uid(Pipelines.opUID("split_reader", conf))
- .setParallelism(conf.get(FlinkOptions.READ_TASKS));
- return new DataStreamSource<>(streamReadSource);
+
+ if (conf.get(FlinkOptions.READ_NEW_SOURCE)) {
+ return produceNewSourceDataStream(execEnv);
} else {
- InputFormatSourceFunctionAdapter<RowData> func = new InputFormatSourceFunctionAdapter<>(getInputFormat(), typeInfo);
- DataStreamSource<RowData> source = execEnv.addSource(func, asSummaryString(), typeInfo);
- return source.name(getSourceOperatorName("bounded_source")).setParallelism(conf.get(FlinkOptions.READ_TASKS));
+ return produceLegacySourceDataStream(execEnv, typeInfo);
}
}
};
}
+ /**
+ * Produces a DataStream using the new FLIP-27 HoodieSource.
+ *
+ * @param execEnv the stream execution environment
+ * @return the configured DataStream
+ */
+ private DataStream<RowData> produceNewSourceDataStream(StreamExecutionEnvironment execEnv) {
+ HoodieSource<RowData> hoodieSource = createHoodieSource();
+ DataStreamSource<RowData> source = execEnv.fromSource(
+ hoodieSource, WatermarkStrategy.noWatermarks(), "hudi_source");
+ return source.name(getSourceOperatorName("hudi_source")).setParallelism(conf.get(FlinkOptions.READ_TASKS));
+ }
+
+ /**
+ * Produces a DataStream using the legacy source implementation.
+ *
+ * @param execEnv the stream execution environment
+ * @param typeInfo type information for RowData
+ * @return the configured DataStream
+ */
+ private DataStream<RowData> produceLegacySourceDataStream(
+ StreamExecutionEnvironment execEnv,
+ TypeInformation<RowData> typeInfo) {
+ if (conf.get(FlinkOptions.READ_AS_STREAMING)) {
+ StreamReadMonitoringFunction monitoringFunction = new StreamReadMonitoringFunction(
+ conf, FilePathUtils.toFlinkPath(path), tableRowType, maxCompactionMemoryInBytes, partitionPruner);
+ InputFormat<RowData, ?> inputFormat = getInputFormat(true);
+ OneInputStreamOperatorFactory<MergeOnReadInputSplit, RowData> factory = StreamReadOperator.factory((MergeOnReadInputFormat) inputFormat);
+ SingleOutputStreamOperator<MergeOnReadInputSplit> monitorOperatorStream = execEnv.addSource(monitoringFunction, getSourceOperatorName("split_monitor"))
+ .uid(Pipelines.opUID("split_monitor", conf))
+ .setParallelism(1)
+ .setMaxParallelism(1);
+
+ DataStream<MergeOnReadInputSplit> sourceWithKey = addFileDistributionStrategy(monitorOperatorStream);
+
+ SingleOutputStreamOperator<RowData> streamReadSource = sourceWithKey
+ .transform("split_reader", typeInfo, factory)
+ .uid(Pipelines.opUID("split_reader", conf))
+ .setParallelism(conf.get(FlinkOptions.READ_TASKS));
+ return new DataStreamSource<>(streamReadSource);
+ } else {
+ InputFormatSourceFunctionAdapter<RowData> func = new InputFormatSourceFunctionAdapter<>(getInputFormat(), typeInfo);
+ DataStreamSource<RowData> source = execEnv.addSource(func, asSummaryString(), typeInfo);
+ return source.name(getSourceOperatorName("bounded_source")).setParallelism(conf.get(FlinkOptions.READ_TASKS));
+ }
+ }
+
+ /**
+ * Creates a new Flink FLIP-27 HoodieSource for reading data from the Hudi table.
+ *
+ * @return the configured HoodieSource instance
+ */
+ private HoodieSource<RowData> createHoodieSource() {
+ ValidationUtils.checkState(metaClient != null, "MetaClient must be initialized before creating HoodieSource");
+ ValidationUtils.checkState(hadoopConf != null, "Hadoop configuration must be initialized");
+ ValidationUtils.checkState(conf != null, "Configuration must be initialized");
+
+ HoodieSchema tableSchema = (this.metaClient == null || !tableDataExists()) ? inferSchemaFromDdl() : getTableSchema();
Review Comment:
`this.metaClient == null` redundant condition here, already checked above.
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/table/HoodieTableSource.java:
##########
@@ -221,32 +231,117 @@ public DataStream<RowData> produceDataStream(StreamExecutionEnvironment execEnv)
TypeInformation<RowData> typeInfo =
(TypeInformation<RowData>) TypeInfoDataTypeConverter.fromDataTypeToTypeInfo(getProducedDataType());
OptionsInference.setupSourceTasks(conf, execEnv.getParallelism());
- if (conf.get(FlinkOptions.READ_AS_STREAMING)) {
- StreamReadMonitoringFunction monitoringFunction = new StreamReadMonitoringFunction(
- conf, FilePathUtils.toFlinkPath(path), tableRowType, maxCompactionMemoryInBytes, partitionPruner);
- InputFormat<RowData, ?> inputFormat = getInputFormat(true);
- OneInputStreamOperatorFactory<MergeOnReadInputSplit, RowData> factory = StreamReadOperator.factory((MergeOnReadInputFormat) inputFormat);
- SingleOutputStreamOperator<MergeOnReadInputSplit> monitorOperatorStream = execEnv.addSource(monitoringFunction, getSourceOperatorName("split_monitor"))
- .uid(Pipelines.opUID("split_monitor", conf))
- .setParallelism(1)
- .setMaxParallelism(1);
-
- DataStream<MergeOnReadInputSplit> sourceWithKey = addFileDistributionStrategy(monitorOperatorStream);
-
- SingleOutputStreamOperator<RowData> streamReadSource = sourceWithKey
- .transform("split_reader", typeInfo, factory)
- .uid(Pipelines.opUID("split_reader", conf))
- .setParallelism(conf.get(FlinkOptions.READ_TASKS));
- return new DataStreamSource<>(streamReadSource);
+
+ if (conf.get(FlinkOptions.READ_NEW_SOURCE)) {
+ return produceNewSourceDataStream(execEnv);
} else {
- InputFormatSourceFunctionAdapter<RowData> func = new InputFormatSourceFunctionAdapter<>(getInputFormat(), typeInfo);
- DataStreamSource<RowData> source = execEnv.addSource(func, asSummaryString(), typeInfo);
- return source.name(getSourceOperatorName("bounded_source")).setParallelism(conf.get(FlinkOptions.READ_TASKS));
+ return produceLegacySourceDataStream(execEnv, typeInfo);
}
}
};
}
+ /**
+ * Produces a DataStream using the new FLIP-27 HoodieSource.
+ *
+ * @param execEnv the stream execution environment
+ * @return the configured DataStream
+ */
+ private DataStream<RowData> produceNewSourceDataStream(StreamExecutionEnvironment execEnv) {
+ HoodieSource<RowData> hoodieSource = createHoodieSource();
+ DataStreamSource<RowData> source = execEnv.fromSource(
+ hoodieSource, WatermarkStrategy.noWatermarks(), "hudi_source");
+ return source.name(getSourceOperatorName("hudi_source")).setParallelism(conf.get(FlinkOptions.READ_TASKS));
Review Comment:
Add a uid for new source explicitly like legacy 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] feat: enable new Hoodie source in HoodieTableSource [hudi]
Posted by "HuangZhenQiu (via GitHub)" <gi...@apache.org>.
HuangZhenQiu commented on PR #18022:
URL: https://github.com/apache/hudi/pull/18022#issuecomment-3815350761
@cshuo
Thanks, resolved your comments.
--
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] feat: enable new Hoodie source in HoodieTableSource [hudi]
Posted by "xushiyan (via GitHub)" <gi...@apache.org>.
xushiyan commented on code in PR #18022:
URL: https://github.com/apache/hudi/pull/18022#discussion_r2744057311
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/source/HoodieScanContext.java:
##########
@@ -32,7 +32,7 @@
* Hudi source scan context.
*/
@Internal
-public class ScanContext implements Serializable {
+public class HoodieScanContext implements Serializable {
Review Comment:
pls add class docs to describe the class so it can be understood and distinguished easily from the other scan context. explain the other class more in class docs as well if necessary, because by only adding `Hoodie` does not add much value to help distinguish them: `org.apache.hudi.source.HoodieScanContext` vs `org.apache.flink.table.connector.source.ScaneContext`
--
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] feat: enable new Hoodie source in HoodieTableSource [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #18022:
URL: https://github.com/apache/hudi/pull/18022#issuecomment-3821176730
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "e224a910d9578fcfe16962df532f6324fa6bc7e5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11446",
"triggerID" : "e224a910d9578fcfe16962df532f6324fa6bc7e5",
"triggerType" : "PUSH"
}, {
"hash" : "f0848719a25e24ab52f3a6b456696e0f58138aef",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11447",
"triggerID" : "f0848719a25e24ab52f3a6b456696e0f58138aef",
"triggerType" : "PUSH"
}, {
"hash" : "a58b200f1bd4156ac7e92dccbfb800df3b263c60",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11455",
"triggerID" : "a58b200f1bd4156ac7e92dccbfb800df3b263c60",
"triggerType" : "PUSH"
}, {
"hash" : "46ce30f6ab523fa2df0045091bf0fc45393a23bf",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11479",
"triggerID" : "46ce30f6ab523fa2df0045091bf0fc45393a23bf",
"triggerType" : "PUSH"
}, {
"hash" : "44882f3346e4361ab9b5aa04d31f43b8a7e1a223",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11486",
"triggerID" : "44882f3346e4361ab9b5aa04d31f43b8a7e1a223",
"triggerType" : "PUSH"
}, {
"hash" : "8119132f42784901c19c81839c7c7878ee8600ca",
"status" : "PENDING",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11522",
"triggerID" : "8119132f42784901c19c81839c7c7878ee8600ca",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 44882f3346e4361ab9b5aa04d31f43b8a7e1a223 Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11486)
* 8119132f42784901c19c81839c7c7878ee8600ca Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11522)
<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] feat: enable new Hoodie source in HoodieTableSource [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #18022:
URL: https://github.com/apache/hudi/pull/18022#issuecomment-3813565478
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "e224a910d9578fcfe16962df532f6324fa6bc7e5",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11446",
"triggerID" : "e224a910d9578fcfe16962df532f6324fa6bc7e5",
"triggerType" : "PUSH"
}, {
"hash" : "f0848719a25e24ab52f3a6b456696e0f58138aef",
"status" : "PENDING",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11447",
"triggerID" : "f0848719a25e24ab52f3a6b456696e0f58138aef",
"triggerType" : "PUSH"
}, {
"hash" : "a58b200f1bd4156ac7e92dccbfb800df3b263c60",
"status" : "PENDING",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11455",
"triggerID" : "a58b200f1bd4156ac7e92dccbfb800df3b263c60",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* e224a910d9578fcfe16962df532f6324fa6bc7e5 Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11446)
* f0848719a25e24ab52f3a6b456696e0f58138aef Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11447)
* a58b200f1bd4156ac7e92dccbfb800df3b263c60 Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11455)
<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] feat: enable new Hoodie source in HoodieTableSource [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #18022:
URL: https://github.com/apache/hudi/pull/18022#issuecomment-3821633269
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "e224a910d9578fcfe16962df532f6324fa6bc7e5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11446",
"triggerID" : "e224a910d9578fcfe16962df532f6324fa6bc7e5",
"triggerType" : "PUSH"
}, {
"hash" : "f0848719a25e24ab52f3a6b456696e0f58138aef",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11447",
"triggerID" : "f0848719a25e24ab52f3a6b456696e0f58138aef",
"triggerType" : "PUSH"
}, {
"hash" : "a58b200f1bd4156ac7e92dccbfb800df3b263c60",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11455",
"triggerID" : "a58b200f1bd4156ac7e92dccbfb800df3b263c60",
"triggerType" : "PUSH"
}, {
"hash" : "46ce30f6ab523fa2df0045091bf0fc45393a23bf",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11479",
"triggerID" : "46ce30f6ab523fa2df0045091bf0fc45393a23bf",
"triggerType" : "PUSH"
}, {
"hash" : "44882f3346e4361ab9b5aa04d31f43b8a7e1a223",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11486",
"triggerID" : "44882f3346e4361ab9b5aa04d31f43b8a7e1a223",
"triggerType" : "PUSH"
}, {
"hash" : "8119132f42784901c19c81839c7c7878ee8600ca",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11522",
"triggerID" : "8119132f42784901c19c81839c7c7878ee8600ca",
"triggerType" : "PUSH"
}, {
"hash" : "ff004b3ffec752c9fd54af6751d4cf7eeb4ce1bc",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11527",
"triggerID" : "ff004b3ffec752c9fd54af6751d4cf7eeb4ce1bc",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* ff004b3ffec752c9fd54af6751d4cf7eeb4ce1bc Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11527)
<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] feat: enable new Hoodie source in HoodieTableSource [hudi]
Posted by "xushiyan (via GitHub)" <gi...@apache.org>.
xushiyan commented on code in PR #18022:
URL: https://github.com/apache/hudi/pull/18022#discussion_r2744080028
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/source/HoodieSource.java:
##########
@@ -55,20 +55,25 @@
import java.util.stream.Collectors;
/**
- * Hoodie Source implementation.
- * @param <T> record Type
+ * Hoodie FLIP-27 Source implementation for Flink streaming and batch reads.
+ *
+ * <p>This source supports both bounded (batch) and unbounded (streaming) modes
+ * based on the configuration. It uses Flink's new Source API (FLIP-27) to
Review Comment:
same here: avoid "new", "FLIP-27" such references. You can add `@see FLIP-27` with link in the end of the docs block
--
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] feat: enable new Hoodie source in HoodieTableSource [hudi]
Posted by "xushiyan (via GitHub)" <gi...@apache.org>.
xushiyan commented on code in PR #18022:
URL: https://github.com/apache/hudi/pull/18022#discussion_r2744050337
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/configuration/FlinkOptions.java:
##########
@@ -440,6 +440,12 @@ public class FlinkOptions extends HoodieConfig {
+ "the avg read splits number per-second would be 'read.splits.limit'/'read.streaming.check-interval', by "
+ "default no limit");
+ public static final ConfigOption<Boolean> READ_NEW_SOURCE_ENABLED = ConfigOptions
+ .key("read.new-source.enabled")
+ .booleanType()
+ .defaultValue(false)
+ .withDescription("Whether to use Flink FLIP27 new source to consume data files.");
Review Comment:
calling it "new" does not convey the api in a meaningful way. what is old? can new always be new? pls just match it to whatever flink codebase calls 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] feat: enable new Hoodie source in HoodieTableSource [hudi]
Posted by "HuangZhenQiu (via GitHub)" <gi...@apache.org>.
HuangZhenQiu commented on code in PR #18022:
URL: https://github.com/apache/hudi/pull/18022#discussion_r2744297006
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/table/HoodieTableSource.java:
##########
@@ -221,32 +231,117 @@ public DataStream<RowData> produceDataStream(StreamExecutionEnvironment execEnv)
TypeInformation<RowData> typeInfo =
(TypeInformation<RowData>) TypeInfoDataTypeConverter.fromDataTypeToTypeInfo(getProducedDataType());
OptionsInference.setupSourceTasks(conf, execEnv.getParallelism());
- if (conf.get(FlinkOptions.READ_AS_STREAMING)) {
- StreamReadMonitoringFunction monitoringFunction = new StreamReadMonitoringFunction(
- conf, FilePathUtils.toFlinkPath(path), tableRowType, maxCompactionMemoryInBytes, partitionPruner);
- InputFormat<RowData, ?> inputFormat = getInputFormat(true);
- OneInputStreamOperatorFactory<MergeOnReadInputSplit, RowData> factory = StreamReadOperator.factory((MergeOnReadInputFormat) inputFormat);
- SingleOutputStreamOperator<MergeOnReadInputSplit> monitorOperatorStream = execEnv.addSource(monitoringFunction, getSourceOperatorName("split_monitor"))
- .uid(Pipelines.opUID("split_monitor", conf))
- .setParallelism(1)
- .setMaxParallelism(1);
-
- DataStream<MergeOnReadInputSplit> sourceWithKey = addFileDistributionStrategy(monitorOperatorStream);
-
- SingleOutputStreamOperator<RowData> streamReadSource = sourceWithKey
- .transform("split_reader", typeInfo, factory)
- .uid(Pipelines.opUID("split_reader", conf))
- .setParallelism(conf.get(FlinkOptions.READ_TASKS));
- return new DataStreamSource<>(streamReadSource);
+
+ if (conf.get(FlinkOptions.READ_SOURCE_V2_ENABLED)) {
+ return produceNewSourceDataStream(execEnv);
} else {
- InputFormatSourceFunctionAdapter<RowData> func = new InputFormatSourceFunctionAdapter<>(getInputFormat(), typeInfo);
- DataStreamSource<RowData> source = execEnv.addSource(func, asSummaryString(), typeInfo);
- return source.name(getSourceOperatorName("bounded_source")).setParallelism(conf.get(FlinkOptions.READ_TASKS));
+ return produceLegacySourceDataStream(execEnv, typeInfo);
}
}
};
}
+ /**
+ * Produces a DataStream using the new FLIP-27 HoodieSource.
+ *
+ * @param execEnv the stream execution environment
+ * @return the configured DataStream
+ */
+ private DataStream<RowData> produceNewSourceDataStream(StreamExecutionEnvironment execEnv) {
+ HoodieSource<RowData> hoodieSource = createHoodieSource();
+ DataStreamSource<RowData> source = execEnv.fromSource(
+ hoodieSource, WatermarkStrategy.noWatermarks(), "hudi_source");
+ return source.name(getSourceOperatorName("hudi_source")).uid(Pipelines.opUID("hudi_source", conf)).setParallelism(conf.get(FlinkOptions.READ_TASKS));
+ }
+
+ /**
+ * Produces a DataStream using the legacy source implementation.
+ *
+ * @param execEnv the stream execution environment
+ * @param typeInfo type information for RowData
+ * @return the configured DataStream
+ */
+ private DataStream<RowData> produceLegacySourceDataStream(
+ StreamExecutionEnvironment execEnv,
+ TypeInformation<RowData> typeInfo) {
+ if (conf.get(FlinkOptions.READ_AS_STREAMING)) {
+ StreamReadMonitoringFunction monitoringFunction = new StreamReadMonitoringFunction(
+ conf, FilePathUtils.toFlinkPath(path), tableRowType, maxCompactionMemoryInBytes, partitionPruner);
+ InputFormat<RowData, ?> inputFormat = getInputFormat(true);
+ OneInputStreamOperatorFactory<MergeOnReadInputSplit, RowData> factory = StreamReadOperator.factory((MergeOnReadInputFormat) inputFormat);
+ SingleOutputStreamOperator<MergeOnReadInputSplit> monitorOperatorStream = execEnv.addSource(monitoringFunction, getSourceOperatorName("split_monitor"))
+ .uid(Pipelines.opUID("split_monitor", conf))
+ .setParallelism(1)
+ .setMaxParallelism(1);
+
+ DataStream<MergeOnReadInputSplit> sourceWithKey = addFileDistributionStrategy(monitorOperatorStream);
Review Comment:
It can't be handled in this PR. Will think about the improvement as a follow up.
--
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] feat: enable new Hoodie source in HoodieTableSource [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #18022:
URL: https://github.com/apache/hudi/pull/18022#issuecomment-3821166753
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "e224a910d9578fcfe16962df532f6324fa6bc7e5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11446",
"triggerID" : "e224a910d9578fcfe16962df532f6324fa6bc7e5",
"triggerType" : "PUSH"
}, {
"hash" : "f0848719a25e24ab52f3a6b456696e0f58138aef",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11447",
"triggerID" : "f0848719a25e24ab52f3a6b456696e0f58138aef",
"triggerType" : "PUSH"
}, {
"hash" : "a58b200f1bd4156ac7e92dccbfb800df3b263c60",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11455",
"triggerID" : "a58b200f1bd4156ac7e92dccbfb800df3b263c60",
"triggerType" : "PUSH"
}, {
"hash" : "46ce30f6ab523fa2df0045091bf0fc45393a23bf",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11479",
"triggerID" : "46ce30f6ab523fa2df0045091bf0fc45393a23bf",
"triggerType" : "PUSH"
}, {
"hash" : "44882f3346e4361ab9b5aa04d31f43b8a7e1a223",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11486",
"triggerID" : "44882f3346e4361ab9b5aa04d31f43b8a7e1a223",
"triggerType" : "PUSH"
}, {
"hash" : "8119132f42784901c19c81839c7c7878ee8600ca",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "8119132f42784901c19c81839c7c7878ee8600ca",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 44882f3346e4361ab9b5aa04d31f43b8a7e1a223 Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11486)
* 8119132f42784901c19c81839c7c7878ee8600ca 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] feat: enable new Hoodie source in HoodieTableSource [hudi]
Posted by "HuangZhenQiu (via GitHub)" <gi...@apache.org>.
HuangZhenQiu commented on PR #18022:
URL: https://github.com/apache/hudi/pull/18022#issuecomment-3821416544
Closes #17998
--
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] feat: enable new Hoodie source in HoodieTableSource [hudi]
Posted by "xushiyan (via GitHub)" <gi...@apache.org>.
xushiyan commented on PR #18022:
URL: https://github.com/apache/hudi/pull/18022#issuecomment-3821226005
Pls also link issues, if this solves the issue, then use closing key words, if it's part of the issue, then just mention the 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] feat: enable new Hoodie source in HoodieTableSource [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #18022:
URL: https://github.com/apache/hudi/pull/18022#issuecomment-3812848487
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "e224a910d9578fcfe16962df532f6324fa6bc7e5",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "e224a910d9578fcfe16962df532f6324fa6bc7e5",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* e224a910d9578fcfe16962df532f6324fa6bc7e5 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] feat: enable new Hoodie source in HoodieTableSource [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #18022:
URL: https://github.com/apache/hudi/pull/18022#issuecomment-3815513176
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "e224a910d9578fcfe16962df532f6324fa6bc7e5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11446",
"triggerID" : "e224a910d9578fcfe16962df532f6324fa6bc7e5",
"triggerType" : "PUSH"
}, {
"hash" : "f0848719a25e24ab52f3a6b456696e0f58138aef",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11447",
"triggerID" : "f0848719a25e24ab52f3a6b456696e0f58138aef",
"triggerType" : "PUSH"
}, {
"hash" : "a58b200f1bd4156ac7e92dccbfb800df3b263c60",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11455",
"triggerID" : "a58b200f1bd4156ac7e92dccbfb800df3b263c60",
"triggerType" : "PUSH"
}, {
"hash" : "46ce30f6ab523fa2df0045091bf0fc45393a23bf",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11479",
"triggerID" : "46ce30f6ab523fa2df0045091bf0fc45393a23bf",
"triggerType" : "PUSH"
}, {
"hash" : "44882f3346e4361ab9b5aa04d31f43b8a7e1a223",
"status" : "PENDING",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11486",
"triggerID" : "44882f3346e4361ab9b5aa04d31f43b8a7e1a223",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 46ce30f6ab523fa2df0045091bf0fc45393a23bf Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11479)
* 44882f3346e4361ab9b5aa04d31f43b8a7e1a223 Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11486)
<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] feat: enable new Hoodie source in HoodieTableSource [hudi]
Posted by "HuangZhenQiu (via GitHub)" <gi...@apache.org>.
HuangZhenQiu commented on code in PR #18022:
URL: https://github.com/apache/hudi/pull/18022#discussion_r2744154021
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/source/HoodieSource.java:
##########
@@ -55,20 +55,25 @@
import java.util.stream.Collectors;
/**
- * Hoodie Source implementation.
- * @param <T> record Type
+ * Hoodie FLIP-27 Source implementation for Flink streaming and batch reads.
+ *
+ * <p>This source supports both bounded (batch) and unbounded (streaming) modes
+ * based on the configuration. It uses Flink's new Source API (FLIP-27) to
Review Comment:
Will replace them with Source V2 and `@see FLIP-27` link for better reference.
--
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] feat: enable new Hoodie source in HoodieTableSource [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #18022:
URL: https://github.com/apache/hudi/pull/18022#issuecomment-3812863087
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "e224a910d9578fcfe16962df532f6324fa6bc7e5",
"status" : "PENDING",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11446",
"triggerID" : "e224a910d9578fcfe16962df532f6324fa6bc7e5",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* e224a910d9578fcfe16962df532f6324fa6bc7e5 Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11446)
<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] feat: enable new Hoodie source in HoodieTableSource [hudi]
Posted by "xushiyan (via GitHub)" <gi...@apache.org>.
xushiyan commented on code in PR #18022:
URL: https://github.com/apache/hudi/pull/18022#discussion_r2744057311
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/source/HoodieScanContext.java:
##########
@@ -32,7 +32,7 @@
* Hudi source scan context.
*/
@Internal
-public class ScanContext implements Serializable {
+public class HoodieScanContext implements Serializable {
Review Comment:
pls add class docs to describe the class so it can be understood and distinguished easily from the other scan context. explain the other class more in class docs as well if necessary
--
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] feat: enable new Hoodie source in HoodieTableSource [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #18022:
URL: https://github.com/apache/hudi/pull/18022#issuecomment-3815355084
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "e224a910d9578fcfe16962df532f6324fa6bc7e5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11446",
"triggerID" : "e224a910d9578fcfe16962df532f6324fa6bc7e5",
"triggerType" : "PUSH"
}, {
"hash" : "f0848719a25e24ab52f3a6b456696e0f58138aef",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11447",
"triggerID" : "f0848719a25e24ab52f3a6b456696e0f58138aef",
"triggerType" : "PUSH"
}, {
"hash" : "a58b200f1bd4156ac7e92dccbfb800df3b263c60",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11455",
"triggerID" : "a58b200f1bd4156ac7e92dccbfb800df3b263c60",
"triggerType" : "PUSH"
}, {
"hash" : "46ce30f6ab523fa2df0045091bf0fc45393a23bf",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "46ce30f6ab523fa2df0045091bf0fc45393a23bf",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* a58b200f1bd4156ac7e92dccbfb800df3b263c60 Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11455)
* 46ce30f6ab523fa2df0045091bf0fc45393a23bf 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] feat: enable new Hoodie source in HoodieTableSource [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #18022:
URL: https://github.com/apache/hudi/pull/18022#issuecomment-3815418857
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "e224a910d9578fcfe16962df532f6324fa6bc7e5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11446",
"triggerID" : "e224a910d9578fcfe16962df532f6324fa6bc7e5",
"triggerType" : "PUSH"
}, {
"hash" : "f0848719a25e24ab52f3a6b456696e0f58138aef",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11447",
"triggerID" : "f0848719a25e24ab52f3a6b456696e0f58138aef",
"triggerType" : "PUSH"
}, {
"hash" : "a58b200f1bd4156ac7e92dccbfb800df3b263c60",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11455",
"triggerID" : "a58b200f1bd4156ac7e92dccbfb800df3b263c60",
"triggerType" : "PUSH"
}, {
"hash" : "46ce30f6ab523fa2df0045091bf0fc45393a23bf",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11479",
"triggerID" : "46ce30f6ab523fa2df0045091bf0fc45393a23bf",
"triggerType" : "PUSH"
}, {
"hash" : "44882f3346e4361ab9b5aa04d31f43b8a7e1a223",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "44882f3346e4361ab9b5aa04d31f43b8a7e1a223",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 46ce30f6ab523fa2df0045091bf0fc45393a23bf Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11479)
* 44882f3346e4361ab9b5aa04d31f43b8a7e1a223 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] feat: enable new Hoodie source in HoodieTableSource [hudi]
Posted by "HuangZhenQiu (via GitHub)" <gi...@apache.org>.
HuangZhenQiu commented on code in PR #18022:
URL: https://github.com/apache/hudi/pull/18022#discussion_r2738544148
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/source/HoodieScanContext.java:
##########
@@ -32,7 +32,7 @@
* Hudi source scan context.
*/
@Internal
-public class ScanContext implements Serializable {
+public class HoodieScanContext implements Serializable {
Review Comment:
Do the change to distinguish the HoodieScanContext with org.apache.flink.table.connector.source.ScaneContext
--
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] feat: enable new Hoodie source in HoodieTableSource [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #18022:
URL: https://github.com/apache/hudi/pull/18022#issuecomment-3815365194
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "e224a910d9578fcfe16962df532f6324fa6bc7e5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11446",
"triggerID" : "e224a910d9578fcfe16962df532f6324fa6bc7e5",
"triggerType" : "PUSH"
}, {
"hash" : "f0848719a25e24ab52f3a6b456696e0f58138aef",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11447",
"triggerID" : "f0848719a25e24ab52f3a6b456696e0f58138aef",
"triggerType" : "PUSH"
}, {
"hash" : "a58b200f1bd4156ac7e92dccbfb800df3b263c60",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11455",
"triggerID" : "a58b200f1bd4156ac7e92dccbfb800df3b263c60",
"triggerType" : "PUSH"
}, {
"hash" : "46ce30f6ab523fa2df0045091bf0fc45393a23bf",
"status" : "PENDING",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11479",
"triggerID" : "46ce30f6ab523fa2df0045091bf0fc45393a23bf",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* a58b200f1bd4156ac7e92dccbfb800df3b263c60 Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11455)
* 46ce30f6ab523fa2df0045091bf0fc45393a23bf Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11479)
<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] feat: enable new Hoodie source in HoodieTableSource [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #18022:
URL: https://github.com/apache/hudi/pull/18022#issuecomment-3813381543
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "e224a910d9578fcfe16962df532f6324fa6bc7e5",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11446",
"triggerID" : "e224a910d9578fcfe16962df532f6324fa6bc7e5",
"triggerType" : "PUSH"
}, {
"hash" : "f0848719a25e24ab52f3a6b456696e0f58138aef",
"status" : "PENDING",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11447",
"triggerID" : "f0848719a25e24ab52f3a6b456696e0f58138aef",
"triggerType" : "PUSH"
}, {
"hash" : "a58b200f1bd4156ac7e92dccbfb800df3b263c60",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "a58b200f1bd4156ac7e92dccbfb800df3b263c60",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* e224a910d9578fcfe16962df532f6324fa6bc7e5 Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11446)
* f0848719a25e24ab52f3a6b456696e0f58138aef Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11447)
* a58b200f1bd4156ac7e92dccbfb800df3b263c60 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] feat: enable new Hoodie source in HoodieTableSource [hudi]
Posted by "HuangZhenQiu (via GitHub)" <gi...@apache.org>.
HuangZhenQiu commented on code in PR #18022:
URL: https://github.com/apache/hudi/pull/18022#discussion_r2744305282
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/table/HoodieTableSource.java:
##########
@@ -221,32 +231,117 @@ public DataStream<RowData> produceDataStream(StreamExecutionEnvironment execEnv)
TypeInformation<RowData> typeInfo =
(TypeInformation<RowData>) TypeInfoDataTypeConverter.fromDataTypeToTypeInfo(getProducedDataType());
OptionsInference.setupSourceTasks(conf, execEnv.getParallelism());
- if (conf.get(FlinkOptions.READ_AS_STREAMING)) {
- StreamReadMonitoringFunction monitoringFunction = new StreamReadMonitoringFunction(
- conf, FilePathUtils.toFlinkPath(path), tableRowType, maxCompactionMemoryInBytes, partitionPruner);
- InputFormat<RowData, ?> inputFormat = getInputFormat(true);
- OneInputStreamOperatorFactory<MergeOnReadInputSplit, RowData> factory = StreamReadOperator.factory((MergeOnReadInputFormat) inputFormat);
- SingleOutputStreamOperator<MergeOnReadInputSplit> monitorOperatorStream = execEnv.addSource(monitoringFunction, getSourceOperatorName("split_monitor"))
- .uid(Pipelines.opUID("split_monitor", conf))
- .setParallelism(1)
- .setMaxParallelism(1);
-
- DataStream<MergeOnReadInputSplit> sourceWithKey = addFileDistributionStrategy(monitorOperatorStream);
-
- SingleOutputStreamOperator<RowData> streamReadSource = sourceWithKey
- .transform("split_reader", typeInfo, factory)
- .uid(Pipelines.opUID("split_reader", conf))
- .setParallelism(conf.get(FlinkOptions.READ_TASKS));
- return new DataStreamSource<>(streamReadSource);
+
+ if (conf.get(FlinkOptions.READ_SOURCE_V2_ENABLED)) {
+ return produceNewSourceDataStream(execEnv);
} else {
- InputFormatSourceFunctionAdapter<RowData> func = new InputFormatSourceFunctionAdapter<>(getInputFormat(), typeInfo);
- DataStreamSource<RowData> source = execEnv.addSource(func, asSummaryString(), typeInfo);
- return source.name(getSourceOperatorName("bounded_source")).setParallelism(conf.get(FlinkOptions.READ_TASKS));
+ return produceLegacySourceDataStream(execEnv, typeInfo);
}
}
};
}
+ /**
+ * Produces a DataStream using the new FLIP-27 HoodieSource.
+ *
+ * @param execEnv the stream execution environment
+ * @return the configured DataStream
+ */
+ private DataStream<RowData> produceNewSourceDataStream(StreamExecutionEnvironment execEnv) {
+ HoodieSource<RowData> hoodieSource = createHoodieSource();
+ DataStreamSource<RowData> source = execEnv.fromSource(
+ hoodieSource, WatermarkStrategy.noWatermarks(), "hudi_source");
+ return source.name(getSourceOperatorName("hudi_source")).uid(Pipelines.opUID("hudi_source", conf)).setParallelism(conf.get(FlinkOptions.READ_TASKS));
+ }
+
+ /**
+ * Produces a DataStream using the legacy source implementation.
+ *
+ * @param execEnv the stream execution environment
+ * @param typeInfo type information for RowData
+ * @return the configured DataStream
+ */
+ private DataStream<RowData> produceLegacySourceDataStream(
+ StreamExecutionEnvironment execEnv,
+ TypeInformation<RowData> typeInfo) {
+ if (conf.get(FlinkOptions.READ_AS_STREAMING)) {
+ StreamReadMonitoringFunction monitoringFunction = new StreamReadMonitoringFunction(
+ conf, FilePathUtils.toFlinkPath(path), tableRowType, maxCompactionMemoryInBytes, partitionPruner);
+ InputFormat<RowData, ?> inputFormat = getInputFormat(true);
+ OneInputStreamOperatorFactory<MergeOnReadInputSplit, RowData> factory = StreamReadOperator.factory((MergeOnReadInputFormat) inputFormat);
+ SingleOutputStreamOperator<MergeOnReadInputSplit> monitorOperatorStream = execEnv.addSource(monitoringFunction, getSourceOperatorName("split_monitor"))
+ .uid(Pipelines.opUID("split_monitor", conf))
+ .setParallelism(1)
+ .setMaxParallelism(1);
+
+ DataStream<MergeOnReadInputSplit> sourceWithKey = addFileDistributionStrategy(monitorOperatorStream);
Review Comment:
[#18053](https://github.com/apache/hudi/issues/18053)
--
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] feat: enable new Hoodie source in HoodieTableSource [hudi]
Posted by "HuangZhenQiu (via GitHub)" <gi...@apache.org>.
HuangZhenQiu commented on code in PR #18022:
URL: https://github.com/apache/hudi/pull/18022#discussion_r2744301255
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/table/HoodieTableSource.java:
##########
@@ -221,32 +231,117 @@ public DataStream<RowData> produceDataStream(StreamExecutionEnvironment execEnv)
TypeInformation<RowData> typeInfo =
(TypeInformation<RowData>) TypeInfoDataTypeConverter.fromDataTypeToTypeInfo(getProducedDataType());
OptionsInference.setupSourceTasks(conf, execEnv.getParallelism());
- if (conf.get(FlinkOptions.READ_AS_STREAMING)) {
- StreamReadMonitoringFunction monitoringFunction = new StreamReadMonitoringFunction(
- conf, FilePathUtils.toFlinkPath(path), tableRowType, maxCompactionMemoryInBytes, partitionPruner);
- InputFormat<RowData, ?> inputFormat = getInputFormat(true);
- OneInputStreamOperatorFactory<MergeOnReadInputSplit, RowData> factory = StreamReadOperator.factory((MergeOnReadInputFormat) inputFormat);
- SingleOutputStreamOperator<MergeOnReadInputSplit> monitorOperatorStream = execEnv.addSource(monitoringFunction, getSourceOperatorName("split_monitor"))
- .uid(Pipelines.opUID("split_monitor", conf))
- .setParallelism(1)
- .setMaxParallelism(1);
-
- DataStream<MergeOnReadInputSplit> sourceWithKey = addFileDistributionStrategy(monitorOperatorStream);
-
- SingleOutputStreamOperator<RowData> streamReadSource = sourceWithKey
- .transform("split_reader", typeInfo, factory)
- .uid(Pipelines.opUID("split_reader", conf))
- .setParallelism(conf.get(FlinkOptions.READ_TASKS));
- return new DataStreamSource<>(streamReadSource);
+
+ if (conf.get(FlinkOptions.READ_SOURCE_V2_ENABLED)) {
+ return produceNewSourceDataStream(execEnv);
} else {
- InputFormatSourceFunctionAdapter<RowData> func = new InputFormatSourceFunctionAdapter<>(getInputFormat(), typeInfo);
- DataStreamSource<RowData> source = execEnv.addSource(func, asSummaryString(), typeInfo);
- return source.name(getSourceOperatorName("bounded_source")).setParallelism(conf.get(FlinkOptions.READ_TASKS));
+ return produceLegacySourceDataStream(execEnv, typeInfo);
}
}
};
}
+ /**
+ * Produces a DataStream using the new FLIP-27 HoodieSource.
+ *
+ * @param execEnv the stream execution environment
+ * @return the configured DataStream
+ */
+ private DataStream<RowData> produceNewSourceDataStream(StreamExecutionEnvironment execEnv) {
+ HoodieSource<RowData> hoodieSource = createHoodieSource();
+ DataStreamSource<RowData> source = execEnv.fromSource(
+ hoodieSource, WatermarkStrategy.noWatermarks(), "hudi_source");
+ return source.name(getSourceOperatorName("hudi_source")).uid(Pipelines.opUID("hudi_source", conf)).setParallelism(conf.get(FlinkOptions.READ_TASKS));
+ }
+
+ /**
+ * Produces a DataStream using the legacy source implementation.
+ *
+ * @param execEnv the stream execution environment
+ * @param typeInfo type information for RowData
+ * @return the configured DataStream
+ */
+ private DataStream<RowData> produceLegacySourceDataStream(
+ StreamExecutionEnvironment execEnv,
+ TypeInformation<RowData> typeInfo) {
+ if (conf.get(FlinkOptions.READ_AS_STREAMING)) {
+ StreamReadMonitoringFunction monitoringFunction = new StreamReadMonitoringFunction(
+ conf, FilePathUtils.toFlinkPath(path), tableRowType, maxCompactionMemoryInBytes, partitionPruner);
Review Comment:
Will handle it in a follow PR [#18052](https://github.com/apache/hudi/issues/18052)
--
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] feat: enable new Hoodie source in HoodieTableSource [hudi]
Posted by "xushiyan (via GitHub)" <gi...@apache.org>.
xushiyan commented on code in PR #18022:
URL: https://github.com/apache/hudi/pull/18022#discussion_r2744073038
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/source/HoodieSource.java:
##########
@@ -55,20 +55,25 @@
import java.util.stream.Collectors;
/**
- * Hoodie Source implementation.
- * @param <T> record Type
+ * Hoodie FLIP-27 Source implementation for Flink streaming and batch reads.
Review Comment:
What is the proper name for the FLIP-27 Source API? let's use a proper name, surely we don't want to keep referring to a FLIP number :)
--
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] feat: enable new Hoodie source in HoodieTableSource [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #18022:
URL: https://github.com/apache/hudi/pull/18022#issuecomment-3815970934
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "e224a910d9578fcfe16962df532f6324fa6bc7e5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11446",
"triggerID" : "e224a910d9578fcfe16962df532f6324fa6bc7e5",
"triggerType" : "PUSH"
}, {
"hash" : "f0848719a25e24ab52f3a6b456696e0f58138aef",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11447",
"triggerID" : "f0848719a25e24ab52f3a6b456696e0f58138aef",
"triggerType" : "PUSH"
}, {
"hash" : "a58b200f1bd4156ac7e92dccbfb800df3b263c60",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11455",
"triggerID" : "a58b200f1bd4156ac7e92dccbfb800df3b263c60",
"triggerType" : "PUSH"
}, {
"hash" : "46ce30f6ab523fa2df0045091bf0fc45393a23bf",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11479",
"triggerID" : "46ce30f6ab523fa2df0045091bf0fc45393a23bf",
"triggerType" : "PUSH"
}, {
"hash" : "44882f3346e4361ab9b5aa04d31f43b8a7e1a223",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11486",
"triggerID" : "44882f3346e4361ab9b5aa04d31f43b8a7e1a223",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 44882f3346e4361ab9b5aa04d31f43b8a7e1a223 Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11486)
<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] feat: enable new Hoodie source in HoodieTableSource [hudi]
Posted by "xushiyan (via GitHub)" <gi...@apache.org>.
xushiyan commented on code in PR #18022:
URL: https://github.com/apache/hudi/pull/18022#discussion_r2744133062
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/configuration/FlinkOptions.java:
##########
@@ -440,6 +440,12 @@ public class FlinkOptions extends HoodieConfig {
+ "the avg read splits number per-second would be 'read.splits.limit'/'read.streaming.check-interval', by "
+ "default no limit");
+ public static final ConfigOption<Boolean> READ_NEW_SOURCE_ENABLED = ConfigOptions
+ .key("read.new-source.enabled")
+ .booleanType()
+ .defaultValue(false)
+ .withDescription("Whether to use Flink FLIP27 new source to consume data files.");
Review Comment:
yea source v2 sounds good.
--
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] feat: enable new Hoodie source in HoodieTableSource [hudi]
Posted by "HuangZhenQiu (via GitHub)" <gi...@apache.org>.
HuangZhenQiu commented on code in PR #18022:
URL: https://github.com/apache/hudi/pull/18022#discussion_r2744312258
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/table/HoodieTableSource.java:
##########
@@ -221,32 +231,117 @@ public DataStream<RowData> produceDataStream(StreamExecutionEnvironment execEnv)
TypeInformation<RowData> typeInfo =
(TypeInformation<RowData>) TypeInfoDataTypeConverter.fromDataTypeToTypeInfo(getProducedDataType());
OptionsInference.setupSourceTasks(conf, execEnv.getParallelism());
- if (conf.get(FlinkOptions.READ_AS_STREAMING)) {
- StreamReadMonitoringFunction monitoringFunction = new StreamReadMonitoringFunction(
- conf, FilePathUtils.toFlinkPath(path), tableRowType, maxCompactionMemoryInBytes, partitionPruner);
- InputFormat<RowData, ?> inputFormat = getInputFormat(true);
- OneInputStreamOperatorFactory<MergeOnReadInputSplit, RowData> factory = StreamReadOperator.factory((MergeOnReadInputFormat) inputFormat);
- SingleOutputStreamOperator<MergeOnReadInputSplit> monitorOperatorStream = execEnv.addSource(monitoringFunction, getSourceOperatorName("split_monitor"))
- .uid(Pipelines.opUID("split_monitor", conf))
- .setParallelism(1)
- .setMaxParallelism(1);
-
- DataStream<MergeOnReadInputSplit> sourceWithKey = addFileDistributionStrategy(monitorOperatorStream);
-
- SingleOutputStreamOperator<RowData> streamReadSource = sourceWithKey
- .transform("split_reader", typeInfo, factory)
- .uid(Pipelines.opUID("split_reader", conf))
- .setParallelism(conf.get(FlinkOptions.READ_TASKS));
- return new DataStreamSource<>(streamReadSource);
+
+ if (conf.get(FlinkOptions.READ_SOURCE_V2_ENABLED)) {
+ return produceNewSourceDataStream(execEnv);
} else {
- InputFormatSourceFunctionAdapter<RowData> func = new InputFormatSourceFunctionAdapter<>(getInputFormat(), typeInfo);
- DataStreamSource<RowData> source = execEnv.addSource(func, asSummaryString(), typeInfo);
- return source.name(getSourceOperatorName("bounded_source")).setParallelism(conf.get(FlinkOptions.READ_TASKS));
+ return produceLegacySourceDataStream(execEnv, typeInfo);
}
}
};
}
+ /**
+ * Produces a DataStream using the new FLIP-27 HoodieSource.
+ *
+ * @param execEnv the stream execution environment
+ * @return the configured DataStream
+ */
+ private DataStream<RowData> produceNewSourceDataStream(StreamExecutionEnvironment execEnv) {
+ HoodieSource<RowData> hoodieSource = createHoodieSource();
+ DataStreamSource<RowData> source = execEnv.fromSource(
+ hoodieSource, WatermarkStrategy.noWatermarks(), "hudi_source");
+ return source.name(getSourceOperatorName("hudi_source")).uid(Pipelines.opUID("hudi_source", conf)).setParallelism(conf.get(FlinkOptions.READ_TASKS));
+ }
+
+ /**
+ * Produces a DataStream using the legacy source implementation.
+ *
+ * @param execEnv the stream execution environment
+ * @param typeInfo type information for RowData
+ * @return the configured DataStream
+ */
+ private DataStream<RowData> produceLegacySourceDataStream(
+ StreamExecutionEnvironment execEnv,
+ TypeInformation<RowData> typeInfo) {
+ if (conf.get(FlinkOptions.READ_AS_STREAMING)) {
+ StreamReadMonitoringFunction monitoringFunction = new StreamReadMonitoringFunction(
+ conf, FilePathUtils.toFlinkPath(path), tableRowType, maxCompactionMemoryInBytes, partitionPruner);
+ InputFormat<RowData, ?> inputFormat = getInputFormat(true);
+ OneInputStreamOperatorFactory<MergeOnReadInputSplit, RowData> factory = StreamReadOperator.factory((MergeOnReadInputFormat) inputFormat);
+ SingleOutputStreamOperator<MergeOnReadInputSplit> monitorOperatorStream = execEnv.addSource(monitoringFunction, getSourceOperatorName("split_monitor"))
+ .uid(Pipelines.opUID("split_monitor", conf))
+ .setParallelism(1)
+ .setMaxParallelism(1);
+
+ DataStream<MergeOnReadInputSplit> sourceWithKey = addFileDistributionStrategy(monitorOperatorStream);
+
+ SingleOutputStreamOperator<RowData> streamReadSource = sourceWithKey
+ .transform("split_reader", typeInfo, factory)
+ .uid(Pipelines.opUID("split_reader", conf))
+ .setParallelism(conf.get(FlinkOptions.READ_TASKS));
+ return new DataStreamSource<>(streamReadSource);
+ } else {
+ InputFormatSourceFunctionAdapter<RowData> func = new InputFormatSourceFunctionAdapter<>(getInputFormat(), typeInfo);
+ DataStreamSource<RowData> source = execEnv.addSource(func, asSummaryString(), typeInfo);
+ return source.name(getSourceOperatorName("bounded_source")).setParallelism(conf.get(FlinkOptions.READ_TASKS));
+ }
+ }
+
+ /**
+ * Creates a new Flink FLIP-27 HoodieSource for reading data from the Hudi table.
+ *
+ * @return the configured HoodieSource instance
+ */
+ private HoodieSource<RowData> createHoodieSource() {
+ ValidationUtils.checkState(metaClient != null, "MetaClient must be initialized before creating HoodieSource");
+ ValidationUtils.checkState(hadoopConf != null, "Hadoop configuration must be initialized");
+ ValidationUtils.checkState(conf != null, "Configuration must be initialized");
+
+ HoodieSchema tableSchema = !tableDataExists() ? inferSchemaFromDdl() : getTableSchema();
+ final DataType rowDataType = HoodieSchemaConverter.convertToDataType(tableSchema);
+ final RowType rowType = (RowType) rowDataType.getLogicalType();
+ final RowType requiredRowType = (RowType) getProducedDataType().notNull().getLogicalType();
+
+ HoodieScanContext context = createHoodieScanContext(rowType);
+ HoodieWriteConfig writeConfig = FlinkWriteClients.getHoodieClientConfig(conf, false, false);
+ HoodieFlinkEngineContext flinkEngineContext = new HoodieFlinkEngineContext(hadoopConf.unwrap());
+ HoodieFlinkTable<RowData> flinkTable = HoodieFlinkTable.create(writeConfig, flinkEngineContext);
+ FlinkReaderContextFactory readerContextFactory = new FlinkReaderContextFactory(metaClient);
+ HoodieSplitReaderFunction splitReaderFunction = new HoodieSplitReaderFunction(
+ flinkTable,
+ readerContextFactory.getContext(),
+ conf,
+ tableSchema,
+ HoodieSchemaConverter.convertToSchema(requiredRowType),
+ conf.get(FlinkOptions.MERGE_TYPE),
+ Option.empty());
+ return new HoodieSource<>(context, splitReaderFunction, new HoodieSourceSplitComparator(), metaClient, new HoodieRecordEmitter<>());
+ }
+
+ /**
+ * Creates a HoodieScanContext for configuring the scan operation.
+ *
+ * @param rowType the row type for the scan
+ * @return the configured HoodieScanContext instance
+ */
+ private HoodieScanContext createHoodieScanContext(RowType rowType) {
+ return new HoodieScanContext
+ .Builder()
+ .conf(conf)
+ .path(new Path(path.toUri().getPath()))
+ .cdcEnabled(conf.get(FlinkOptions.CDC_ENABLED))
+ .rowType(rowType)
+ .startInstant(conf.get(FlinkOptions.READ_START_COMMIT))
+ .endInstant(conf.get(FlinkOptions.READ_END_COMMIT))
+ .skipCompaction(conf.get(FlinkOptions.READ_STREAMING_SKIP_COMPACT))
+ .skipClustering(conf.get(FlinkOptions.READ_STREAMING_SKIP_CLUSTERING))
+ .skipInsertOverwrite(conf.get(FlinkOptions.READ_STREAMING_SKIP_INSERT_OVERWRITE))
+ .maxCompactionMemoryInBytes(conf.get(FlinkOptions.COMPACTION_MAX_MEMORY))
+ .isStreaming(conf.get(FlinkOptions.READ_AS_STREAMING))
+ .build();
Review Comment:
maxPendingSplits is not used for instant and split lookup.
--
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] feat: enable new Hoodie source in HoodieTableSource [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #18022:
URL: https://github.com/apache/hudi/pull/18022#issuecomment-3821387085
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "e224a910d9578fcfe16962df532f6324fa6bc7e5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11446",
"triggerID" : "e224a910d9578fcfe16962df532f6324fa6bc7e5",
"triggerType" : "PUSH"
}, {
"hash" : "f0848719a25e24ab52f3a6b456696e0f58138aef",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11447",
"triggerID" : "f0848719a25e24ab52f3a6b456696e0f58138aef",
"triggerType" : "PUSH"
}, {
"hash" : "a58b200f1bd4156ac7e92dccbfb800df3b263c60",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11455",
"triggerID" : "a58b200f1bd4156ac7e92dccbfb800df3b263c60",
"triggerType" : "PUSH"
}, {
"hash" : "46ce30f6ab523fa2df0045091bf0fc45393a23bf",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11479",
"triggerID" : "46ce30f6ab523fa2df0045091bf0fc45393a23bf",
"triggerType" : "PUSH"
}, {
"hash" : "44882f3346e4361ab9b5aa04d31f43b8a7e1a223",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11486",
"triggerID" : "44882f3346e4361ab9b5aa04d31f43b8a7e1a223",
"triggerType" : "PUSH"
}, {
"hash" : "8119132f42784901c19c81839c7c7878ee8600ca",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11522",
"triggerID" : "8119132f42784901c19c81839c7c7878ee8600ca",
"triggerType" : "PUSH"
}, {
"hash" : "ff004b3ffec752c9fd54af6751d4cf7eeb4ce1bc",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "ff004b3ffec752c9fd54af6751d4cf7eeb4ce1bc",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 8119132f42784901c19c81839c7c7878ee8600ca Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11522)
* ff004b3ffec752c9fd54af6751d4cf7eeb4ce1bc 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] feat: enable new Hoodie source in HoodieTableSource [hudi]
Posted by "HuangZhenQiu (via GitHub)" <gi...@apache.org>.
HuangZhenQiu commented on PR #18022:
URL: https://github.com/apache/hudi/pull/18022#issuecomment-3821387724
@xushiyan Thanks for providing feedback for the class comment and readability. For the partition pruner and distribution strategy of split, created follow issues to resolve.
--
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] feat: enable new Hoodie source in HoodieTableSource [hudi]
Posted by "HuangZhenQiu (via GitHub)" <gi...@apache.org>.
HuangZhenQiu commented on code in PR #18022:
URL: https://github.com/apache/hudi/pull/18022#discussion_r2744154021
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/source/HoodieSource.java:
##########
@@ -55,20 +55,25 @@
import java.util.stream.Collectors;
/**
- * Hoodie Source implementation.
- * @param <T> record Type
+ * Hoodie FLIP-27 Source implementation for Flink streaming and batch reads.
+ *
+ * <p>This source supports both bounded (batch) and unbounded (streaming) modes
+ * based on the configuration. It uses Flink's new Source API (FLIP-27) to
Review Comment:
Please replace them with Source V2 and @see FLIP-27 link for better reference.
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/source/HoodieSource.java:
##########
@@ -55,20 +55,25 @@
import java.util.stream.Collectors;
/**
- * Hoodie Source implementation.
- * @param <T> record Type
+ * Hoodie FLIP-27 Source implementation for Flink streaming and batch reads.
+ *
+ * <p>This source supports both bounded (batch) and unbounded (streaming) modes
+ * based on the configuration. It uses Flink's new Source API (FLIP-27) to
Review Comment:
Will replace them with Source V2 and @see FLIP-27 link for better reference.
--
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