scwhittle commented on a change in pull request #15355: URL: https://github.com/apache/beam/pull/15355#discussion_r708073171
########## File path: sdks/java/core/src/main/java/org/apache/beam/sdk/io/FileBasedSink.java ########## @@ -948,7 +950,12 @@ public final void open(String uId) throws Exception { getWriteOperation().getSink().writableByteChannelFactory; // The factory may force a MIME type or it may return null, indicating to use the sink's MIME. String channelMimeType = firstNonNull(factory.getMimeType(), mimeType); - WritableByteChannel tempChannel = FileSystems.create(outputFile, channelMimeType); + CreateOptions createOptions = + StandardCreateOptions.builder() + .setMimeType(channelMimeType) + .setExpectFileToNotExist(true) + .build(); + WritableByteChannel tempChannel = FileSystems.create(outputFile, createOptions); Review comment: Yes, the uuid is fresh every time the temp file is opened. Added to above comment -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@beam.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org