flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tillrohrmann <...@git.apache.org>
Subject [GitHub] flink pull request #4729: [FLINK-7076] [ResourceManager] implement YARN stop...
Date Wed, 27 Sep 2017 09:45:31 GMT
Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4729#discussion_r141293920
  
    --- Diff: flink-yarn/src/main/java/org/apache/flink/yarn/YarnResourceManager.java ---
    @@ -228,7 +234,14 @@ public void startNewWorker(ResourceProfile resourceProfile) {
     
     	@Override
     	public void stopWorker(ResourceID resourceID) {
    -		// TODO: Implement to stop the worker
    +		ContainerId containerId = containerIdMap.remove(resourceID.getResourceIdString());
    +		if (containerId != null) {
    +			log.info("Stopping container {}.", containerId.toString());
    +			resourceManagerClient.releaseAssignedContainer(containerId);
    --- End diff --
    
    I think in the Yarn case, the `resourceID` is generated from the stringified version of
the `containerId`. Thus, you should be able to retrieve it from the provided `resourceID`.


---

Mime
View raw message