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 .