private static boolean isTruePartitionOfTopLevelStep ( Step step ) { Partition partition = step . getPartition ( ) ; if ( partition . getMapper ( ) != null ) { if ( logger . isLoggable ( Level . FINER ) ) { logger . logp ( Level . FINER , CLASSNAME , "validatePartition" , "Found partitioned step with mapper" , step ) ; } return true ; } else if ( partition . getPlan ( ) != null ) { if ( partition . getPlan ( ) . getPartitions ( ) != null ) { if ( logger . isLoggable ( Level . FINER ) ) { logger . logp ( Level . FINER , CLASSNAME , "validatePartition" , "Found partitioned step with plan" , step ) ; } return true ; } else { if ( logger . isLoggable ( Level . FINER ) ) { logger . logp ( Level . FINER , CLASSNAME , "validatePartition" , "Found plan with partitions stripped out. Must be a partition on the partition work unit thread" , step ) ; } return false ; } } else { throw new IllegalArgumentException ( "Partition does not contain either a mapper or a plan. Aborting." ) ; } }
Need to perform this check because of the way we manipulate the model in building our subjob for the partition .