Skip to content

Commit

Permalink
[FLINK-5411] [flip6] Fix JobLeaderIdService shut down in ResourceManager
Browse files Browse the repository at this point in the history
The JobLeaderIdService was formerly closed at two different locations. Once in the
ResourceManager and once in the ResourceManagerRuntimeServices. Since the JobLeaderIdService
is a RM specific component. It should also be closed in the scope of the RM.

This closes apache#5757.
  • Loading branch information
tillrohrmann committed Mar 27, 2018
1 parent c64eccb commit 19fa504
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

import org.apache.flink.configuration.Configuration;
import org.apache.flink.runtime.clusterframework.types.ResourceID;
import org.apache.flink.runtime.concurrent.FutureUtils;
import org.apache.flink.runtime.entrypoint.ClusterInformation;
import org.apache.flink.runtime.heartbeat.HeartbeatServices;
import org.apache.flink.runtime.highavailability.HighAvailabilityServices;
Expand Down Expand Up @@ -106,13 +105,7 @@ public CompletableFuture<Void> closeAsync() {
synchronized (lock) {
resourceManager.shutDown();

return FutureUtils.runAfterwards(
resourceManager.getTerminationFuture(),
() -> {
synchronized (lock) {
resourceManagerRuntimeServices.shutDown();
}
});
return resourceManager.getTerminationFuture();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,6 @@ public JobLeaderIdService getJobLeaderIdService() {
return jobLeaderIdService;
}

// -------------------- Lifecycle methods -----------------------------------

public void shutDown() throws Exception {
jobLeaderIdService.stop();
}

// -------------------- Static methods --------------------------------------

public static ResourceManagerRuntimeServices fromConfiguration(
Expand Down

0 comments on commit 19fa504

Please sign in to comment.