HDFS-16241. Standby close reconstruction thread (#3493)

Co-authored-by: zhanghuazong <Zhz@20068867>
(cherry picked from commit 88d8c3d0c8)
This commit is contained in:
langlaile1221 2021-10-11 16:11:31 +08:00 committed by Wei-Chiu Chuang
parent 038fa67db4
commit a35a6ec06b
No known key found for this signature in database
GPG Key ID: B362E1C021854B9D
2 changed files with 6 additions and 3 deletions

View File

@ -3608,7 +3608,7 @@ public void run() {
/*
* Stop the ongoing initialisation of reconstruction queues
*/
private void stopReconstructionInitializer() {
public void stopReconstructionInitializer() {
if (reconstructionQueuesInitializer != null) {
reconstructionQueuesInitializer.interrupt();
try {

View File

@ -1427,8 +1427,11 @@ void stopActiveServices() {
LOG.info("Stopping services started for active state");
writeLock();
try {
if (blockManager != null && blockManager.getSPSManager() != null) {
blockManager.getSPSManager().stop();
if (blockManager != null) {
blockManager.stopReconstructionInitializer();
if (blockManager.getSPSManager() != null) {
blockManager.getSPSManager().stop();
}
}
stopSecretManager();
leaseManager.stopMonitor();