Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.



字节数字节数(bytes)

原字节

(V2)

含义

(Meaning)

改动

(V3 difference)

MAGIC_STRING65473 4669 6c65TsFile
VERSION_NUMBER63030 3030 3032版本号000002(考虑1字节)version: 000002version:  000003版本号改成03





Chunk Header

101chunk header marker放入Chunk Header中,改名为chunk type,若为05则表示chunk内只有一个page,不包含statisticsMove to Chunk Header,rename to chunk type,05 means there is only one Page in a chunk without statistics
400 0000 03string长度为3int 改成 -> varInt
373 2e33s.3
40000 0053chunk的大小是83字节Size of Chunk is  83 bytesint 改成 -> varInt
20003数据类型是floatDatatype is  floatshort 改成 -> byte
40000 0001chunk内page的个数Number of pages in chunkremove this field删除
20001Snappy压缩方法Compression is Snappyshort 改成 byte
20006GORILLA编码Encoding is GORILLAshort 改成 byte


Page Header

40000 0020解压后page data大小删除?待讨论,如果删除,可能会导致解压时,多一次内存拷贝,建议保留,int 改成 varInt,一个page大小不能超过2G(做检查)Uncompressed size of page data
40000 001b解压前page data大小Compressed size of page dataint 改成 -> varInt





Page Statistics

80000 0000 0000 0001countlong 改成 varInt,记得检查-> varInt
80000 0000 0000 0001start_time
80000 0000 0000 0001end_time
44000 0000min_value(bool, text没有text do not has this field)
44000 0000max_value(bool, text没有text do not has this field)
44000 0000first_value
44000 0000last_value
84000 0000 0000 0000sum(bool, text没有text do not has this field)bool值需要支持sum,int、bool改成long类型
Page Data272004 1800 0d01 047f
ff09 0138 0000 0000
0000 0001 0000 0040
c447 f8


27字节的数据27 bytes of data

数据里的int类型,以及string前面的




Chunk Group Footer

100marker考虑放到前面,改成chunk move to chunk group header
40000 0010设备名长度size of deviceIdint 改成 varInt
16726f 6f74 2e74 7572 6269 6e65 312e 6431设备名字deviceId
80000 0000 0000 0069chunk group data size删除remove
40000 0001chunk number删除remove


MemTable Version

103MemTable version markerremove
800 0000 0000 0000 65版本是101memtable version is 101remove
Metadata Metadatat Marker102开始进入元数据区the following is metadata








ChunkMetadata(N个)













40000 0003sensor名长度删除remove
4732e 33s.1删除remove
800 0000 0000 0000 0c该chunk的offset在12
20003数据类型为floatdata type is  floatremove删除





Chunk Statistics

80000 0000 0000 0001chunk中有1个点long 改成 -> varInt
80000 0000 0000 0001start_time
80000 0000 0000 0001end_time
44000 0000min_value
44000 0000max_value
44000 0000first_value
44000 0000last_value
84000 0000 0000 0000sum








TimeSeries Metadata(N个)















1

新增 timeseries metadata type,若为00则表示不包含statistics
400 0000 03sensor名长度int 改成 varInt
373 2e33s.1
20003数据类型为floatshort -> byte
80000 0000 0000 00a0ChunkMetadataList的offset
40000 0041ChunkMetadataList的sizeint 改成 varInt









TimeSeries Statistics

80000 0000 0000 0001该序列在file中有1个点long 改成 varInt
80000 0000 0000 0001start_time
80000 0000 0000 0001end_time
44000 0000min_value
44000 0000max_value
44000 0000first_value
44000 0000last_value
84000 0000 0000 0000sum





MetaDataIndex Node





40000 0001树的第二层,他有多少个孩子int 改成 -> varInt


MetaDataIndex Entry(N个)

40000 0003sensor名长度为3int 改成 -> varInt
3732e 33s.3
800 0000 0000 0000 e1offset of the child

800 0000 0000 0001 26endOffset of the last child

103Node type是Leaf_Measurement



MetaDataIndex Node





40000 0001树的第一层,他有多少个孩子int 改成 -> varInt



MetaDataIndex Entry(N个)

40000 0010设备名长度为16size of deviceid is 16bytesint 改成 -> varInt
16726f 6f74 2e74 7572 6269 6e65 312e 6431设备名name of deviceId
80000 0000 0000 0126offset of the child

80000 0000 0000 0142endOffset of the last child

102Node type是Internal_MeasurementNode type改成LEAF_DEVICE
total chunk number
40000 0001total chunk number删除remove
invalid chunk number
40000 0000无效的chunk number删除remove


Version Info




400 0000 01version pair的个数int 改成 varIntremove


Version Pair(N个)

800 0000 0000 0000 9foffset of current versionremove
800 0000 0000 0000 65版本是101remove




Bloom Filter





40000 001fbloom filter sizeint 改成 varInt
3100 0000 0040 0000 0000 0000 0000
0100 0000 2000 0000 0020 0000 0000 0000 0004


bloom filter data


40000 0100filter sizeint 改成 varInt
40000 0005hash function sizeint 改成 varInt
Footer40000 0078tsfile metadata size不能使用varInt,因为这个需要倒着读
MAGIC_STRING65473 4669 6c65TsFile

...