liangyu-1 commented on code in PR #25226:
URL: https://github.com/apache/flink/pull/25226#discussion_r1764495979


##########
flink-filesystems/flink-hadoop-fs/src/test/java/org/apache/flink/runtime/fs/hdfs/HadoopRecoverableWriterTest.java:
##########
@@ -83,6 +86,18 @@ static void destroyHDFS() throws Exception {
         }
     }
 
+    private RecoverableWriter getNoLocalWriteFileSystemWriter() throws 
Exception {
+        return fileSystem.createRecoverableWriter(true);
+    }
+
+    @Test
+    void testNoLocalWrite() throws Exception {
+        final HadoopRecoverableWriter writer =
+                (HadoopRecoverableWriter) getNoLocalWriteFileSystemWriter();
+
+        Assertions.assertTrue(writer.noLocalWrite);
+    }

Review Comment:
   I have added a new Unit Test by modeling it after a Hadoop Unit Test 
`org.apache.hadoop.hdfs.TestDFSOutputStream#testNoLocalWriteFlag` and removed 
the former UT as it cannot prove that the data is not write to the local path.
   
   The difference is that by setting replicas numbers to 3 or by disable 
no_local_write, you cannot pass this test.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to