public static long parseTimestampFromHdfsPath(String hdfsPath){
  int index=hdfsPath.lastIndexOf('/');
  if (index >= 0) {
    return Long.parseLong(hdfsPath.substring(index + 1));
  }
 else {
    return Long.parseLong(hdfsPath);
  }
}

public static long parseTimestampFromHdfsPath ( String hdfsPath ) { int index = hdfsPath . lastIndexOf ( '/' ) ; if ( index >= 0 ) { return Long . parseLong ( hdfsPath . substring ( index + 1 ) ) ; } else { return Long . parseLong ( hdfsPath ) ; } }
parse timestamp from a hdfs path e . g . giving ' / a / b / c / 1234567890000 ' , it returns 1234567890000
