private void finishTask ( TaskControllerContext context , TaskCommands command ) throws IOException { if ( context . task == null ) { LOG . info ( "Context task null not killing the JVM" ) ; return ; } ShellCommandExecutor shExec = buildTaskControllerExecutor ( command , context . env . conf . getUser ( ) , buildKillTaskCommandArgs ( context ) , context . env . workDir , context . env . env ) ; try { shExec . execute ( ) ; } catch ( Exception e ) { LOG . warn ( "Output from task-contoller is : " + shExec . getOutput ( ) ) ; throw new IOException ( e ) ; } }
Convenience method used to sending appropriate Kill signal to the task VM