HDFS-8682. Should not remove decommissioned node,while calculating the number of live/dead decommissioned node. (Contributed by J. Andreina)
(cherry picked from commit fdb56f74f3
)
This commit is contained in:
parent
2f3faf39ef
commit
d63122979f
|
@ -884,6 +884,9 @@ Release 2.8.0 - UNRELEASED
|
|||
HDFS-8932. NPE thrown in NameNode when try to get TotalSyncCount metric
|
||||
before editLogStream initialization. (Surendra Singh Lilhore via xyao)
|
||||
|
||||
HDFS-8682. Should not remove decommissioned node,while calculating the
|
||||
number of live/dead decommissioned node. (J. Andreina via vinayakumarb)
|
||||
|
||||
Release 2.7.2 - UNRELEASED
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
|
|
@ -5065,7 +5065,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|||
@Override // FSNamesystemMBean
|
||||
public int getNumDecomLiveDataNodes() {
|
||||
final List<DatanodeDescriptor> live = new ArrayList<DatanodeDescriptor>();
|
||||
getBlockManager().getDatanodeManager().fetchDatanodes(live, null, true);
|
||||
getBlockManager().getDatanodeManager().fetchDatanodes(live, null, false);
|
||||
int liveDecommissioned = 0;
|
||||
for (DatanodeDescriptor node : live) {
|
||||
liveDecommissioned += node.isDecommissioned() ? 1 : 0;
|
||||
|
@ -5076,7 +5076,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|||
@Override // FSNamesystemMBean
|
||||
public int getNumDecomDeadDataNodes() {
|
||||
final List<DatanodeDescriptor> dead = new ArrayList<DatanodeDescriptor>();
|
||||
getBlockManager().getDatanodeManager().fetchDatanodes(null, dead, true);
|
||||
getBlockManager().getDatanodeManager().fetchDatanodes(null, dead, false);
|
||||
int deadDecommissioned = 0;
|
||||
for (DatanodeDescriptor node : dead) {
|
||||
deadDecommissioned += node.isDecommissioned() ? 1 : 0;
|
||||
|
|
Loading…
Reference in New Issue