public void markAllNewWorkers ( Map < Integer , String > workerIds ) { int startTime = TimeUtils . current_time_secs ( ) ; for ( Entry < Integer , String > entry : workerIds . entrySet ( ) ) { String oldWorkerIds = portToWorkerId . get ( entry . getKey ( ) ) ; if ( oldWorkerIds != null ) { workerIdToStartTimeAndPort . remove ( oldWorkerIds ) ; // update portToWorkerId LOG . info ( "A port is still occupied by an old worker, remove useless " + oldWorkerIds + " from workerIdToStartTimeAndPort" ) ; } portToWorkerId . put ( entry . getKey ( ) , entry . getValue ( ) ) ; workerIdToStartTimeAndPort . put ( entry . getValue ( ) , new Pair <> ( startTime , entry . getKey ( ) ) ) ; } }
mark all new Workers like 52b11418 - 7474 - 446d - bff5 - 0ecd68f4954f