You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ha...@apache.org on 2026/01/08 04:15:45 UTC

(iotdb) branch fix_tsfile_resource_printer created (now 9e1c46f6234)

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

haonan pushed a change to branch fix_tsfile_resource_printer
in repository https://gitbox.apache.org/repos/asf/iotdb.git


      at 9e1c46f6234 No need to init TierManager when using TsFileResourcePrinter

This branch includes the following new commits:

     new 9e1c46f6234 No need to init TierManager when using TsFileResourcePrinter

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(iotdb) 01/01: No need to init TierManager when using TsFileResourcePrinter

Posted by ha...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 9e1c46f6234fb993b9e9719da81c9ec5779e7a19
Author: HTHou <ha...@apache.org>
AuthorDate: Thu Jan 8 12:15:14 2026 +0800

    No need to init TierManager when using TsFileResourcePrinter
---
 .../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();