namesystem.writeLock();
namesystem.clusterMap.remove(dnDs);
namesystem.resolveNetworkLocation(newDS);
namesystem.unprotectedAddDatanode(newDS);
namesystem.clusterMap.add(newDS);
namesystem.writeUnlock();
// Overwrite DN map with new registration.
node.setRegistrationName(node.getMachineName());
}
}