YARN-9639. DecommissioningNodesWatcher cause memory leak. Contributed by Bilwa S T.

(cherry picked from commit be80334cdf)
This commit is contained in:
bibinchundatt 2019-06-27 09:59:44 +05:30
parent e7fce2104f
commit a2f4e4698b
2 changed files with 6 additions and 0 deletions

View File

@ -207,6 +207,11 @@ public class DecommissioningNodesWatcher {
} }
} }
public void stop() {
pollTimer.cancel();
pollTimer = null;
}
/** /**
* Status about a specific decommissioning node. * Status about a specific decommissioning node.
* *

View File

@ -263,6 +263,7 @@ public class ResourceTrackerService extends AbstractService implements
@Override @Override
protected void serviceStop() throws Exception { protected void serviceStop() throws Exception {
decommissioningWatcher.stop();
if (this.server != null) { if (this.server != null) {
this.server.stop(); this.server.stop();
} }