提交 172eeee6 编写于 作者: H Hongze Cheng

refact more code

上级 eba557ef
......@@ -22,26 +22,17 @@
extern "C" {
#endif
typedef struct SFDataPtr {
int64_t offset;
int64_t size;
} SFDataPtr;
#include "inc/tsdbUtil.h"
typedef struct {
int64_t prevFooter;
SFDataPtr dict[4]; // 0:bloom filter, 1:SSttBlk, 2:STbStatisBlk, 3:SDelBlk
uint8_t reserved[24];
} SFSttFooter;
#include "inc/tsdbFile.h"
#include "tsdbUtil.h"
#include "inc/tsdbFSet.h"
#include "tsdbFile.h"
#include "inc/tsdbFS.h"
#include "tsdbFSet.h"
#include "inc/tsdbSttFReaderWriter.h"
#include "tsdbFS.h"
#include "tsdbSttFWriter.h"
#include "inc/tsdbDataFReaderWriter.h"
#ifdef __cplusplus
}
......
......@@ -13,30 +13,25 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _TD_TSDB_STT_FILE_READER_H
#define _TD_TSDB_STT_FILE_READER_H
#include "tsdbDef.h"
#include "tsdb.h"
#ifndef _TD_TSDB_DATA_F_READER_WRITER_H_
#define _TD_TSDB_DATA_F_READER_WRITER_H_
#ifdef __cplusplus
extern "C" {
#endif
/* Exposed Handle */
struct SSttFReader;
struct SSttFReaderConf;
typedef struct SDataFReader SDataFReader;
typedef struct SDataFWriter SDataFWriter;
/* Exposed APIs */
int32_t tsdbSttFReaderOpen(const struct SSttFReaderConf *pConf, struct SSttFReader **ppReader);
int32_t tsdbSttFReaderClose(struct SSttFReader *pReader);
/* Exposed Structs */
struct SSttFReaderConf {
// TODO
};
#ifdef __cplusplus
}
#endif
#endif /*_TD_TSDB_STT_FILE_READER_H*/
\ No newline at end of file
#endif /*_TD_TSDB_DATA_F_READER_WRITER_H_*/
\ No newline at end of file
/*
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
*
* This program is free software: you can use, redistribute, and/or modify
* it under the terms of the GNU Affero General Public License, version 3
* or later ("AGPL"), as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _TD_TSDB_DEF_H_
#define _TD_TSDB_DEF_H_
#include "tsdb.h"
#ifdef __cplusplus
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;
#ifdef __cplusplus
}
#endif
#endif /*_TD_TSDB_DEF_H_*/
\ No newline at end of file
......@@ -16,7 +16,7 @@
#ifndef _TSDB_FILE_SYSTEM_H
#define _TSDB_FILE_SYSTEM_H
#include "tsdb.h"
#include "tsdbDef.h"
#ifdef __cplusplus
extern "C" {
......
......@@ -16,7 +16,7 @@
#ifndef _TSDB_FILE_SET_H
#define _TSDB_FILE_SET_H
#include "tsdb.h"
#include "tsdbDef.h"
#ifdef __cplusplus
extern "C" {
......
......@@ -16,7 +16,7 @@
#ifndef _TSDB_FILE_H
#define _TSDB_FILE_H
#include "tsdb.h"
#include "tsdbDef.h"
#ifdef __cplusplus
extern "C" {
......
......@@ -16,7 +16,7 @@
#ifndef _TSDB_STT_FILE_WRITER_H
#define _TSDB_STT_FILE_WRITER_H
#include "tsdbFile.h"
#include "tsdbDef.h"
#ifdef __cplusplus
extern "C" {
......
......@@ -16,7 +16,7 @@
#ifndef _TSDB_UTIL_H
#define _TSDB_UTIL_H
#include "tsdb.h"
#include "tsdbDef.h"
#ifdef __cplusplus
extern "C" {
......
......@@ -13,23 +13,13 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#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;
struct SDataFReader {
STsdb *pTsdb;
// TODO
return code;
}
};
int32_t tsdbSttFReaderClose(struct SSttFReader *pReader) {
int32_t code = 0;
// TODO
return code;
}
struct SDataFWriter {
STsdb *pTsdb;
};
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册