Skip to content

Commit

Permalink
HDFS-11041. Unable to unregister FsDatasetState MBean if DataNode is …
Browse files Browse the repository at this point in the history
…shutdown twice. Contributed by Wei-Chiu Chuang.
  • Loading branch information
ayushtkn committed Jun 3, 2020
1 parent f645324 commit e8cb2ae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2385,6 +2385,7 @@ public void shutdown() {

if (mbeanName != null) {
MBeans.unregister(mbeanName);
mbeanName = null;
}

if (asyncDiskService != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1367,7 +1367,10 @@ void registerMBean(final String storageId) {

@Override
public void shutdown() {
if (mbeanName != null) MBeans.unregister(mbeanName);
if (mbeanName != null) {
MBeans.unregister(mbeanName);
mbeanName = null;
}
}

@Override
Expand Down

0 comments on commit e8cb2ae

Please sign in to comment.