construct namenode and datanode