private void check() { int count = 0; for(Map.Entry<String, DatanodeDescriptor> entry : new CyclicIteration<String, DatanodeDescriptor>( fsnamesystem.datanodeMap, firstkey)) { final DatanodeDescriptor d = entry.getValue(); firstkey = entry.getKey(); if (d.isDecommissionInProgress()) { try { fsnamesystem.checkDecommissionStateInternal(d); } catch(Exception e) { LOG.warn("entry=" + entry, e); } if (++count == numNodesPerCheck) { return; } } } }