HDFS-11041. Unable to unregister FsDatasetState MBean if DataNode is shutdown twice. Contributed by Wei-Chiu Chuang.
(cherry picked from commit e8cb2ae409
)
This commit is contained in:
parent
d763c99707
commit
fa30224e95
@ -2353,6 +2353,7 @@ public void shutdown() {
|
|||||||
|
|
||||||
if (mbeanName != null) {
|
if (mbeanName != null) {
|
||||||
MBeans.unregister(mbeanName);
|
MBeans.unregister(mbeanName);
|
||||||
|
mbeanName = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (asyncDiskService != null) {
|
if (asyncDiskService != null) {
|
||||||
|
@ -1367,7 +1367,10 @@ void registerMBean(final String storageId) {
|
|||||||
|
|
||||||
@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…
Reference in New Issue
Block a user