HDFS-11041. Unable to unregister FsDatasetState MBean if DataNode is shutdown twice. Contributed by Wei-Chiu Chuang.
This commit is contained in:
parent
f6453244ab
commit
e8cb2ae409
@ -2385,6 +2385,7 @@ class FsDatasetImpl implements FsDatasetSpi<FsVolumeImpl> {
|
|||||||
|
|
||||||
if (mbeanName != null) {
|
if (mbeanName != null) {
|
||||||
MBeans.unregister(mbeanName);
|
MBeans.unregister(mbeanName);
|
||||||
|
mbeanName = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (asyncDiskService != null) {
|
if (asyncDiskService != null) {
|
||||||
|
@ -1367,7 +1367,10 @@ public class SimulatedFSDataset implements FsDatasetSpi<FsVolumeSpi> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void shutdown() {
|
public void shutdown() {
|
||||||
if (mbeanName != null) MBeans.unregister(mbeanName);
|
if (mbeanName != null) {
|
||||||
|
MBeans.unregister(mbeanName);
|
||||||
|
mbeanName = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user