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

more

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