rdblue commented on a change in pull request #432: Allow writers to control size of files generated URL: https://github.com/apache/incubator-iceberg/pull/432#discussion_r321016820
########## File path: spark/src/main/java/org/apache/iceberg/spark/source/Writer.java ########## @@ -303,66 +305,128 @@ public String toString() { } } } + + private class EncryptedOutputFileFactory implements OutputFileFactory<EncryptedOutputFile> { + private final int partitionId; + private final long taskId; + private final long epochId; + + EncryptedOutputFileFactory(int partitionId, long taskId, long epochId) { + this.partitionId = partitionId; + this.taskId = taskId; + this.epochId = epochId; + } + + private String generateFilename() { + return format.addExtension(String.format("%05d-%d-%s", partitionId, taskId, UUID.randomUUID().toString())); Review comment: Using the same UUID would make filenames collide, so we should have a counter as well? ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org