steveloughran commented on a change in pull request #1794: HADOOP-15887: Add an 
option to avoid writing data locally in Distcp
URL: https://github.com/apache/hadoop/pull/1794#discussion_r363378804
 
 

 ##########
 File path: 
hadoop-tools/hadoop-distcp/src/test/java/org/apache/hadoop/tools/TestOptionsParser.java
 ##########
 @@ -804,4 +804,18 @@ public void testExclusionsOption() {
         "hdfs://localhost:8020/target/"});
     assertThat(options.getFiltersFile()).isEqualTo("/tmp/filters.txt");
   }
+
+  @Test
+  public void testParseNoLocalWrite() {
+    DistCpOptions options = OptionsParser.parse(new String[] {
+        "hdfs://localhost:8020/source/first",
+        "hdfs://localhost:8020/target/"});
+    Assert.assertEquals(options.shouldNoLocalWrite(), false);
+
+    options = OptionsParser.parse(new String[] {
+        "-noLocalWrite",
+        "hdfs://localhost:8020/source/first",
+        "hdfs://localhost:8020/target/"});
+    Assert.assertEquals(options.shouldNoLocalWrite(), true);
 
 Review comment:
   use assertTrue

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to