xintongsong commented on a change in pull request #12620:
URL: https://github.com/apache/flink/pull/12620#discussion_r439673126
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/ResourceManager.java
##########
@@ -404,13 +404,17 @@ private void stopResourceManagerServices() throws
Exception {
final WorkerRegistration<WorkerType>
workerTypeWorkerRegistration = taskExecutors.get(taskManagerResourceId);
if
(workerTypeWorkerRegistration.getInstanceID().equals(taskManagerRegistrationId))
{
-
slotManager.registerTaskManager(workerTypeWorkerRegistration, slotReport);
+
registerTaskManagerAtSlotManager(workerTypeWorkerRegistration, slotReport);
Review comment:
I think this is a good suggestion on how to providing sub-classes
obstruct the registration. Thanks for that.
What I don't understand is why do we need the
`SlotManager.registerTaskManager` returns whether it is a new registration or a
duplicated one.
I think the following changes should work, with a no-op implementation for
`onTaskManagerRegistration` in the base class, overridden in sub classes.
```suggestion
slotManager.registerTaskManager(workerTypeWorkerRegistration, slotReport);
onTaskManagerRegistration(workerTypeWorkerRegistration);
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]