HDFS-11041. Unable to unregister FsDatasetState MBean if DataNode is shutdown twice. Contributed by Wei-Chiu Chuang.
(cherry picked from commit e8cb2ae409
)
Change-Id: I9f04082d650628bc1b8b62dacaaf472f8a578742
This commit is contained in:
parent
c6b9fcfd6c
commit
51b3a5b22c
|
@ -2353,6 +2353,7 @@ class FsDatasetImpl implements FsDatasetSpi<FsVolumeImpl> {
|
|||
|
||||
if (mbeanName != null) {
|
||||
MBeans.unregister(mbeanName);
|
||||
mbeanName = null;
|
||||
}
|
||||
|
||||
if (asyncDiskService != null) {
|
||||
|
|
|
@ -1367,7 +1367,10 @@ public class SimulatedFSDataset implements FsDatasetSpi<FsVolumeSpi> {
|
|||
|
||||
@Override
|
||||
public void shutdown() {
|
||||
if (mbeanName != null) MBeans.unregister(mbeanName);
|
||||
if (mbeanName != null) {
|
||||
MBeans.unregister(mbeanName);
|
||||
mbeanName = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue