def __init__(self, connector_cls, list_of_namenodes, user=None):
        """
        Attempt HDFS connection operation, storing the hdfs object for intercepted calls.

        :param connector_cls: HdfsConnector class, so connector logic resides in one place, and
            also facilitates testing.
        :param list_of_namenodes: List of name nodes to failover, cached to enable un-/pickling
        :param user: String denoting username when connecting to HDFS. None implies login user.
        :return: None
        """
        # Use protected attribute to prevent mistaken decorator application
        self._connector_cls = connector_cls
        self._list_of_namenodes = list_of_namenodes
        self._user = user
        # Ensure that a retry will attempt a different name node in the list
        self._index_of_nn = -1
        self._do_connect()

        Attempt HDFS connection operation, storing the hdfs object for intercepted calls.

        :param connector_cls: HdfsConnector class, so connector logic resides in one place, and
            also facilitates testing.
        :param list_of_namenodes: List of name nodes to failover, cached to enable un-/pickling
        :param user: String denoting username when connecting to HDFS. None implies login user.
        :return: None
        
petastorm/hdfs/namenode.py