Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Tonvia
TDengine
提交
98be150f
T
TDengine
项目概览
Tonvia
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
98be150f
编写于
3月 03, 2020
作者:
H
hzcheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
more
上级
a92a1f12
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
119 addition
and
12 deletion
+119
-12
src/dnode/CMakeLists.txt
src/dnode/CMakeLists.txt
+1
-1
src/vnode/common/inc/dataformat.h
src/vnode/common/inc/dataformat.h
+21
-0
src/vnode/tsdb/inc/tsdb.h
src/vnode/tsdb/inc/tsdb.h
+22
-3
src/vnode/tsdb/inc/tsdbCache.h
src/vnode/tsdb/inc/tsdbCache.h
+22
-0
src/vnode/tsdb/inc/tsdbFile.h
src/vnode/tsdb/inc/tsdbFile.h
+22
-0
src/vnode/tsdb/inc/tsdbMeta.h
src/vnode/tsdb/inc/tsdbMeta.h
+31
-8
未找到文件。
src/dnode/CMakeLists.txt
浏览文件 @
98be150f
...
@@ -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)
...
...
src/vnode/common/inc/dataformat.h
浏览文件 @
98be150f
/*
* 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_
src/vnode/tsdb/inc/tsdb.h
浏览文件 @
98be150f
/**************************************
/*
* 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
src/vnode/tsdb/inc/tsdbCache.h
浏览文件 @
98be150f
/*
* 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_
src/vnode/tsdb/inc/tsdbFile.h
浏览文件 @
98be150f
/*
* 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_
src/vnode/tsdb/inc/tsdbMeta.h
浏览文件 @
98be150f
/************************************
/*
* 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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录