question: public static Integer extractPartitionName ( String fileName , PartitionerType partitioner ) { if ( partitioner == PartitionerType . MODULUS || partitioner == PartitionerType . CASCADING ) { if ( ! fileName . startsWith ( Constants . FILE_PREFIX ) ) { return null ; } try { return Integer . parseInt ( fileName . substring ( 5 , 10 ) ) ; } catch ( NumberFormatException e ) { return null ; } } return null ; }
target:  Extracts the partition name for a file. It expects file names with the prefix part-00000 etc. Currently only modulus sharding is supported.