提交 98be150f 编写于 作者: H hzcheng

more

上级 a92a1f12
......@@ -10,7 +10,7 @@ IF ((TD_LINUX_64) OR (TD_LINUX_32 AND TD_ARM))
AUX_SOURCE_DIRECTORY(src SRC)
ADD_EXECUTABLE(taosd ${SRC})
TARGET_LINK_LIBRARIES(taosd mnode sdb taos_static monitor http)
TARGET_LINK_LIBRARIES(taosd mnode sdb taos_static monitor http tsdb)
#IF (TD_CLUSTER)
# TARGET_LINK_LIBRARIES(taosd dcluster)
......
/*
* 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/>.
*/
#if !defined(_TD_DATA_FORMAT_H_)
#define _TD_DATA_FORMAT_H_
......@@ -5,6 +19,9 @@
#include "schema.h"
#ifdef __cplusplus
extern "C" {
#endif
// ----------------- Data row structure
/* A data row, the format of it is like below:
......@@ -71,4 +88,8 @@ SDataRow tdSDataRowDup(SDataRow rdata);
*/
int32_t tdGetMaxDataRowSize(SSchema *pSchema);
#ifdef __cplusplus
}
#endif
#endif // _TD_DATA_FORMAT_H_
/**************************************
* FOR OUTSIDE USAGE
**************************************/
/*
* 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/>.
*/
#if !defined(_TD_TSDB_H_)
#define _TD_TSDB_H_
......@@ -11,6 +22,10 @@
#include "dataformat.h"
#include "schema.h"
#ifdef __cplusplus
extern "C" {
#endif
#define TSDB_VERSION_MAJOR 1
#define TSDB_VERSION_MINOR 0
......@@ -324,4 +339,8 @@ STableIDList *tsdbGetTableList(tsdb_query_handle_t *pQueryHandle);
*/
STableIDList *tsdbQueryTableList(int16_t stableId, const char *pTagCond);
#ifdef __cplusplus
}
#endif
#endif // _TD_TSDB_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/>.
*/
#if !defined(_TD_TSDBCACHE_H_)
#define _TD_TSDBCACHE_H_
......@@ -5,6 +19,10 @@
// #include "cache.h"
#ifdef __cplusplus
extern "C" {
#endif
#define TSDB_DEFAULT_CACHE_BLOCK_SIZE 16*1024*1024 /* 16M */
typedef struct {
......@@ -38,4 +56,8 @@ typedef struct STSDBCache {
SCacheHandle *tsdbCreateCache(int32_t numOfBlocks);
int32_t tsdbFreeCache(SCacheHandle *pHandle);
#ifdef __cplusplus
}
#endif
#endif // _TD_TSDBCACHE_H_
/*
* 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/>.
*/
#if !defined(_TD_TSDB_FILE_H_)
#define _TD_TSDB_FILE_H_
#include <stdint.h>
// #include "tstring.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef int32_t file_id_t;
typedef enum {
......@@ -38,4 +56,8 @@ typedef struct {
char *tsdbGetFileName(char *dirName, char *fname, TSDB_FILE_TYPE type);
#ifdef __cplusplus
}
#endif
#endif // _TD_TSDB_FILE_H_
/************************************
* For internal usage
************************************/
/*
* 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/>.
*/
#if !defined(_TSDB_META_H_)
#define _TSDB_META_H_
#include <pthread.h>
#include "dataformat.h"
#ifdef __cplusplus
extern "C" {
#endif
// #include "taosdef.h"
// Initially, there are 4 tables
......@@ -59,7 +76,7 @@ typedef struct STable {
typedef struct {
int32_t maxTables;
STable ** tables; // array of normal tables
STable **tables; // array of normal tables
STable * stables; // linked list of super tables
void * tableMap; // hash map of uid ==> STable *
} STsdbMeta;
......@@ -93,3 +110,9 @@ STsdbMeta *tsdbOpenMetaHandle(char *tsdbDir);
int32_t tsdbCreateTableImpl(STsdbMeta *pHandle, STableCfg *pCfg);
int32_t tsdbInsertDataImpl(STsdbMeta *pMeta, STableId tableId, char *pData);
#ifdef __cplusplus
}
#endif
#endif // _TSDB_META_H_
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册