Skip to content

Commit be80334

Browse files
committed
YARN-9639. DecommissioningNodesWatcher cause memory leak. Contributed by Bilwa S T.
1 parent 4848280 commit be80334

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/DecommissioningNodesWatcher.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,11 @@ public synchronized void remove(NodeId nodeId) {
194194
}
195195
}
196196

197+
public void stop() {
198+
pollTimer.cancel();
199+
pollTimer = null;
200+
}
201+
197202
/**
198203
* Status about a specific decommissioning node.
199204
*

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceTrackerService.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,7 @@ protected void serviceStart() throws Exception {
268268

269269
@Override
270270
protected void serviceStop() throws Exception {
271+
decommissioningWatcher.stop();
271272
if (this.server != null) {
272273
this.server.stop();
273274
}

0 commit comments

Comments
 (0)