#NEWLINE# def set_status( self , msg ) : #NEWLINE# #INDENT# 'Set the job status in hadoop streaming by printing to stderr.\n\n        This is also a good way of doing a keepalive for a job that goes a\n        long time between outputs; Hadoop streaming usually times out jobs\n        that give no output for longer than 10 minutes.\n        ' #NEWLINE# line = ( 'reporter:status:%s\n' % ( msg , ) ) #NEWLINE# if ( not isinstance ( line , bytes ) ) : #NEWLINE# #INDENT# line = line . encode ( 'utf_8' ) #NEWLINE# #UNINDENT# self . stderr . write ( line ) #NEWLINE# self . stderr . flush ( )