Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Cherenkov effect
TDengine
提交
403a25b1
T
TDengine
项目概览
Cherenkov effect
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
2
Star
0
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,发现更多精彩内容 >>
提交
403a25b1
编写于
2月 11, 2020
作者:
S
slguan
浏览文件
操作
浏览文件
下载
差异文件
Merge branch '2.0' of
https://github.com/taosdata/TDengine
into 2.0
上级
9427e9d8
e8d96d43
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
101 addition
and
64 deletion
+101
-64
src/vnode/common/data/inc/data.h
src/vnode/common/data/inc/data.h
+0
-28
src/vnode/common/datastructure/inc/dlist.h
src/vnode/common/datastructure/inc/dlist.h
+0
-29
src/vnode/common/inc/dataformat.h
src/vnode/common/inc/dataformat.h
+66
-0
src/vnode/common/inc/schema.h
src/vnode/common/inc/schema.h
+0
-0
src/vnode/common/inc/type.h
src/vnode/common/inc/type.h
+1
-1
src/vnode/common/src/dataformat.c
src/vnode/common/src/dataformat.c
+0
-0
src/vnode/tsdb/inc/tsdbCache.h
src/vnode/tsdb/inc/tsdbCache.h
+24
-4
src/vnode/tsdb/inc/tsdbMeta.h
src/vnode/tsdb/inc/tsdbMeta.h
+1
-1
src/vnode/tsdb/src/tsdb.c
src/vnode/tsdb/src/tsdb.c
+9
-1
未找到文件。
src/vnode/common/data/inc/data.h
已删除
100644 → 0
浏览文件 @
9427e9d8
#if !defined(_TD_DATA_H_)
#define _TD_DATA_H_
#include <stdint.h>
#include "schema.h"
/* The row data should in the form of
*/
// ---- Row data interface
typedef
struct
{
int32_t
numOfRows
;
char
*
data
;
}
SRData
;
// ---- Column data interface
typedef
struct
{
int32_t
numOfPoints
;
char
*
data
;
}
SCData
;
typedef
struct
{
int32_t
numOfCols
;
SCData
**
pData
;
}
SCDataBlock
;
#endif // _TD_DATA_H_
src/vnode/common/datastructure/inc/dlist.h
已删除
100644 → 0
浏览文件 @
9427e9d8
// A doubly linked list
#if !defined(_TD_DLIST_H_)
#define _TD_DLIST_H_
#include <stdint.h>
typedef
struct
{
SListNode
*
prev
;
SListNode
*
next
;
void
*
data
;
}
SListNode
;
// Doubly linked list
typedef
struct
{
SListNode
*
head
;
SListNode
*
tail
;
int32_t
length
;
}
SDList
;
// ----- Set operation
#define TD_GET_DLIST_LENGTH(pDList) (((SDList *)pDList)->length)
#define TD_GET_DLIST_HEAD(pDList) (((SDList *)pDList)->head)
#define TD_GET_DLIST_TAIL(pDList) (((SDList *)pDList)->tail)
#define TD_GET_DLIST_NEXT_NODE(pDNode) (((SListNode *)pDNode)->next)
#define TD_GET_DLIST_PREV_NODE(pDNode) (((SListNode *)pDNode)->prev)
#define TD_GET_DLIST_NODE_DATA(pDNode) (((SListNode *)pDNode)->data)
#endif // _TD_DLIST_H_
src/vnode/common/inc/dataformat.h
0 → 100644
浏览文件 @
403a25b1
#if !defined(_TD_DATA_FORMAT_H_)
#define _TD_DATA_FORMAT_H_
#include <stdint.h>
#include "type.h"
#include "schema.h"
// ----------------- Data row structure
/* A data row, the format of it is like below:
* +---------+---------------------------------+
* | int32_t | |
* +---------+---------------------------------+
* | len | data |
* +---------+---------------------------------+
*/
typedef
char
*
SDataRow
;
/* Data rows definition, the format of it is like below:
* +---------+---------+-----------------------+--------+-----------------------+
* | int32_t | int32_t | | | |
* +---------+---------+-----------------------+--------+-----------------------+
* | len | nrows | SDataRow | .... | SDataRow |
* +---------+---------+-----------------------+--------+-----------------------+
*/
typedef
char
*
SDataRows
;
/* Data column definition
* +---------+---------+-----------------------+
* | int32_t | int32_t | |
* +---------+---------+-----------------------+
* | len | npoints | data |
* +---------+---------+-----------------------+
*/
typedef
char
*
SDataCol
;
/* Data columns definition
* +---------+---------+-----------------------+--------+-----------------------+
* | int32_t | int32_t | | | |
* +---------+---------+-----------------------+--------+-----------------------+
* | len | npoints | SDataCol | .... | SDataCol |
* +---------+---------+-----------------------+--------+-----------------------+
*/
typedef
char
*
SDataCols
;
// ----------------- Data column structure
// ---- operation on SDataRow;
#define TD_DATAROW_LEN(pDataRow) (*(int32_t *)(pDataRow))
#define TD_DATAROW_DATA(pDataRow) ((pDataRow) + sizeof(int32_t))
// ---- operation on SDataRows
#define TD_DATAROWS_LEN(pDataRows) (*(int32_t *)(pDataRows))
#define TD_DATAROWS_ROWS(pDataRows) (*(int32_t *)(pDataRows + sizeof(int32_t)))
#define TD_NEXT_DATAROW(pDataRow) ((pDataRow) + TD_DATAROW_LEN(pDataRow))
// ---- operation on SDataCol
#define TD_DATACOL_LEN(pDataCol) (*(int32_t *)(pDataCol))
#define TD_DATACOL_NPOINTS(pDataCol) (*(int32_t *)(pDataCol + sizeof(int32_t)))
// ---- operation on SDataCols
#define TD_DATACOLS_LEN(pDataCols) (*(int32_t *)(pDataCols))
#define TD_DATACOLS_NPOINTS(pDataCols) (*(int32_t *)(pDataCols + sizeof(int32_t)))
#endif // _TD_DATA_FORMAT_H_
src/vnode/common/
catalog/
inc/schema.h
→
src/vnode/common/inc/schema.h
浏览文件 @
403a25b1
文件已移动
src/vnode/common/
catalog/
inc/type.h
→
src/vnode/common/inc/type.h
浏览文件 @
403a25b1
...
...
@@ -4,7 +4,7 @@
#include <stdint.h>
typedef
enum
:
uint8_t
{
TD_DATATYPE_INVLD
=
0
,
TD_DATATYPE_INVLD
=
0
,
// invalid data type
TD_DATATYPE_BOOL
,
TD_DATATYPE_TINYINT
,
TD_DATATYPE_SMALLINT
,
...
...
src/vnode/common/src/dataformat.c
0 → 100644
浏览文件 @
403a25b1
src/vnode/tsdb/inc/tsdbCache.h
浏览文件 @
403a25b1
...
...
@@ -6,16 +6,36 @@
#include "cache.h"
#include "dlist.h"
#define TSDB_DEFAULT_CACHE_BLOCK_SIZE 16*1024*1024
/* 16M */
typedef
struct
{
int64_t
skey
;
// start key
int64_t
ekey
;
// end key
int32_t
numOfRows
// numOfRows
}
STableCacheInfo
;
typedef
struct
{
int64_t
blockId
;
SCacheBlock
*
pBlock
char
*
pData
;
STableCacheInfo
*
pTableInfo
;
SCacheBlock
*
prev
;
SCacheBlock
*
next
;
}
STSDBCacheBlock
;
// Use a doublely linked list to implement this
typedef
struct
STSDBCache
{
int64_t
blockId
;
// A block ID counter
// Number of blocks the cache is allocated
int32_t
numOfBlocks
;
SDList
*
cacheList
;
}
STSDBCache
;
void
*
current
;
}
SCacheHandle
;
// ---- Operation on STSDBCacheBlock
#define TSDB_CACHE_BLOCK_DATA(pBlock) ((pBlock)->pData)
#define TSDB_CACHE_AVAIL_SPACE(pBlock) ((char *)((pBlock)->pTableInfo) - ((pBlock)->pData))
#define TSDB_TABLE_INFO_OF_CACHE(pBlock, tableId) ((pBlock)->pTableInfo)[tableId]
#define TSDB_NEXT_CACHE_BLOCK(pBlock) ((pBlock)->next)
#define TSDB_PREV_CACHE_BLOCK(pBlock) ((pBlock)->prev)
STSDBCache
*
tsdbCreateCache
();
...
...
src/vnode/tsdb/inc/tsdbMeta.h
浏览文件 @
403a25b1
...
...
@@ -9,7 +9,7 @@
// Initially, there are 4 tables
#define TSDB_INIT_NUMBER_OF_SUPER_TABLE 4
typedef
enum
:
uint8_t
{
typedef
enum
{
TSDB_SUPER_TABLE
,
// super table
TSDB_NTABLE
,
// table not created from super table
TSDB_STABLE
// table created from super table
...
...
src/vnode/tsdb/src/tsdb.c
浏览文件 @
403a25b1
...
...
@@ -3,13 +3,21 @@
#include "tsdb.h"
#include "disk.h"
#include "cache.h"
#include "tsdbMeta.h"
#include "tsdbCache.h"
typedef
struct
STSDBRepo
{
// TSDB configuration
STSDBcfg
*
pCfg
;
// The meter meta handle of this TSDB repository
SMetaHandle
*
pMetaHandle
;
// The cache Handle
SCacheHandle
*
pCacheHandle
;
/* Disk tier handle for multi-tier storage
*
* The handle is responsible for dealing with object-oriented
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录