|
| 1 | +<!-- |
| 2 | +
|
| 3 | + Licensed to the Apache Software Foundation (ASF) under one |
| 4 | + or more contributor license agreements. See the NOTICE file |
| 5 | + distributed with this work for additional information |
| 6 | + regarding copyright ownership. The ASF licenses this file |
| 7 | + to you under the Apache License, Version 2.0 (the |
| 8 | + "License"); you may not use this file except in compliance |
| 9 | + with the License. You may obtain a copy of the License at |
| 10 | + |
| 11 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | + |
| 13 | + Unless required by applicable law or agreed to in writing, |
| 14 | + software distributed under the License is distributed on an |
| 15 | + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 16 | + KIND, either express or implied. See the License for the |
| 17 | + specific language governing permissions and limitations |
| 18 | + under the License. |
| 19 | +
|
| 20 | +--> |
| 21 | + |
| 22 | +# 集群管理工具 |
| 23 | + |
| 24 | +## 数据文件夹概览工具 |
| 25 | + |
| 26 | +IoTDB数据文件夹概览工具用于打印出数据文件夹的结构概览信息,工具位置为 tools/tsfile/print-iotdb-data-dir。 |
| 27 | + |
| 28 | +### 用法 |
| 29 | + |
| 30 | +- Windows: |
| 31 | + |
| 32 | +```bash |
| 33 | +.\print-iotdb-data-dir.bat <IoTDB数据文件夹路径,如果是多个文件夹用逗号分隔> (<输出结果的存储路径>) |
| 34 | +``` |
| 35 | + |
| 36 | +- Linux or MacOs: |
| 37 | + |
| 38 | +```shell |
| 39 | +./print-iotdb-data-dir.sh <IoTDB数据文件夹路径,如果是多个文件夹用逗号分隔> (<输出结果的存储路径>) |
| 40 | +``` |
| 41 | + |
| 42 | +注意:如果没有设置输出结果的存储路径, 将使用相对路径"IoTDB_data_dir_overview.txt"作为默认值。 |
| 43 | + |
| 44 | +### 示例 |
| 45 | + |
| 46 | +以Windows系统为例: |
| 47 | + |
| 48 | +`````````````````````````bash |
| 49 | +.\print-iotdb-data-dir.bat D:\github\master\iotdb\data\datanode\data |
| 50 | +```````````````````````` |
| 51 | +Starting Printing the IoTDB Data Directory Overview |
| 52 | +```````````````````````` |
| 53 | +output save path:IoTDB_data_dir_overview.txt |
| 54 | +data dir num:1 |
| 55 | +143 [main] WARN o.a.i.t.c.conf.TSFileDescriptor - not found iotdb-system.properties, use the default configs. |
| 56 | +|============================================================== |
| 57 | +|D:\github\master\iotdb\data\datanode\data |
| 58 | +|--sequence |
| 59 | +| |--root.redirect0 |
| 60 | +| | |--1 |
| 61 | +| | | |--0 |
| 62 | +| |--root.redirect1 |
| 63 | +| | |--2 |
| 64 | +| | | |--0 |
| 65 | +| |--root.redirect2 |
| 66 | +| | |--3 |
| 67 | +| | | |--0 |
| 68 | +| |--root.redirect3 |
| 69 | +| | |--4 |
| 70 | +| | | |--0 |
| 71 | +| |--root.redirect4 |
| 72 | +| | |--5 |
| 73 | +| | | |--0 |
| 74 | +| |--root.redirect5 |
| 75 | +| | |--6 |
| 76 | +| | | |--0 |
| 77 | +| |--root.sg1 |
| 78 | +| | |--0 |
| 79 | +| | | |--0 |
| 80 | +| | | |--2760 |
| 81 | +|--unsequence |
| 82 | +|============================================================== |
| 83 | +````````````````````````` |
| 84 | + |
| 85 | +## TsFile概览工具 |
| 86 | + |
| 87 | +TsFile概览工具用于以概要模式打印出一个TsFile的内容,工具位置为 tools/tsfile/print-tsfile。 |
| 88 | + |
| 89 | +### 用法 |
| 90 | + |
| 91 | +- Windows: |
| 92 | + |
| 93 | +```bash |
| 94 | +.\print-tsfile-sketch.bat <TsFile文件路径> (<输出结果的存储路径>) |
| 95 | +``` |
| 96 | + |
| 97 | +- Linux or MacOs: |
| 98 | + |
| 99 | +```shell |
| 100 | +./print-tsfile-sketch.sh <TsFile文件路径> (<输出结果的存储路径>) |
| 101 | +``` |
| 102 | + |
| 103 | +注意:如果没有设置输出结果的存储路径, 将使用相对路径"TsFile_sketch_view.txt"作为默认值。 |
| 104 | + |
| 105 | +### 示例 |
| 106 | + |
| 107 | +以Windows系统为例: |
| 108 | + |
| 109 | +`````````````````````````bash |
| 110 | +.\print-tsfile.bat D:\github\master\1669359533965-1-0-0.tsfile D:\github\master\sketch.txt |
| 111 | +```````````````````````` |
| 112 | +Starting Printing the TsFile Sketch |
| 113 | +```````````````````````` |
| 114 | +TsFile path:D:\github\master\1669359533965-1-0-0.tsfile |
| 115 | +Sketch save path:D:\github\master\sketch.txt |
| 116 | +148 [main] WARN o.a.i.t.c.conf.TSFileDescriptor - not found iotdb-system.properties, use the default configs. |
| 117 | +-------------------------------- TsFile Sketch -------------------------------- |
| 118 | +file path: D:\github\master\1669359533965-1-0-0.tsfile |
| 119 | +file length: 2974 |
| 120 | + |
| 121 | + POSITION| CONTENT |
| 122 | + -------- ------- |
| 123 | + 0| [magic head] TsFile |
| 124 | + 6| [version number] 3 |
| 125 | +||||||||||||||||||||| [Chunk Group] of root.sg1.d1, num of Chunks:3 |
| 126 | + 7| [Chunk Group Header] |
| 127 | + | [marker] 0 |
| 128 | + | [deviceID] root.sg1.d1 |
| 129 | + 20| [Chunk] of root.sg1.d1.s1, startTime: 1669359533948 endTime: 1669359534047 count: 100 [minValue:-9032452783138882770,maxValue:9117677033041335123,firstValue:7068645577795875906,lastValue:-5833792328174747265,sumValue:5.795959009889246E19] |
| 130 | + | [chunk header] marker=5, measurementID=s1, dataSize=864, dataType=INT64, compressionType=SNAPPY, encodingType=RLE |
| 131 | + | [page] UncompressedSize:862, CompressedSize:860 |
| 132 | + 893| [Chunk] of root.sg1.d1.s2, startTime: 1669359533948 endTime: 1669359534047 count: 100 [minValue:-8806861312244965718,maxValue:9192550740609853234,firstValue:1150295375739457693,lastValue:-2839553973758938646,sumValue:8.2822564314572677E18] |
| 133 | + | [chunk header] marker=5, measurementID=s2, dataSize=864, dataType=INT64, compressionType=SNAPPY, encodingType=RLE |
| 134 | + | [page] UncompressedSize:862, CompressedSize:860 |
| 135 | + 1766| [Chunk] of root.sg1.d1.s3, startTime: 1669359533948 endTime: 1669359534047 count: 100 [minValue:-9076669333460323191,maxValue:9175278522960949594,firstValue:2537897870994797700,lastValue:7194625271253769397,sumValue:-2.126008424849926E19] |
| 136 | + | [chunk header] marker=5, measurementID=s3, dataSize=864, dataType=INT64, compressionType=SNAPPY, encodingType=RLE |
| 137 | + | [page] UncompressedSize:862, CompressedSize:860 |
| 138 | +||||||||||||||||||||| [Chunk Group] of root.sg1.d1 ends |
| 139 | + 2656| [marker] 2 |
| 140 | + 2657| [TimeseriesIndex] of root.sg1.d1.s1, tsDataType:INT64, startTime: 1669359533948 endTime: 1669359534047 count: 100 [minValue:-9032452783138882770,maxValue:9117677033041335123,firstValue:7068645577795875906,lastValue:-5833792328174747265,sumValue:5.795959009889246E19] |
| 141 | + | [ChunkIndex] offset=20 |
| 142 | + 2728| [TimeseriesIndex] of root.sg1.d1.s2, tsDataType:INT64, startTime: 1669359533948 endTime: 1669359534047 count: 100 [minValue:-8806861312244965718,maxValue:9192550740609853234,firstValue:1150295375739457693,lastValue:-2839553973758938646,sumValue:8.2822564314572677E18] |
| 143 | + | [ChunkIndex] offset=893 |
| 144 | + 2799| [TimeseriesIndex] of root.sg1.d1.s3, tsDataType:INT64, startTime: 1669359533948 endTime: 1669359534047 count: 100 [minValue:-9076669333460323191,maxValue:9175278522960949594,firstValue:2537897870994797700,lastValue:7194625271253769397,sumValue:-2.126008424849926E19] |
| 145 | + | [ChunkIndex] offset=1766 |
| 146 | + 2870| [IndexOfTimerseriesIndex Node] type=LEAF_MEASUREMENT |
| 147 | + | <s1, 2657> |
| 148 | + | <endOffset, 2870> |
| 149 | +||||||||||||||||||||| [TsFileMetadata] begins |
| 150 | + 2891| [IndexOfTimerseriesIndex Node] type=LEAF_DEVICE |
| 151 | + | <root.sg1.d1, 2870> |
| 152 | + | <endOffset, 2891> |
| 153 | + | [meta offset] 2656 |
| 154 | + | [bloom filter] bit vector byte array length=31, filterSize=256, hashFunctionSize=5 |
| 155 | +||||||||||||||||||||| [TsFileMetadata] ends |
| 156 | + 2964| [TsFileMetadataSize] 73 |
| 157 | + 2968| [magic tail] TsFile |
| 158 | + 2974| END of TsFile |
| 159 | +---------------------------- IndexOfTimerseriesIndex Tree ----------------------------- |
| 160 | + [MetadataIndex:LEAF_DEVICE] |
| 161 | + └──────[root.sg1.d1,2870] |
| 162 | + [MetadataIndex:LEAF_MEASUREMENT] |
| 163 | + └──────[s1,2657] |
| 164 | +---------------------------------- TsFile Sketch End ---------------------------------- |
| 165 | +````````````````````````` |
| 166 | + |
| 167 | +解释: |
| 168 | + |
| 169 | +- 以"|"为分隔,左边是在TsFile文件中的实际位置,右边是梗概内容。 |
| 170 | +- "|||||||||||||||||||||"是为增强可读性而添加的导引信息,不是TsFile中实际存储的数据。 |
| 171 | +- 最后打印的"IndexOfTimerseriesIndex Tree"是对TsFile文件末尾的元数据索引树的重新整理打印,便于直观理解,不是TsFile中存储的实际数据。 |
| 172 | + |
| 173 | +## TsFile Resource概览工具 |
| 174 | + |
| 175 | +TsFile resource概览工具用于打印出TsFile resource文件的内容,工具位置为 tools/tsfile/print-tsfile-resource-files。 |
| 176 | + |
| 177 | +### 用法 |
| 178 | + |
| 179 | +- Windows: |
| 180 | + |
| 181 | +```bash |
| 182 | +.\print-tsfile-resource-files.bat <TsFile resource文件所在的文件夹路径,或者单个TsFile resource文件路径> |
| 183 | +``` |
| 184 | + |
| 185 | +- Linux or MacOs: |
| 186 | + |
| 187 | +``` |
| 188 | +./print-tsfile-resource-files.sh <TsFile resource文件所在的文件夹路径,或者单个TsFile resource文件路径> |
| 189 | +``` |
| 190 | + |
| 191 | +### 示例 |
| 192 | + |
| 193 | +以Windows系统为例: |
| 194 | + |
| 195 | +`````````````````````````bash |
| 196 | +.\print-tsfile-resource-files.bat D:\github\master\iotdb\data\datanode\data\sequence\root.sg1\0\0 |
| 197 | +```````````````````````` |
| 198 | +Starting Printing the TsFileResources |
| 199 | +```````````````````````` |
| 200 | +147 [main] WARN o.a.i.t.c.conf.TSFileDescriptor - not found iotdb-system.properties, use the default configs. |
| 201 | +230 [main] WARN o.a.iotdb.db.conf.IoTDBDescriptor - Cannot find IOTDB_HOME or IOTDB_CONF environment variable when loading config file iotdb-system.properties, use default configuration |
| 202 | +231 [main] WARN o.a.iotdb.db.conf.IoTDBDescriptor - Couldn't load the configuration iotdb-system.properties from any of the known sources. |
| 203 | +233 [main] WARN o.a.iotdb.db.conf.IoTDBDescriptor - Cannot find IOTDB_HOME or IOTDB_CONF environment variable when loading config file iotdb-system.properties, use default configuration |
| 204 | +237 [main] WARN o.a.iotdb.db.conf.IoTDBDescriptor - Couldn't load the configuration iotdb-system.properties from any of the known sources. |
| 205 | +Analyzing D:\github\master\iotdb\data\datanode\data\sequence\root.sg1\0\0\1669359533489-1-0-0.tsfile ... |
| 206 | + |
| 207 | +Resource plan index range [9223372036854775807, -9223372036854775808] |
| 208 | +device root.sg1.d1, start time 0 (1970-01-01T08:00+08:00[GMT+08:00]), end time 99 (1970-01-01T08:00:00.099+08:00[GMT+08:00]) |
| 209 | + |
| 210 | +Analyzing the resource file folder D:\github\master\iotdb\data\datanode\data\sequence\root.sg1\0\0 finished. |
| 211 | +````````````````````````` |
| 212 | + |
| 213 | +`````````````````````````bash |
| 214 | +.\print-tsfile-resource-files.bat D:\github\master\iotdb\data\datanode\data\sequence\root.sg1\0\0\1669359533489-1-0-0.tsfile.resource |
| 215 | +```````````````````````` |
| 216 | +Starting Printing the TsFileResources |
| 217 | +```````````````````````` |
| 218 | +178 [main] WARN o.a.iotdb.db.conf.IoTDBDescriptor - Cannot find IOTDB_HOME or IOTDB_CONF environment variable when loading config file iotdb-system.properties, use default configuration |
| 219 | +186 [main] WARN o.a.i.t.c.conf.TSFileDescriptor - not found iotdb-system.properties, use the default configs. |
| 220 | +187 [main] WARN o.a.iotdb.db.conf.IoTDBDescriptor - Couldn't load the configuration iotdb-system.properties from any of the known sources. |
| 221 | +188 [main] WARN o.a.iotdb.db.conf.IoTDBDescriptor - Cannot find IOTDB_HOME or IOTDB_CONF environment variable when loading config file iotdb-system.properties, use default configuration |
| 222 | +192 [main] WARN o.a.iotdb.db.conf.IoTDBDescriptor - Couldn't load the configuration iotdb-system.properties from any of the known sources. |
| 223 | +Analyzing D:\github\master\iotdb\data\datanode\data\sequence\root.sg1\0\0\1669359533489-1-0-0.tsfile ... |
| 224 | + |
| 225 | +Resource plan index range [9223372036854775807, -9223372036854775808] |
| 226 | +device root.sg1.d1, start time 0 (1970-01-01T08:00+08:00[GMT+08:00]), end time 99 (1970-01-01T08:00:00.099+08:00[GMT+08:00]) |
| 227 | + |
| 228 | +Analyzing the resource file D:\github\master\iotdb\data\datanode\data\sequence\root.sg1\0\0\1669359533489-1-0-0.tsfile.resource finished. |
| 229 | +````````````````````````` |
0 commit comments