def _do_connect(self):
        """ Makes a new connection attempt, caching the new namenode index and HDFS connection. """
        self._index_of_nn, self._hdfs = \
            self._connector_cls._try_next_namenode(self._index_of_nn, self._list_of_namenodes, user=self._user)
 Makes a new connection attempt, caching the new namenode index and HDFS connection. 
petastorm/hdfs/namenode.py