tsdbFile.h 656 字节
Newer Older
H
more  
Hongze Cheng 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#if !defined(_TD_TSDB_FILE_H_)
#define _TD_TSDB_FILE_H_

#include "tstring.h"

typedef int32_t file_id_t;

typedef enum : uint8_t {
  TSDB_FILE_TYPE_HEAD,
  TSDB_FILE_TYPE_DATA,
  TSDB_FILE_TYPE_LAST,
  TSDB_FILE_TYPE_META
} TSDB_FILE_TYPE;

typedef struct {
  int64_t fileSize;
} SFileInfo;

typedef struct {
  tstring_t fname;
H
more  
Hongze Cheng 已提交
21
  SFileInfo fInfo;
H
more  
Hongze Cheng 已提交
22 23
} SFILE;

H
more  
Hongze Cheng 已提交
24 25 26 27 28 29 30
typedef struct {
  int64_t offset;
  int64_t skey;
  int64_t ekey;
  int16_t numOfBlocks;
} SDataBlock;

H
more  
Hongze Cheng 已提交
31 32 33 34 35 36
tstring_t tdGetHeadFileName(/* TODO */);
tstring_t tdGetDataFileName(/* TODO */);
tstring_t tdGetLastFileName(/* TODO */);
tstring_t tdGetMetaFileName(/* TODO */);

#endif  // _TD_TSDB_FILE_H_