...
注意: 如果没有设置输出文件的存储路径, 将使用 "TsFile_sketch_view.txt" 做为默认值。
在mac系统中的示例:
/iotdb/server/target/iotdb-server-{version}/tools/tsfileToolSet$ ./print-tsfile-sketch.sh test.tsfile
|````````````````````````
Starting Printing the TsFile Sketch
|````````````````````````
TsFile path:test.tsfile
Sketch save path:TsFile_sketch_view.txt
-------------------------------- TsFile Sketch --------------------------------
file path: test.tsfile
file length:
...
15462
14:40:55.619 [main] INFO org.apache.iotdb.tsfile.read.TsFileSequenceReader - Start reading file test.tsfile metadata from 15356, length 96
POSITION| CONTENT
-------- -------
0|
...
[magic head] TsFile
...
6|
...
[version number]
...
3
||||||||||||||||||||| [Chunk Group] of root.
...
sg_
...
1.
...
d1, num of Chunks:
...
4
7| [Chunk Group Header]
...
| [marker] 0
| [deviceID] root.sg_1.d1
...
...
...
...
21| [Chunk] of s6, numOfPoints:1000, time range:[0,999], tsDataType:INT64,
startTime: 0 endTime: 999 count: 1000 [minValue:6,maxValue:9996,firstValue:6,lastValue:9996,sumValue:5001000.0]
| [chunk
...
header] marker=5, measurementId=s6, dataSize=1826, serializedSize=9
| [chunk]
...
java.nio.HeapByteBuffer[pos=0 lim=1826 cap=1826]
|
...
[
...
page]
...
CompressedSize:1822, UncompressedSize:1951
1856| [Chunk] of s4, numOfPoints:1000, time range:[0,999], tsDataType:INT64,
startTime: 0 endTime: 999 count: 1000 [minValue:4,maxValue:9994,firstValue:4,lastValue:9994,sumValue:4999000.0]
| [chunk
...
header] marker=5, measurementId=s4, dataSize=1826, serializedSize=9
| [chunk]
...
java.nio.HeapByteBuffer[pos=0 lim=1826 cap=1826]
| [page]
...
CompressedSize:1822, UncompressedSize:1951
3691|
...
[Chunk] of
...
s2, numOfPoints:
...
1000, time range:[
...
0,
...
999], tsDataType:INT64,
...
...
startTime:
...
0 endTime:
...
999 count:
...
1000 [minValue:
...
3,maxValue:
...
9993,firstValue:
...
3,lastValue:
...
9993,sumValue:
...
4998000.0]
| [chunk
...
header] marker=5, measurementId=s2, dataSize=1826, serializedSize=9
| [chunk]
...
java.nio.HeapByteBuffer[pos=0 lim=1826 cap=1826]
| [page]
...
CompressedSize:1822, UncompressedSize:1951
5526| [Chunk] of s5, numOfPoints:1000, time range:[0,999], tsDataType:INT64,
startTime: 0 endTime: 999 count: 1000 [minValue:5,maxValue:9995,firstValue:5,lastValue:9995,sumValue:5000000.0]
| [chunk
...
header] marker=5, measurementId=s5, dataSize=1826, serializedSize=9
| [chunk]
...
java.nio.HeapByteBuffer[pos=0 lim=1826 cap=1826]
|
...
[page] CompressedSize:1822, UncompressedSize:1951
||||||||||||||||||||| [Chunk Group] of root.
...
sg_
...
1.
...
d1 ends
...
||||||||||||||||||||| [Chunk Group] of root.sg_1.d2, num of
...
Chunks:4
7361| [Chunk Group Header]
| [marker]
...
0
| [deviceID] root.sg_1.d2
...
...
7375| [Chunk] of
...
s2, numOfPoints:
...
1000, time range:[
...
0,
...
999], tsDataType:
...
INT64,
...
startTime:
...
0 endTime:
...
999 count:
...
1000 [minValue:
...
3,maxValue:
...
9993,firstValue:
...
3,lastValue:
...
9993,sumValue:
...
4998000.0]
| [chunk
...
header] marker=5, measurementId=s2, dataSize=1826, serializedSize=9
| [chunk]
...
java.nio.HeapByteBuffer[pos=0 lim=1826 cap=1826]
| [page]
...
CompressedSize:1822, UncompressedSize:1951
9210| [Chunk] of
...
s4, numOfPoints:
...
1000, time range:[
...
0,
...
999], tsDataType:
...
INT64,
...
...
startTime:
...
0 endTime:
...
999 count:
...
1000 [minValue:
...
4,maxValue:
...
9994,firstValue:
...
4,lastValue:
...
9994,sumValue:
...
4999000.0]
| [chunk
...
header] marker=5, measurementId=s4, dataSize=1826, serializedSize=9
| [chunk]
...
java.nio.HeapByteBuffer[pos=0 lim=1826 cap=1826]
| [page]
...
CompressedSize:1822, UncompressedSize:1951
...
11045|
...
[Chunk] of
...
s6, numOfPoints:
...
1000, time range:[
...
0,
...
999], tsDataType:
...
INT64,
...
...
startTime:
...
0 endTime:
...
999 count:
...
1000 [minValue:
...
6,maxValue:
...
9996,firstValue:
...
6,lastValue:
...
9996,sumValue:
...
5001000.0]
| [chunk
...
header] marker=5, measurementId=s6, dataSize=1826, serializedSize=9
| [chunk]
...
java.nio.HeapByteBuffer[pos=0 lim=1826 cap=1826]
| [page]
...
CompressedSize:1822, UncompressedSize:1951
12880| [Chunk] of s5, numOfPoints:1000, time range:[0,999], tsDataType:INT64,
startTime: 0 endTime: 999 count: 1000 [minValue:5,maxValue:9995,firstValue:5,lastValue:9995,sumValue:5000000.0]
| [chunk
...
header] marker=5, measurementId=s5, dataSize=1826, serializedSize=9
| [chunk]
...
java.nio.HeapByteBuffer[pos=0 lim=1826 cap=1826]
|
...
[page] CompressedSize:1822, UncompressedSize:1951
||||||||||||||||||||| [Chunk Group] of root.
...
sg_
...
1.
...
d2 ends
14715| [marker] 2
...
14716| [
...
TimeseriesIndex]
...
of root.sg_1.d1.s2, tsDataType:INT64
|
...
[
...
ChunkIndex]
...
s2, offset=3691
| [startTime: 0
...
endTime: 999 count:
...
1000 [minValue:3,maxValue:9993,firstValue:3,lastValue:9993,sumValue:4998000.0]]
14788| [TimeseriesIndex] of root.
...
sg_
...
1.d1.
...
s4,
...
tsDataType:INT64
|
...
...
...
[ChunkIndex] s4, offset=1856
|
...
[startTime:
...
0 endTime:
...
999 count:
...
1000 [minValue:4,maxValue:9994,firstValue:
...
4,lastValue:
...
9994,sumValue:4999000.0]]
14860| [TimeseriesIndex] of root.sg_1.d1.s5, tsDataType:INT64
| [ChunkIndex] s5, offset=5526
|
...
[startTime: 0 endTime: 999 count: 1000 [minValue:5,maxValue:9995,firstValue:5,lastValue:9995,sumValue:5000000.0]]
...
14932| [TimeseriesIndex] of
...
root.sg_1.d1.s6, tsDataType:
...
INT64
| [ChunkIndex] s6, offset=21
| [startTime:
...
0 endTime:
...
999 count:
...
1000 [minValue:6,maxValue:9996,firstValue:
...
6,lastValue
...
:9996,sumValue:5001000.0]]
15004| [TimeseriesIndex] of root.sg_1.d2.s2, tsDataType:INT64
...
...
...
| [ChunkIndex] s2, offset=7375
|
...
[startTime: 0 endTime: 999 count: 1000 [minValue:3,maxValue:9993,firstValue:3,lastValue:9993,sumValue:4998000.0]]
15076|
...
[TimeseriesIndex] of root.sg_1
...
.d2.s4, tsDataType:INT64
|
...
...
...
...
[ChunkIndex]
...
s4, offset=9210
|
...
[startTime: 0
...
endTime: 999 count: 1000 [minValue:4,maxValue:9994,firstValue:4,lastValue:9994,sumValue:4999000.0]]
...
15148| [
...
TimeseriesIndex] of root.
...
sg_
...
1.d2.s5, tsDataType:INT64
| [ChunkIndex]
...
s5, offset=12880
| [startTime: 0 endTime: 999 count: 1000
...
[minValue:5,maxValue:9995,firstValue:5,lastValue:9995,sumValue:5000000.0]]
15220| [TimeseriesIndex] of root.
...
sg_
...
1.d2.s6, tsDataType:INT64
...
|
...
...
[ChunkIndex] s6, offset=11045
...
|
...
...
[startTime: 0 endTime: 999
...
count: 1000 [minValue:6,maxValue:9996,firstValue:6,lastValue:9996,sumValue:5001000.0]]
|||||||||||||||||||||
...
...
...
15292| [IndexOfTimerseriesIndex Node] type=LEAF_MEASUREMENT
...
|
...
...
...
...
...
...
<s2, 14716>
| <s6, 14932>
...
| <endOffset, 15004>
15324| [IndexOfTimerseriesIndex
...
Node] type=LEAF_MEASUREMENT
| <s2, 15004>
...
...
| <s6, 15220>
...
...
|
...
<endOffset, 15292>
...
15356|
...
...
...
[TsFileMetadata]
| [meta
...
offset] 14715
| [num of devices] 2
...
...
| 2 key&TsMetadataIndex
|
...
...
[bloom filter bit vector byte array length] 32
|
...
...
...
...
[
...
bloom
...
filter
...
bit vector byte array]
| [bloom filter number of bits] 256
|
...
...
[bloom filter number of hash functions] 5
15452|
...
[
...
TsFileMetadataSize] 96
15456| [magic tail] TsFile
15462| END of TsFile
---------------------------- IndexOfTimerseriesIndex Tree -----------------------------
[MetadataIndex:LEAF_DEVICE]
└───[root.sg_1.d1,15292]
[MetadataIndex:LEAF_MEASUREMENT]
...
...
...
...
...
...
...
└───[s2,14716]
└───[s6,14932]
...
...
└───[root.sg_1.d2,15324]
[MetadataIndex:LEAF_MEASUREMENT]
...
...
...
...
└───[s2,15004]
...
...
...
└───[s6,15220]]
---------------------------------- TsFile Sketch End ----------------------------------
3.4 TsFileSequenceRead
您可以使用示例中的类 example/tsfile/org/apache/iotdb/tsfile/TsFileSequenceRead
顺序打印 TsFile 中的内容.
...