def __init__(self, host, thrift_port, hdfs_port=8020,
               nn_kerberos_principal="hdfs",
               dn_kerberos_principal="hdfs",
               security_enabled=False,
               hadoop_bin_path="hadoop",
               temp_dir='/tmp'):
    self.host = host
    self.thrift_port = thrift_port
    self.hdfs_port = hdfs_port
    self.security_enabled = security_enabled
    self.nn_kerberos_principal = nn_kerberos_principal
    self.dn_kerberos_principal = dn_kerberos_principal
    self.hadoop_bin_path = hadoop_bin_path
    self._resolve_hadoop_path()
    self.security_enabled = security_enabled
    self._temp_dir = temp_dir

    self.nn_client = thrift_util.get_client(
      Namenode.Client, host, thrift_port,
      service_name="HDFS Namenode HUE Plugin",
      use_sasl=security_enabled,
      kerberos_principal=nn_kerberos_principal,
      timeout_seconds=NN_THRIFT_TIMEOUT)

    # The file systems are cached globally.  We store
    # user information in a thread-local variable so that
    # safety can be preserved there.
    self.thread_local = threading.local()
    self.setuser(DEFAULT_USER)
    LOG.debug("Initialized HadoopFS: %s:%d (%s)", host, thrift_port, hadoop_bin_path)
@param host hostname or IP of the namenode
dataset/ETHPy150Open cloudera/hue/desktop/libs/hadoop/src/hadoop/fs/hadoopfs.py/HadoopFileSystem.__init__