private Map < PartitionInfoCacheSupport . PartitionValues , String > detectNewPartition ( PartitionInfoCacheSupport . PartitionValues partitionValues , PartitionInfoCacheSupport . PartitionInfo pCache , String location ) throws StageException { Map < PartitionInfoCacheSupport . PartitionValues , String > partitionInfoDiff = new HashMap <> ( ) ; partitionInfoDiff . put ( partitionValues , location ) ; partitionInfoDiff = ( pCache != null ) ? pCache . getDiff ( partitionInfoDiff ) : partitionInfoDiff ; if ( pCache == null || ! partitionInfoDiff . isEmpty ( ) ) { return partitionInfoDiff ; } return null ; }
Using partition name and value that were obtained from record compare them with cached partition .