You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "JingsongLi (via GitHub)" <gi...@apache.org> on 2023/05/25 06:35:54 UTC
[GitHub] [incubator-paimon] JingsongLi opened a new pull request, #1230: [flink] Respect scan.parallelism whatever the case
JingsongLi opened a new pull request, #1230:
URL: https://github.com/apache/incubator-paimon/pull/1230
<!-- Please specify the module before the PR name: [core] ... or [flink] ... -->
### Purpose
<!-- What is the purpose of the change, or the associated issue -->
Respect scan.parallelism, this is user-specified and should be the first priority
### Tests
<!-- List UT and IT cases to verify this change -->
### API and Format
<!-- Does this change affect API or storage format -->
### Documentation
<!-- Does this change introduce a new feature -->
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-paimon] JingsongLi commented on a diff in pull request #1230: [flink] Respect scan.parallelism whatever the case
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on code in PR #1230:
URL: https://github.com/apache/incubator-paimon/pull/1230#discussion_r1206318783
##########
paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/source/AbstractDataTableSource.java:
##########
@@ -214,7 +214,7 @@ private DataStream<RowData> configureSource(
FlinkSourceBuilder sourceBuilder, StreamExecutionEnvironment env) {
Options options = Options.fromMap(this.table.options());
Integer parallelism = options.get(FlinkConnectorOptions.SCAN_PARALLELISM);
- if (options.get(FlinkConnectorOptions.INFER_SCAN_PARALLELISM)) {
+ if (parallelism == null && options.get(FlinkConnectorOptions.INFER_SCAN_PARALLELISM)) {
Review Comment:
Yes, let this behavior explained by Flink.
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-paimon] JingsongLi merged pull request #1230: [flink] Respect scan.parallelism whatever the case
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi merged PR #1230:
URL: https://github.com/apache/incubator-paimon/pull/1230
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-paimon] reswqa commented on a diff in pull request #1230: [flink] Respect scan.parallelism whatever the case
Posted by "reswqa (via GitHub)" <gi...@apache.org>.
reswqa commented on code in PR #1230:
URL: https://github.com/apache/incubator-paimon/pull/1230#discussion_r1205805294
##########
paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/source/AbstractDataTableSource.java:
##########
@@ -214,7 +214,7 @@ private DataStream<RowData> configureSource(
FlinkSourceBuilder sourceBuilder, StreamExecutionEnvironment env) {
Options options = Options.fromMap(this.table.options());
Integer parallelism = options.get(FlinkConnectorOptions.SCAN_PARALLELISM);
- if (options.get(FlinkConnectorOptions.INFER_SCAN_PARALLELISM)) {
+ if (parallelism == null && options.get(FlinkConnectorOptions.INFER_SCAN_PARALLELISM)) {
Review Comment:
It seems that we did not perform boundary check(e.g. `>0`) on `parallelism`. If `SCAN_PARALLELISM` is set to `-1`, `OperatorValidationUtils.validateParallelism` will not reject it because it is equal to `ExecutionConfig.PARALLELISM_DEFAULT`, which may cause some confusion. But it can always be argued that this is the behavior supported by `flink` (`-1` is considered the default parallelism). Just a comment, maybe not do this check here is exactly the right one. 🤔
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-paimon] JingsongLi closed pull request #1230: [flink] Respect scan.parallelism whatever the case
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi closed pull request #1230: [flink] Respect scan.parallelism whatever the case
URL: https://github.com/apache/incubator-paimon/pull/1230
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-paimon] reswqa commented on a diff in pull request #1230: [flink] Respect scan.parallelism whatever the case
Posted by "reswqa (via GitHub)" <gi...@apache.org>.
reswqa commented on code in PR #1230:
URL: https://github.com/apache/incubator-paimon/pull/1230#discussion_r1205805294
##########
paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/source/AbstractDataTableSource.java:
##########
@@ -214,7 +214,7 @@ private DataStream<RowData> configureSource(
FlinkSourceBuilder sourceBuilder, StreamExecutionEnvironment env) {
Options options = Options.fromMap(this.table.options());
Integer parallelism = options.get(FlinkConnectorOptions.SCAN_PARALLELISM);
- if (options.get(FlinkConnectorOptions.INFER_SCAN_PARALLELISM)) {
+ if (parallelism == null && options.get(FlinkConnectorOptions.INFER_SCAN_PARALLELISM)) {
Review Comment:
It seems that we did not perform boundary check(e.g. `>0`) on `parallelism`. If `SCAN_PARALLELISM` is set to `-1`, `OperatorValidationUtils.validateParallelism` will not reject it because it is equal to `ExecutionConfig.PARALLELISM_DEFAULT`, which may cause some confusion. But it can always be argued that this is the behavior supported by `flink` (-1 is considered the default parallelism). Just a comment, maybe not do this check here is exactly the right one. 🤔
##########
paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/ReadWriteTableITCase.java:
##########
@@ -1213,10 +1213,10 @@ public void testInferParallelism() throws Exception {
new HashMap<String, String>() {
{
put(INFER_SCAN_PARALLELISM.key(), "true");
- put(SCAN_PARALLELISM.key(), "-1");
Review Comment:
Perhaps we should keep this case and assert that it will throw an `IllegalArgumentException`. But `-1` should be changed to another illegal value (such as `-2`), as explained in the previous comment.
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org