提交 c336ec74 编写于 作者: H Hongze Cheng

more code

上级 2f91256a
......@@ -22,6 +22,17 @@
extern "C" {
#endif
typedef struct SFDataPtr {
int64_t offset;
int64_t size;
} SFDataPtr;
typedef struct {
int64_t prevFooter;
SFDataPtr dict[4]; // 0:bloom filter, 1:SSttBlk, 2:STbStatisBlk, 3:SDelBlk
uint8_t reserved[24];
} SFSttFooter;
#include "tsdbUtil.h"
#include "tsdbFile.h"
......
......@@ -51,7 +51,7 @@ int32_t tsdbFileSetEdit(struct SFileSet *pSet, struct SFileOp *pOp) {
ppFile = &pSet->fTomb;
} break;
case TSDB_FTYPE_STT: {
ppFile = &pSet->lStt[0].fStt;
// ppFile = &pSet->lStt[0].fStt;
} break;
default: {
ASSERTS(0, "Invalid file type");
......
......@@ -22,7 +22,7 @@
extern "C" {
#endif
typedef struct SSttLevel SSttLevel;
typedef struct SSttLvl SSttLvl;
typedef enum {
TSDB_FOP_EXTEND = -2,
......@@ -39,10 +39,10 @@ struct SFileOp {
struct STFile nState; // new file state
};
struct SSttLevel {
struct SSttLvl {
int32_t level;
int32_t nStt;
SSttLevel *pNext;
SSttLvl *pNext;
struct STFile *fSttList;
};
......@@ -53,7 +53,7 @@ struct SFileSet {
struct STFile *fData; // .data
struct STFile *fSma; // .sma
struct STFile *fTomb; // .tomb
SSttLevel *sttLevelList;
SSttLvl *sttLevelList;
};
int32_t tsdbFileSetCreate(int32_t fid, struct SFileSet **ppSet);
......
......@@ -14,6 +14,13 @@
*/
#include "tsdbSttFReader.h"
#include "dev.h"
struct SSttFReader {
STsdb *pTsdb;
SFSttFooter footer;
const void *bloomFilter;
};
int32_t tsdbSttFReaderOpen(const struct SSttFReaderConf *pConf, struct SSttFReader **ppReader) {
int32_t code = 0;
......
......@@ -21,12 +21,6 @@ extern int32_t tsdbWriteFile(STsdbFD *pFD, int64_t offset, const uint8_t *pBuf,
extern int32_t tsdbReadFile(STsdbFD *pFD, int64_t offset, uint8_t *pBuf, int64_t size);
extern int32_t tsdbFsyncFile(STsdbFD *pFD);
typedef struct {
int64_t prevFooter;
SFDataPtr dict[4]; // 0:bloom filter, 1:SSttBlk, 2:STbStatisBlk, 3:SDelBlk
uint8_t reserved[24];
} SFSttFooter;
struct SSttFWriter {
struct SSttFWriterConf config;
// file
......
......@@ -26,11 +26,6 @@ extern "C" {
typedef struct SDelBlock SDelBlock;
typedef struct SDelBlk SDelBlk;
typedef struct SFDataPtr {
int64_t offset;
int64_t size;
} SFDataPtr;
int32_t tDelBlockCreate(SDelBlock *pDelBlock, int32_t capacity);
int32_t tDelBlockDestroy(SDelBlock *pDelBlock);
int32_t tDelBlockClear(SDelBlock *pDelBlock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册