You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/09/27 20:20:43 UTC

[GitHub] [ozone] avijayanhwx commented on a change in pull request #2675: HDDS-5777. Provide an option to dump table scan data to file.

avijayanhwx commented on a change in pull request #2675:
URL: https://github.com/apache/ozone/pull/2675#discussion_r717015280



##########
File path: hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmLDBCli.java
##########
@@ -98,15 +103,70 @@ public void testOMDB() throws Exception {
     Assert.assertTrue(getKeyNames(dbScanner).contains("key1"));
     Assert.assertTrue(getKeyNames(dbScanner).contains("key5"));
     Assert.assertFalse(getKeyNames(dbScanner).contains("key6"));
+
     DBScanner.setLimit(1);
     Assert.assertEquals(1, getKeyNames(dbScanner).size());
-    DBScanner.setLimit(-1);
+
+    DBScanner.setLimit(0);
     try {
       getKeyNames(dbScanner);
       Assert.fail("IllegalArgumentException is expected");
     }catch (IllegalArgumentException e){
       //ignore
     }
+
+    // If set with -1, check if it dumps entire table data.
+    DBScanner.setLimit(-1);
+    Assert.assertEquals(5, getKeyNames(dbScanner).size());
+
+    // Test dump to file.
+    String outFile = "/tmp/keyTable" + LocalDate.now();

Review comment:
       Nit. Maybe better to use Java tmp dir? 




-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org