aljoscha commented on a change in pull request #7313: 
[FLINK-11116][fs-connector] Removed randomness from HDFS and Local fs writers.
URL: https://github.com/apache/flink/pull/7313#discussion_r243039964
 
 

 ##########
 File path: 
flink-filesystems/flink-hadoop-fs/src/main/java/org/apache/flink/runtime/fs/hdfs/HadoopRecoverableWriter.java
 ##########
 @@ -121,24 +127,14 @@ public boolean supportsResume() {
                return true;
        }
 
-       @VisibleForTesting
-       static org.apache.hadoop.fs.Path generateStagingTempFilePath(
-                       org.apache.hadoop.fs.FileSystem fs,
-                       org.apache.hadoop.fs.Path targetFile) throws 
IOException {
-
+       private static org.apache.hadoop.fs.Path 
generateStagingTempFilePath(org.apache.hadoop.fs.Path targetFile) {
                checkArgument(targetFile.isAbsolute(), "targetFile must be 
absolute");
 
                final org.apache.hadoop.fs.Path parent = targetFile.getParent();
                final String name = targetFile.getName();
 
                checkArgument(parent != null, "targetFile must not be the root 
directory");
 
-               while (true) {
-                       org.apache.hadoop.fs.Path candidate = new 
org.apache.hadoop.fs.Path(
-                                       parent, "." + name + ".inprogress." + 
UUID.randomUUID().toString());
-                       if (!fs.exists(candidate)) {
-                               return candidate;
-                       }
-               }
+               return new org.apache.hadoop.fs.Path(parent, "." + name + 
".inprogress");
 
 Review comment:
   We should definitely wait for @StephanEwen to comment on this (as you 
already discussed in the comments). Since he's the original author and there 
might be a good reason behind this.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to