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

refact code

上级 5bacfb4f
......@@ -35,23 +35,23 @@ set(
"src/sma/smaSnapshot.c"
"src/sma/smaTimeRange.c"
# tsdb
"src/tsdb/tsdbCommit.c"
"src/tsdb/tsdbFile.c"
"src/tsdb/tsdbFS.c"
"src/tsdb/tsdbOpen.c"
"src/tsdb/tsdbMemTable.c"
"src/tsdb/tsdbRead.c"
"src/tsdb/tsdbCache.c"
"src/tsdb/tsdbWrite.c"
"src/tsdb/tsdbReaderWriter.c"
"src/tsdb/tsdbUtil.c"
"src/tsdb/tsdbSnapshot.c"
"src/tsdb/tsdbCacheRead.c"
"src/tsdb/tsdbRetention.c"
"src/tsdb/tsdbDiskData.c"
"src/tsdb/tsdbMergeTree.c"
"src/tsdb/tsdbDataIter.c"
# # tsdb
# "src/tsdb/tsdbCommit.c"
# "src/tsdb/tsdbFile.c"
# "src/tsdb/tsdbFS.c"
# "src/tsdb/tsdbOpen.c"
# "src/tsdb/tsdbMemTable.c"
# "src/tsdb/tsdbRead.c"
# "src/tsdb/tsdbCache.c"
# "src/tsdb/tsdbWrite.c"
# "src/tsdb/tsdbReaderWriter.c"
# "src/tsdb/tsdbUtil.c"
# "src/tsdb/tsdbSnapshot.c"
# "src/tsdb/tsdbCacheRead.c"
# "src/tsdb/tsdbRetention.c"
# "src/tsdb/tsdbDiskData.c"
# "src/tsdb/tsdbMergeTree.c"
# "src/tsdb/tsdbDataIter.c"
# tq
"src/tq/tq.c"
......@@ -68,14 +68,12 @@ set(
"src/tq/tqOffsetSnapshot.c"
)
if (USE_DEV_CODE)
aux_source_directory("src/tsdb/dev" VNODE_SOURCE_DEV_FILES)
list(
APPEND
VNODE_SOURCE_FILES
${VNODE_SOURCE_DEV_FILES}
)
endif(USE_DEV_CODE)
aux_source_directory("src/tsdb/" TSDB_SOURCE_FILES)
list(
APPEND
VNODE_SOURCE_FILES
${TSDB_SOURCE_FILES}
)
target_sources(
vnode
......
/*
* 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 _TSDB_DEV_H
#define _TSDB_DEV_H
#include "tsdb.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "inc/tsdbUtil2.h"
#include "inc/tsdbFile2.h"
#include "inc/tsdbFSet2.h"
#include "inc/tsdbFS2.h"
#include "inc/tsdbSttFileRW.h"
#include "inc/tsdbDataFileRW.h"
#ifdef __cplusplus
}
#endif
#endif /*_TSDB_DEV_H*/
\ No newline at end of file
......@@ -13,7 +13,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "inc/tsdbCommit2.h"
#include "tsdbCommit2.h"
// extern dependencies
typedef struct {
......
......@@ -13,7 +13,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "inc/tsdbDataFileRW.h"
#include "tsdbDataFileRW.h"
typedef struct {
SFDataPtr brinBlkPtr[1];
......
......@@ -13,7 +13,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "inc/tsdbFS2.h"
#include "tsdbFS2.h"
extern int vnodeScheduleTask(int (*execute)(void *), void *arg);
extern int vnodeScheduleTaskEx(int tpid, int (*execute)(void *), void *arg);
......
......@@ -13,7 +13,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "inc/tsdbFSet2.h"
#include "tsdbFSet2.h"
static int32_t tsdbSttLvlInit(int32_t level, SSttLvl **lvl) {
if (!(lvl[0] = taosMemoryMalloc(sizeof(SSttLvl)))) return TSDB_CODE_OUT_OF_MEMORY;
......
......@@ -13,7 +13,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "inc/tsdbFile2.h"
#include "tsdbFile2.h"
// to_json
static int32_t head_to_json(const STFile *file, cJSON *json);
......
......@@ -13,7 +13,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "inc/tsdbIter.h"
#include "tsdbIter.h"
// STsdbIter ================
struct STsdbIter {
......
......@@ -13,7 +13,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "inc/tsdbMerge.h"
#include "tsdbMerge.h"
typedef struct {
STsdb *tsdb;
......
......@@ -15,7 +15,7 @@
#include "tsdb.h"
#ifdef USE_DEV_CODE
#include "dev/dev.h"
#include "tsdbFS2.h"
#endif
int32_t tsdbSetKeepCfg(STsdb *pTsdb, STsdbCfg *pCfg) {
......
......@@ -13,7 +13,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "inc/tsdbSttFileRW.h"
#include "tsdbSttFileRW.h"
typedef struct {
int64_t prevFooter;
......
......@@ -13,7 +13,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "dev.h"
#include "tsdbUtil2.h"
// SDelBlock ----------
int32_t tTombBlockInit(STombBlock *tombBlock) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册