Check if there are any expired heartbeats, and if so, whether any blocks have to be re-replicated. While removing dead datanodes, make sure that only one datanode is marked dead at a time within the synchronized section. Otherwise, a cascading effect causes more datanodes to be declared dead.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.