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, 11 Oct 2017 09:40:31 GMT
Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4729#discussion_r143958924
  
    --- Diff: flink-yarn/src/main/java/org/apache/flink/yarn/YarnResourceManager.java ---
    @@ -227,13 +241,19 @@ public void startNewWorker(ResourceProfile resourceProfile) {
     	}
     
     	@Override
    -	public void stopWorker(ResourceID resourceID) {
    -		// TODO: Implement to stop the worker
    +	public void stopWorker(YarnWorkerNode workerNode) {
    +		workerNodeMap.remove(workerNode.getResourceID().toString());
    +		if (workerNode != null) {
    +			log.info("Stopping container {}.", workerNode.getYarnContainer().getId().toString());
    +			resourceManagerClient.releaseAssignedContainer(workerNode.getYarnContainer().getId());
    --- End diff --
    
    I think we should also call `nodeManagerClient.stopContainer()` before.


---

Mime
View raw message