#NEWLINE# def __init__( self , testfiles_path , start_cluster = True , nnport = None ) : #NEWLINE# #INDENT# '\n        :param testfiles_path: Local path where test files can be found. Mainly used for ``put()``\n        :type testfiles_path: string\n        :param start_cluster: start a MiniCluster on initialization. If False, this class will act as an interface to the ``hadoop fs`` command\n        :type start_cluster: boolean\n        ' #NEWLINE# self . _testfiles_path = testfiles_path #NEWLINE# self . _hadoop_home = os . environ [ 'HADOOP_HOME' ] #NEWLINE# self . _jobclient_jar = os . environ . get ( 'HADOOP_JOBCLIENT_JAR' ) #NEWLINE# self . _hadoop_cmd = ( '%s/bin/hadoop' % self . _hadoop_home ) #NEWLINE# if start_cluster : #NEWLINE# #INDENT# self . _start_mini_cluster ( nnport ) #NEWLINE# self . host = 'localhost' #NEWLINE# self . port = self . _get_namenode_port ( ) #NEWLINE# self . hdfs_url = ( 'hdfs://%s:%d' % ( self . host , self . port ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . hdfs_url = 'hdfs://'