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

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


The following commit(s) were added to refs/heads/master by this push:
     new 48dae279e7d No need to init TierManager when using 
TsFileResourcePrinter (#17001)
48dae279e7d is described below

commit 48dae279e7dbdbdaa70fc98c6dc85771ca586fcd
Author: Haonan <[email protected]>
AuthorDate: Thu Jan 8 18:27:56 2026 +0800

    No need to init TierManager when using TsFileResourcePrinter (#17001)
---
 .../main/java/org/apache/iotdb/db/tools/TsFileResourcePrinter.java   | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/TsFileResourcePrinter.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/TsFileResourcePrinter.java
index 7fe4ca1d01e..530181fd1f3 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/TsFileResourcePrinter.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/TsFileResourcePrinter.java
@@ -50,7 +50,7 @@ public class TsFileResourcePrinter {
       File[] files =
           FSFactoryProducer.getFSFactory()
               .listFilesBySuffix(folderFile.getAbsolutePath(), 
".tsfile.resource");
-      Arrays.sort(files, Comparator.comparingLong(x -> 
Long.valueOf(x.getName().split("-")[0])));
+      Arrays.sort(files, Comparator.comparingLong(x -> 
Long.parseLong(x.getName().split("-")[0])));
 
       for (File file : files) {
         printResource(file.getAbsolutePath());
@@ -66,7 +66,8 @@ public class TsFileResourcePrinter {
   @SuppressWarnings("squid:S106")
   public static void printResource(String filename) throws IOException {
     filename = filename.substring(0, filename.length() - 9);
-    TsFileResource resource = new 
TsFileResource(SystemFileFactory.INSTANCE.getFile(filename));
+    TsFileResource resource = new TsFileResource();
+    resource.setFile(SystemFileFactory.INSTANCE.getFile(filename));
     System.out.printf("Analyzing %s ...%n", filename);
     System.out.println();
     resource.deserialize();

Reply via email to