question: public boolean killJob ( String jobIdFile ) { List < String > jobIdFileContent = readFromFile ( jobIdFile ) ; if ( jobIdFileContent . size ( ) > 0 ) { String [ ] slurmCmd = new String [ ] { "scancel" , jobIdFileContent . get ( 0 ) } ; return runProcess ( null , slurmCmd , new StringBuilder ( ) , new StringBuilder ( ) ) ; } else { LOG . log ( Level . SEVERE , "Failed to read the Slurm Job id from file: {0}" , jobIdFile ) ; return false ; } }
target:  Cancel the Slurm job by reading the jobid from the jobIdFile. Uses scancel command to cancel the job. The file contains a single line with the job id. This file is written by the slurm job script after the job is allocated.