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

adoroszlai 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 9aad5bc9d2 HDDS-13424. Use lsof instead of fuser to find if file is 
used in AbstractTestChunkManager (#8790)
9aad5bc9d2 is described below

commit 9aad5bc9d241a92136799a13a726ebd51a61cbb2
Author: Abhishek Pal <[email protected]>
AuthorDate: Sun Jul 13 00:14:38 2025 +0530

    HDDS-13424. Use lsof instead of fuser to find if file is used in 
AbstractTestChunkManager (#8790)
---
 .../ozone/container/keyvalue/impl/AbstractTestChunkManager.java       | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/keyvalue/impl/AbstractTestChunkManager.java
 
b/hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/keyvalue/impl/AbstractTestChunkManager.java
index 46d0c61573..6995b75f53 100644
--- 
a/hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/keyvalue/impl/AbstractTestChunkManager.java
+++ 
b/hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/keyvalue/impl/AbstractTestChunkManager.java
@@ -140,9 +140,9 @@ protected void checkChunkFileCount(int expected) {
    */
   public static boolean isFileNotInUse(String filePath) {
     try {
-      Process process = new ProcessBuilder("fuser", filePath).start();
+      Process process = new ProcessBuilder("lsof", "-f", "--", 
filePath).start();
       try (BufferedReader reader = new BufferedReader(new 
InputStreamReader(process.getInputStream(), UTF_8))) {
-        String output = reader.readLine();  // If fuser returns no output, the 
file is not in use
+        String output = reader.readLine();  // If lsof returns no output, the 
file is not in use
         if (output == null) {
           return true;
         }


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

Reply via email to