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/03/27 12:59:31 UTC
[PR] [hotfix] Simplify the calling on addShutdownHook [flink]
beliefer opened a new pull request, #26363:
URL: https://github.com/apache/flink/pull/26363
## What is the purpose of the change
This PR proposes to simplify the calling on `addShutdownHook`.
## Brief change log
Simplify the calling on `addShutdownHook`.
## 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] [hotfix] Simplify the calling on addShutdownHook [flink]
Posted by "davidradl (via GitHub)" <gi...@apache.org>.
davidradl commented on code in PR #26363:
URL: https://github.com/apache/flink/pull/26363#discussion_r2026940790
##########
flink-runtime/src/test/java/org/apache/flink/runtime/io/disk/FileChannelManagerImplTest.java:
##########
@@ -211,7 +211,7 @@ public static void main(String[] args) throws Exception {
if (callerHasHook) {
// Verifies the case that both FileChannelManager and its upper component
// have registered shutdown hooks, like in IOManager.
- ShutdownHookUtil.addShutdownHook(() -> manager.close(), "Caller", LOG);
+ ShutdownHookUtil.addShutdownHook(manager, "Caller", LOG);
Review Comment:
sorry. The changed code is in method ```
public IOManagerAsync(String[] tempDirs, ExecutorService executorService) {
super(tempDirs, executorService);
```
So to test this we need to drive this method. I think you have a test that tests the same pattern but not the actual changed code.
--
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] [hotfix] Simplify the calling on addShutdownHook [flink]
Posted by "davidradl (via GitHub)" <gi...@apache.org>.
davidradl commented on code in PR #26363:
URL: https://github.com/apache/flink/pull/26363#discussion_r2016938502
##########
flink-runtime/src/test/java/org/apache/flink/runtime/io/disk/FileChannelManagerImplTest.java:
##########
@@ -211,7 +211,7 @@ public static void main(String[] args) throws Exception {
if (callerHasHook) {
// Verifies the case that both FileChannelManager and its upper component
// have registered shutdown hooks, like in IOManager.
- ShutdownHookUtil.addShutdownHook(() -> manager.close(), "Caller", LOG);
+ ShutdownHookUtil.addShutdownHook(manager, "Caller", LOG);
Review Comment:
I don't think this test drives the changed code.
--
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] [hotfix] Simplify the calling on addShutdownHook [flink]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #26363:
URL: https://github.com/apache/flink/pull/26363#issuecomment-4369005274
This PR is being marked as stale since it has not had any activity in the last 90 days.
If you would like to keep this PR alive, please leave a comment asking for a review.
If the PR has merge conflicts, update it with the latest from the base branch.
If you are having difficulty finding a reviewer, please reach out to the
community, contact details can be found here: https://flink.apache.org/what-is-flink/community/
If this PR is no longer valid or desired, please feel free to close it.
If no activity occurs in the next 30 days, it will be automatically closed.
--
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] [hotfix] Simplify the calling on addShutdownHook [flink]
Posted by "beliefer (via GitHub)" <gi...@apache.org>.
beliefer commented on PR #26363:
URL: https://github.com/apache/flink/pull/26363#issuecomment-2757951679
ping @StefanRRichter 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] [hotfix] Simplify the calling on addShutdownHook [flink]
Posted by "beliefer (via GitHub)" <gi...@apache.org>.
beliefer commented on code in PR #26363:
URL: https://github.com/apache/flink/pull/26363#discussion_r2017829668
##########
flink-runtime/src/test/java/org/apache/flink/runtime/io/disk/FileChannelManagerImplTest.java:
##########
@@ -211,7 +211,7 @@ public static void main(String[] args) throws Exception {
if (callerHasHook) {
// Verifies the case that both FileChannelManager and its upper component
// have registered shutdown hooks, like in IOManager.
- ShutdownHookUtil.addShutdownHook(() -> manager.close(), "Caller", LOG);
+ ShutdownHookUtil.addShutdownHook(manager, "Caller", LOG);
Review Comment:
I don't understand what you said. Could you tell me more?
--
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] [hotfix] Simplify the calling on addShutdownHook [flink]
Posted by "davidradl (via GitHub)" <gi...@apache.org>.
davidradl commented on code in PR #26363:
URL: https://github.com/apache/flink/pull/26363#discussion_r2026940790
##########
flink-runtime/src/test/java/org/apache/flink/runtime/io/disk/FileChannelManagerImplTest.java:
##########
@@ -211,7 +211,7 @@ public static void main(String[] args) throws Exception {
if (callerHasHook) {
// Verifies the case that both FileChannelManager and its upper component
// have registered shutdown hooks, like in IOManager.
- ShutdownHookUtil.addShutdownHook(() -> manager.close(), "Caller", LOG);
+ ShutdownHookUtil.addShutdownHook(manager, "Caller", LOG);
Review Comment:
sorry. The changed code is in method ```
public IOManagerAsync(String[] tempDirs, ExecutorService executorService) {
super(tempDirs, executorService);
```
So to test this we need to drive this method. I think you have a test that tests the same pattern but not the actual changed code.
am I missing something?
--
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] [hotfix] Simplify the calling on addShutdownHook [flink]
Posted by "flinkbot (via GitHub)" <gi...@apache.org>.
flinkbot commented on PR #26363:
URL: https://github.com/apache/flink/pull/26363#issuecomment-2758081081
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "104fa6b050b01dabb83549f4bd8c91176d6a5598",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "104fa6b050b01dabb83549f4bd8c91176d6a5598",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 104fa6b050b01dabb83549f4bd8c91176d6a5598 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] [hotfix] Simplify the calling on addShutdownHook [flink]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #26363:
URL: https://github.com/apache/flink/pull/26363#issuecomment-4610279174
This PR has been closed since it has not had any activity in 120 days.
If you feel like this was a mistake, or you would like to continue working on it,
please feel free to re-open the PR and ask for a review.
--
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] [hotfix] Simplify the calling on addShutdownHook [flink]
Posted by "davidradl (via GitHub)" <gi...@apache.org>.
davidradl commented on code in PR #26363:
URL: https://github.com/apache/flink/pull/26363#discussion_r2026940790
##########
flink-runtime/src/test/java/org/apache/flink/runtime/io/disk/FileChannelManagerImplTest.java:
##########
@@ -211,7 +211,7 @@ public static void main(String[] args) throws Exception {
if (callerHasHook) {
// Verifies the case that both FileChannelManager and its upper component
// have registered shutdown hooks, like in IOManager.
- ShutdownHookUtil.addShutdownHook(() -> manager.close(), "Caller", LOG);
+ ShutdownHookUtil.addShutdownHook(manager, "Caller", LOG);
Review Comment:
sorry. The changed code is in method
```
public IOManagerAsync(String[] tempDirs, ExecutorService executorService) {
super(tempDirs, executorService);
```
So to test this we need to drive this method. I think you have a test that tests the same pattern but not the actual changed code.
am I missing something?
--
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] [hotfix] Simplify the calling on addShutdownHook [flink]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #26363: [hotfix] Simplify the calling on addShutdownHook
URL: https://github.com/apache/flink/pull/26363
--
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