@Override
  public Path getPath(FileSystem fs, Date recordDate, Record record) throws StageException, IOException {
    //Check whether the real file already exists
    Path path = new Path(mgr.getDirPath(recordDate, record), getTempFile(recordDate, record));
    //this will check the file exists.
    Path renamableFinalPath = getRenamablePath(fs, path);
    updateFsPermissionsIfNeeded(record);

    wholeFileEventRecord = createWholeFileEventRecord(record, renamableFinalPath);

    return path;
  }
@ Override public Path getPath ( FileSystem fs , Date recordDate , Record record ) throws StageException , IOException { Path path = new Path ( mgr . getDirPath ( recordDate , record ) , getTempFile ( recordDate , record ) ) ; Path renamableFinalPath = getRenamablePath ( fs , path ) ; updateFsPermissionsIfNeeded ( record ) ; wholeFileEventRecord = createWholeFileEventRecord ( record , renamableFinalPath ) ; return path ; }
because the path is going to be used only once (because only one record is used).