#NEWLINE# def cancel_job( self , job_execution ) : #NEWLINE# #INDENT# ( topology_name , instance ) = self . _get_instance_if_running ( job_execution ) #NEWLINE# if ( ( topology_name is None ) or ( instance is None ) ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# topology_name = self . _get_topology_name ( job_execution ) #NEWLINE# master = plugin_utils . get_instance ( self . cluster , 'nimbus' ) #NEWLINE# cmd = ( '%(storm_kill)s -c nimbus.host=%(host)s %(topology_name)s' % { #NEWLINE# #INDENT# 'storm_kill' : '/usr/local/storm/bin/storm kill' , #NEWLINE# 'host' : master . hostname ( ) , #NEWLINE# 'topology_name' : topology_name , #NEWLINE# #UNINDENT# } ) #NEWLINE# ( ret , stdout ) = self . _exec_cmd_on_remote_instance ( instance , cmd ) #NEWLINE# if ( ret == 0 ) : #NEWLINE# #INDENT# return self . _get_job_status_from_remote ( job_execution )