private ITridentPartitionManager getOrCreatePartitionManager ( Partition partition ) { ITridentPartitionManager pm ; if ( ! pmMap . containsKey ( partition . getId ( ) ) ) { IEventHubReceiver receiver = recvFactory . create ( spoutConfig , partition . getId ( ) ) ; pm = pmFactory . create ( receiver ) ; pmMap . put ( partition . getId ( ) , pm ) ; } else { pm = pmMap . get ( partition . getId ( ) ) ; } return pm ; }
Check if partition manager for a given partiton is created if not create it .