public static String extractFileSetFromPath(String resource){
  String[] splits=resource.split("[/]");
  if (splits.length <= 3) {
    Stats.incr("invalid-resource");
    return null;
  }
  return splits[splits.length - 3];
}

public static String extractFileSetFromPath ( String resource ) { String [ ] splits = resource . split ( "[/]" ) ; if ( splits . length <= 3 ) { Stats . incr ( "invalid-resource" ) ; return null ; } return splits [ splits . length - 3 ] ; }
return the fileset corresponding to a file on hdfs . if the file path is not valid , then return null .
