TBD-1146:improve the algorithm here for Hadoop Cluster to avoid the NPE.