public boolean createJob ( Map < Integer , BaseContainer > jobDefinition ) { synchronized ( this ) { if ( isTerminated ) { LOG . severe ( "Job has been killed" ) ; return false ; } // Record the jobDefinition containersInfo . putAll ( jobDefinition ) ; // To scheduler them with 0 attempt for ( Map . Entry < Integer , BaseContainer > entry : jobDefinition . entrySet ( ) ) { Integer containerIndex = entry . getKey ( ) ; BaseContainer container = entry . getValue ( ) ; String taskId = TaskUtils . getTaskId ( container . name , 0 ) ; scheduleNewTask ( taskId ) ; } } return true ; }
Create a topology