You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by we...@apache.org on 2024/05/10 00:18:21 UTC

(hbase) branch branch-2 updated: HBASE-28448 CompressionTest hangs when run over a Ozone ofs path (#5771) (#5813)

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

weichiu pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2 by this push:
     new 55e27651f5a HBASE-28448 CompressionTest hangs when run over a Ozone ofs path (#5771) (#5813)
55e27651f5a is described below

commit 55e27651f5a29d17ae3b6bbbcf29cbf9b32cc0dc
Author: Wei-Chiu Chuang <we...@apache.org>
AuthorDate: Thu May 9 17:18:15 2024 -0700

    HBASE-28448 CompressionTest hangs when run over a Ozone ofs path (#5771) (#5813)
    
    This bug was found via HDDS-10564.
    
    (cherry picked from commit adc79a0a9c2b579915a902f611a66edfddf3149c)
    (cherry picked from commit 0aaf372c5afbc006c9dcf192e053ce6501f000b7)
---
 .../apache/hadoop/hbase/util/CompressionTest.java   | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/CompressionTest.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/CompressionTest.java
index 1ed7db1b90f..349fcbc3c50 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/CompressionTest.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/CompressionTest.java
@@ -146,17 +146,18 @@ public class CompressionTest {
 
     Configuration conf = new Configuration();
     Path path = new Path(args[0]);
-    FileSystem fs = path.getFileSystem(conf);
-    if (fs.exists(path)) {
-      System.err.println("The specified path exists, aborting!");
-      System.exit(1);
-    }
+    try (FileSystem fs = path.getFileSystem(conf)) {
+      if (fs.exists(path)) {
+        System.err.println("The specified path exists, aborting!");
+        System.exit(1);
+      }
 
-    try {
-      doSmokeTest(fs, path, args[1]);
-    } finally {
-      fs.delete(path, false);
+      try {
+        doSmokeTest(fs, path, args[1]);
+      } finally {
+        fs.delete(path, false);
+      }
+      System.out.println("SUCCESS");
     }
-    System.out.println("SUCCESS");
   }
 }