GithubHelp home page GithubHelp logo

rtrans's Introduction

1. To start a new data manager, need parameters
data_dir: the dir to store the data and metadata
format_version: the version of index and data file
size_per_index: size in byte per index
index_num_per_file: number of index per index file
max_size_data_file: maximum size per data file
data_blk_size: block size for data file


data_dir +
         + metadata [bin file] #generated by data manager
         + transid [dir] #transid for every backend
         + 0...n [dir]
            + index.0
            + data.0

metadata structrue: 
    [format_version, size_per_index, index_num_per_file, index_file_num_per_dir,max_size_data_file, data_blk_size, need_compress], 
    size: 2+4+4+4+8+4+2 = 28 bytes
index structrue: 
    [transid, type_no, dir_no, file_no, data_blk_no, data_len, checksum], 
    size: 8+4+4+4+8+4+4 = 36
data structure: 
    [transid, checksum, raw_datapack]


format_version: 16-bits unsigned integer (S)
size_per_index: 32-bits unsigned integer (L)
index_num_per_file: 32-bits unsigned integer (L)
index_file_num_per_dir: 32-bits unsigned integer (L)
max_size_data_file: 64-bits unsigned integer (Q)
data_blk_size: 32-bits unsigned integer (L)
need_compress: 16-bits unsigned integer (S)

transid: 64-bits unsigned integer (Q)
type_no: 32-bits unsigned integer (L)
dir_no: 32-bits unsigned integer (L)
file_no: 32-bits unsigned integer (L)
data_blk_no: 64-bits unsigned integer (Q)
data_len: 32-bits unsigned integer(L)
check_sum: 32-bits unsigned integer(L) CRC check sum

NOTICE:
1. transid start from 1, 0 stands for nil

rtrans's People

Contributors

creatstar avatar

Stargazers

 avatar  avatar

Watchers

 avatar

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.