private void printlnBoth(PrintWriter pw, String str) {
    System.out.println(str);
    pw.println(str);
  }
load by dfs, and sort by TreeMap

@param metadataIndexNode current node
@param metadataIndexNodeMap result map, key is offset
@param treeOutputStringBuffer result list, string is index tree
@param deep current deep
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/TsFileSketchTool.java