public Map < String , List < Integer > > getComponentToTaskIds ( ) { if ( this . componentToTaskIds == null ) { this . componentToTaskIds = new HashMap <> ( ) ; // Iterate over all instances and insert necessary info into the map for ( PhysicalPlans . Instance instance : this . getPhysicalPlan ( ) . getInstancesList ( ) ) { int taskId = instance . getInfo ( ) . getTaskId ( ) ; String componentName = instance . getInfo ( ) . getComponentName ( ) ; if ( ! this . componentToTaskIds . containsKey ( componentName ) ) { this . componentToTaskIds . put ( componentName , new ArrayList < Integer > ( ) ) ; } this . componentToTaskIds . get ( componentName ) . add ( taskId ) ; } } return this . componentToTaskIds ; }
Get the map &lt ; componentId - &gt ; taskIds&gt ; from the Physical Plan