#NEWLINE# def run_job( self , job , tracking_url_callback = None ) : #NEWLINE# #INDENT# if ( tracking_url_callback is not None ) : #NEWLINE# #INDENT# warnings . warn ( 'tracking_url_callback argument is deprecated, task.set_tracking_url is used instead.' , DeprecationWarning ) #NEWLINE# #UNINDENT# self . prepare_outputs ( job ) #NEWLINE# with tempfile . NamedTemporaryFile ( ) as f : #NEWLINE# #INDENT# query = job . query ( ) #NEWLINE# if isinstance ( query , unicode ) : #NEWLINE# #INDENT# query = query . encode ( 'utf8' ) #NEWLINE# #UNINDENT# f . write ( query ) #NEWLINE# f . flush ( ) #NEWLINE# arglist = ( load_hive_cmd ( ) + [ '-f' , f . name ] ) #NEWLINE# hiverc = job . hiverc ( ) #NEWLINE# if hiverc : #NEWLINE# #INDENT# if isinstance ( hiverc , str ) : #NEWLINE# #INDENT# hiverc = [ rcfile ] #NEWLINE# #UNINDENT# for rcfile in hiverc : #NEWLINE# #INDENT# arglist += [ '-i' , rcfile ] #NEWLINE# #UNINDENT# #UNINDENT# if job . hiveconfs ( ) : #NEWLINE# #INDENT# for ( k , v ) in six . iteritems ( job . hiveconfs ( ) ) : #NEWLINE# #INDENT# arglist += [ '--hiveconf' , '{0}={1}' . format ( k , v ) ] #NEWLINE# #UNINDENT# #UNINDENT# logger . info ( arglist ) #NEWLINE# return luigi . contrib . hadoop . run_and_track_hadoop_job ( arglist , job . set_tracking_url )