Support namenode ha, try several namenode in the loop way.