Description
This method is very long, approximately 190 lines. Splitting this method into smaller methods. This also helps in federation where some of the initialization in this methods will be done once for a datanode and others once in every heartbeat thread per namenode in DN.