You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "beliefer (via GitHub)" <gi...@apache.org> on 2025/04/09 08:25:31 UTC
[PR] [FLINK-37638] Avoid duplicate call on getEffectiveConfiguration [flink]
beliefer opened a new pull request, #26428:
URL: https://github.com/apache/flink/pull/26428
## What is the purpose of the change
This PR aims to avoid duplicate call on `getEffectiveConfiguration`.
The code of `getEffectiveConfiguration` show below, I think it has a lot of overhead.
```
private Configuration getEffectiveConfiguration(
final CustomCommandLine activeCustomCommandLine, final CommandLine commandLine)
throws FlinkException {
final Configuration effectiveConfiguration = new Configuration(configuration);
final Configuration commandLineConfiguration =
checkNotNull(activeCustomCommandLine).toConfiguration(commandLine);
effectiveConfiguration.addAll(commandLineConfiguration);
return effectiveConfiguration;
}
```
## Brief change log
Avoid duplicate call on `getEffectiveConfiguration`.
## Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): (no)
- The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (no)
- The serializers: (no)
- The runtime per-record code paths (performance sensitive): (no)
- Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (no)
- The S3 file system connector: (no)
## Documentation
- Does this pull request introduce a new feature? (no)
--
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@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-37638] Avoid duplicate call on getEffectiveConfiguration [flink]
Posted by "ferenc-csaky (via GitHub)" <gi...@apache.org>.
ferenc-csaky commented on code in PR #26428:
URL: https://github.com/apache/flink/pull/26428#discussion_r2040031414
##########
flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java:
##########
@@ -301,14 +296,9 @@ private Configuration getEffectiveConfiguration(
}
private <T> Configuration getEffectiveConfiguration(
- final CustomCommandLine activeCustomCommandLine,
- final CommandLine commandLine,
+ final Configuration effectiveConfiguration,
Review Comment:
I think we should rename this method to `updateEffectiveConfiguration`, cause it refers better to what it does with the changed logic.
A difference worth mentioning is that now it mutates the passed `effectiveConfigration`, so even if you declare a `Configuration` object `final`, calling this method on it will change its state, which is a new behavior compared to how it was before. Example:
```java
final Configuration conf = getEffectiveConfiguration(...);
updateEffectiveConfiguration(conf, ...);
// ^ after this call `conf` will probably not be the same.
```
--
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@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-37638] Avoid duplicate call on getEffectiveConfiguration [flink]
Posted by "beliefer (via GitHub)" <gi...@apache.org>.
beliefer commented on PR #26428:
URL: https://github.com/apache/flink/pull/26428#issuecomment-2791500611
@flinkbot run azure
--
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@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-37638] Avoid duplicate call on getEffectiveConfiguration [flink]
Posted by "beliefer (via GitHub)" <gi...@apache.org>.
beliefer commented on PR #26428:
URL: https://github.com/apache/flink/pull/26428#issuecomment-2789623058
@flinkbot run azure
--
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@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-37638] Avoid duplicate call on getEffectiveConfiguration [flink]
Posted by "flinkbot (via GitHub)" <gi...@apache.org>.
flinkbot commented on PR #26428:
URL: https://github.com/apache/flink/pull/26428#issuecomment-2788829143
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "55ec34348cd901aae8e782fb11e8698c0b92fe43",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "55ec34348cd901aae8e782fb11e8698c0b92fe43",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 55ec34348cd901aae8e782fb11e8698c0b92fe43 UNKNOWN
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot 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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-37638] Avoid duplicate call on getEffectiveConfiguration [flink]
Posted by "beliefer (via GitHub)" <gi...@apache.org>.
beliefer commented on PR #26428:
URL: https://github.com/apache/flink/pull/26428#issuecomment-2795928329
ping @ferenc-csaky @kl0u @wangyang0918 cc @1996fanrui @davidradl @GOODBOY008
--
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@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-37638] Avoid duplicate call on getEffectiveConfiguration [flink]
Posted by "ferenc-csaky (via GitHub)" <gi...@apache.org>.
ferenc-csaky merged PR #26428:
URL: https://github.com/apache/flink/pull/26428
--
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@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-37638] Avoid duplicate call on getEffectiveConfiguration [flink]
Posted by "beliefer (via GitHub)" <gi...@apache.org>.
beliefer commented on PR #26428:
URL: https://github.com/apache/flink/pull/26428#issuecomment-2803922439
@ferenc-csaky @davidradl Thank you!
--
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@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-37638] Avoid duplicate call on getEffectiveConfiguration [flink]
Posted by "beliefer (via GitHub)" <gi...@apache.org>.
beliefer commented on code in PR #26428:
URL: https://github.com/apache/flink/pull/26428#discussion_r2041306536
##########
flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java:
##########
@@ -301,14 +296,9 @@ private Configuration getEffectiveConfiguration(
}
private <T> Configuration getEffectiveConfiguration(
- final CustomCommandLine activeCustomCommandLine,
- final CommandLine commandLine,
+ final Configuration effectiveConfiguration,
Review Comment:
Thank you for the suggestion.
--
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@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org