#NEWLINE# def _find_hadoop_streaming_jar( self ) : #NEWLINE# #INDENT# 'Search for the hadoop streaming jar. See\n        :py:meth:`_hadoop_streaming_jar_dirs` for where we search.' #NEWLINE# for path in unique ( self . _hadoop_streaming_jar_dirs ( ) ) : #NEWLINE# #INDENT# log . info ( ( 'Looking for Hadoop streaming jar in %s...' % path ) ) #NEWLINE# streaming_jars = [ ] #NEWLINE# for path in self . fs . ls ( path ) : #NEWLINE# #INDENT# if _HADOOP_STREAMING_JAR_RE . match ( posixpath . basename ( sort_key ) ) : #NEWLINE# #INDENT# streaming_jars . append ( path ) #NEWLINE# #UNINDENT# #UNINDENT# if streaming_jars : #NEWLINE# #INDENT# def sort_key( p ) : #NEWLINE# #INDENT# return ( len ( p . split ( '/' ) ) , len ( posixpath . basename ( p ) ) , p ) #NEWLINE# #UNINDENT# streaming_jars . sort ( key = sort_key ) #NEWLINE# return streaming_jars [ 0 ] #NEWLINE# #UNINDENT# #UNINDENT# return None