hdfs-protolib/src/main/java/com/streamsets/pipeline/stage/destination/hdfs/writer/RecordWriterManager.java
Path renameToFinalName(FileSystem fs, Path tempPath) throws IOException, StageException {
    return fsHelper.renameAndGetPath(fs, tempPath);
  }
Path renameToFinalName(FileSystem fs, Path tempPath) throws IOException, StageException {
    return fsHelper.renameAndGetPath(fs, tempPath);
  }
This method should be called every time we finish writing into a file and consider it "done".