This is an automated email from the ASF dual-hosted git repository.

arp pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new 7dc1dee2a8 HDDS-8099. Make unlimited length the default in ozone debug 
ldb. (#4404)
7dc1dee2a8 is described below

commit 7dc1dee2a8780c46d06239994eb2c592c2830312
Author: ashishkumar50 <[email protected]>
AuthorDate: Thu Mar 16 09:57:01 2023 +0530

    HDDS-8099. Make unlimited length the default in ozone debug ldb. (#4404)
---
 .../src/test/java/org/apache/hadoop/ozone/om/TestLDBCli.java         | 4 ++++
 .../tools/src/main/java/org/apache/hadoop/ozone/debug/DBScanner.java | 5 ++---
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git 
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestLDBCli.java
 
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestLDBCli.java
index d4e0ea68ce..04f1139a7e 100644
--- 
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestLDBCli.java
+++ 
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestLDBCli.java
@@ -117,6 +117,7 @@ public class TestLDBCli {
     }
     rdbParser.setDbPath(dbStore.getDbLocation().getAbsolutePath());
     dbScanner.setParent(rdbParser);
+    DBScanner.setLimit(100);
     Assert.assertEquals(5, getKeyNames(dbScanner).size());
     Assert.assertTrue(getKeyNames(dbScanner).contains("key1"));
     Assert.assertTrue(getKeyNames(dbScanner).contains("key5"));
@@ -253,6 +254,7 @@ public class TestLDBCli {
     DBScanner.setWithKey(true);
 
     // Scan all container
+    DBScanner.setLimit(-1);
     try (GenericTestUtils.SystemOutCapturer capture =
              new GenericTestUtils.SystemOutCapturer()) {
       dbScanner.call();
@@ -264,6 +266,7 @@ public class TestLDBCli {
 
     // Scan container 1
     DBScanner.setContainerId(1);
+    DBScanner.setLimit(2);
     try (GenericTestUtils.SystemOutCapturer capture =
              new GenericTestUtils.SystemOutCapturer()) {
       dbScanner.call();
@@ -275,6 +278,7 @@ public class TestLDBCli {
 
     // Scan container 2
     DBScanner.setContainerId(2);
+    DBScanner.setLimit(2);
     try (GenericTestUtils.SystemOutCapturer capture =
              new GenericTestUtils.SystemOutCapturer()) {
       dbScanner.call();
diff --git 
a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/debug/DBScanner.java 
b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/debug/DBScanner.java
index 47363757e6..f3b5f28346 100644
--- 
a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/debug/DBScanner.java
+++ 
b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/debug/DBScanner.java
@@ -82,9 +82,8 @@ public class DBScanner implements Callable<Void>, 
SubcommandWithParent {
   private static boolean withKey;
 
   @CommandLine.Option(names = {"--length", "-l"},
-          description = "Maximum number of items to list. " +
-              "If -1 dumps the entire table data")
-  private static int limit = 100;
+          description = "Maximum number of items to list.")
+  private static int limit = -1;
 
   @CommandLine.Option(names = {"--out", "-o"},
       description = "File to dump table scan data")


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

Reply via email to