Giter Site home page Giter Site logo

New File format about tsfile HOT 1 OPEN

qiaojialin avatar qiaojialin commented on July 18, 2024
New File format

from tsfile.

Comments (1)

jixuan1989 avatar jixuan1989 commented on July 18, 2024

TsFile 文件结构变化记录
2018/11/13 黄向东、乔嘉林、刘昆、江天

    1. Thanos V1
    2. 2.3 文件结构
      TsFile thanos分支中RowGroup 的 metadata存在数据之前,需要在内存中缓存整个 RowGroup 的数据。结构如下图。

image

1. 2.3	接口

写RowGroup Metadata:RowGroupWriter.writeMedatadata()
单列数据写入内存:ChunkWriter.write(datapoint)
单列数据写入磁盘:ChunkWriter.flush()
1. 2.3 数据恢复
将不完整的RowGroup切掉,最后生成完整的File Metadata,此种方式会丢失一个RowGroup。
* 2. Thanos V2
1. 2.3 文件结构
为了减少RowGroup 数据内存占用,现将 RowGroup Metadata 移动到每个 RowGroup数据之后,Chunk与 Page 结构不变。

image

此种结构,内存中仅需缓存一个 Chunk 的数据,按需要可以随时将 Chunk 写入磁盘。每个Header前的byte用来标识接下来的一个metadata的种类。
1. 2.3 接口
在内存创建RowGroup Metadata:RowGroupWriter.startRowGroup()
单列数据写入内存:ChunkWriter.write(datapoint)
单列数据写入磁盘:ChunkWriter.flush()
RowGroup Metadata 写入磁盘:RowGroupWriter.writeMetadata()
1. 2.3 数据恢复
将最后一个不完整的Chunk 切掉,生成RowGroup Metadata,生成File Metadata,此种方式会丢失一个Chunk。

from tsfile.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.