THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
- 所有数据都存在data文件夹下
- 一个时间序列数据到达时,先根据顺乱序分到sequence或unsequence文件夹下
- 再根据其逻辑存储组确定物理隔离的文件夹(即图中的逻辑存储组)
- 再根据设备的hash值区确定不同的虚拟存储组号(即图中的虚拟存储组)
- 再根据数据所属的时间分区确定时间分区号(即图中的时间分区)
- 最终写入当前活跃的memtable中,经刷盘写入最终的数据文件(即图中的数据文件)
2.类图结构
- 一个InsertPlan先到达StorageEngine,此前其已经在MManager中取到相应的元数据,现在开始进行数据写入
- StorageEngine根据InsertPlan中的逻辑存储组名找到对应的VirtualStorageGroupManager(注意:我们每一种InsertPlan都仅写入StorageEngine根据InsertPlan中的逻辑存储组名找到对应的StorageGroupManager(注意:我们每一种InsertPlan都仅写入一个存储组的数据)
- VitrualStorageGroupManager根据InsertPlan中的设备名进行hash,确定其虚拟存储组号,找到对应的StorageGroupProcessor(注意:我们每一种InsertPlan都仅写入StorageGroupManager根据InsertPlan中的设备名进行hash,确定其虚拟存储组号,找到对应的VirtualStorageGroupProcessor(注意:我们每一种InsertPlan都仅写入一个设备的数据)
- StorageGroupProcessor根据时间分区切分InsertPlan,将其转发给响应分区的TsfileProcessorVirtualStorageGroupProcessor根据时间分区切分InsertPlan,将其转发给响应分区的TsfileProcessor
- TsfileProcessor将数据写入内存缓冲区,当内存控制触发后,写入其对应的tsfile文件
...