#NEWLINE# def _start_mini_cluster( self , nnport = None ) : #NEWLINE# #INDENT# if self . _jobclient_jar : #NEWLINE# #INDENT# hadoop_jar = self . _jobclient_jar #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# hadoop_jar = self . _find_mini_cluster_jar ( self . _hadoop_home ) #NEWLINE# #UNINDENT# if ( not hadoop_jar ) : #NEWLINE# #INDENT# raise Exception ( 'No hadoop jobclient test jar found' ) #NEWLINE# #UNINDENT# cmd = [ self . _hadoop_cmd , 'jar' , hadoop_jar , 'minicluster' , '-nomr' , '-format' ] #NEWLINE# if nnport : #NEWLINE# #INDENT# cmd . extend ( [ '-nnport' , ( '%s' % nnport ) ] ) #NEWLINE# #UNINDENT# self . hdfs = subprocess . Popen ( cmd , bufsize = 0 , stdout = subprocess . PIPE , stderr = subprocess . PIPE , universal_newlines = True )