Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
b1a56049
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
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看板
提交
b1a56049
编写于
6月 19, 2020
作者:
H
Hui Li
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-682]
上级
ae360ecb
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
52 addition
and
34 deletion
+52
-34
src/mnode/inc/mnodeDef.h
src/mnode/inc/mnodeDef.h
+52
-34
未找到文件。
src/mnode/inc/mnodeDef.h
浏览文件 @
b1a56049
...
...
@@ -29,21 +29,28 @@ struct SAcctObj;
struct
SUserObj
;
struct
SMnodeObj
;
/*
struct define notes:
1. The first field must be the xxxxId field or name field , e.g. 'int32_t dnodeId', 'int32_t mnodeId', 'char name[]', 'char user[]', ...
2. From the dnodeId field to the updataEnd field, these information will be falled disc;
3. The fields behind the updataEnd field are changing;
*/
typedef
struct
SDnodeObj
{
int32_t
dnodeId
;
uint16_t
dnodePort
;
char
dnodeFqdn
[
TSDB_FQDN_LEN
];
char
dnodeEp
[
TSDB_EP_LEN
];
int64_t
createdTime
;
uint32_t
lastAccess
;
int32_t
openVnodes
;
int64_t
createdTime
;
int32_t
totalVnodes
;
// from dnode status msg, config information
int32_t
customScore
;
// config by user
uint32_t
lastAccess
;
uint16_t
numOfCores
;
// from dnode status msg
uint16_t
dnodePort
;
char
dnodeFqdn
[
TSDB_FQDN_LEN
];
char
dnodeEp
[
TSDB_EP_LEN
];
int8_t
alternativeRole
;
// from dnode status msg, 0-any, 1-mgmt, 2-dnode
int8_t
status
;
// set in balance function
int8_t
isMgmt
;
int8_t
reserved
[
15
];
int8_t
reserved
0
[
14
];
int8_t
updateEnd
[
1
];
int32_t
refCount
;
uint32_t
moduleStatus
;
...
...
@@ -54,20 +61,24 @@ typedef struct SDnodeObj {
int16_t
cpuAvgUsage
;
// calc from sys.cpu
int16_t
memoryAvgUsage
;
// calc from sys.mem
int16_t
bandwidthUsage
;
// calc from sys.band
int8_t
reserved1
[
2
];
}
SDnodeObj
;
typedef
struct
SMnodeObj
{
int32_t
mnodeId
;
int8_t
reserved0
[
4
];
int64_t
createdTime
;
int8_t
reserved
[
14
];
int8_t
reserved
1
[
7
];
int8_t
updateEnd
[
1
];
int32_t
refCount
;
int8_t
role
;
int8_t
reserved2
[
3
];
}
SMnodeObj
;
typedef
struct
STableObj
{
char
*
tableId
;
int8_t
type
;
int8_t
reserved
[
7
];
}
STableObj
;
typedef
struct
SSuperTableObj
{
...
...
@@ -78,29 +89,31 @@ typedef struct SSuperTableObj {
int32_t
tversion
;
int32_t
numOfColumns
;
int32_t
numOfTags
;
int8_t
reserved
[
15
];
int8_t
reserved
0
[
15
];
int8_t
updateEnd
[
1
];
int32_t
refCount
;
int32_t
numOfTables
;
int16_t
nextColId
;
SSchema
*
schema
;
void
*
vgHash
;
int16_t
nextColId
;
int8_t
reserved1
[
6
];
}
SSuperTableObj
;
typedef
struct
{
STableObj
info
;
uint64_t
uid
;
uint64_t
suid
;
int64_t
createdTime
;
int32_t
sversion
;
//used by normal table
int32_t
numOfColumns
;
//used by normal table
int32_t
sid
;
int32_t
vgId
;
uint64_t
suid
;
int32_t
sqlLen
;
int8_t
reserved
[
1
];
int8_t
reserved
0
[
3
];
int8_t
updateEnd
[
1
];
int16_t
nextColId
;
//used by normal table
int32_t
refCount
;
int16_t
nextColId
;
//used by normal table
int8_t
reserved1
[
2
];
char
*
sql
;
//used by normal table
SSchema
*
schema
;
//used by normal table
SSuperTableObj
*
superTable
;
...
...
@@ -115,23 +128,24 @@ typedef struct {
typedef
struct
SVgObj
{
uint32_t
vgId
;
char
dbName
[
TSDB_DB_NAME_LEN
];
int64_t
createdTime
;
SVnodeGid
vnodeGid
[
TSDB_MAX_REPLICA
];
int32_t
numOfVnodes
;
int64_t
createdTime
;
int32_t
lbDnodeId
;
int32_t
lbTime
;
char
dbName
[
TSDB_DB_NAME_LEN
];
int8_t
inUse
;
int8_t
accessState
;
int8_t
reserved
[
12
];
int8_t
reserved0
[
5
];
SVnodeGid
vnodeGid
[
TSDB_MAX_REPLICA
];
int8_t
reserved1
[
7
];
int8_t
updateEnd
[
1
];
int32_t
refCount
;
struct
SVgObj
*
prev
,
*
next
;
struct
SDbObj
*
pDb
;
int32_t
numOfTables
;
int64_t
totalStorage
;
int64_t
compStorage
;
int64_t
pointsWritten
;
struct
SVgObj
*
prev
,
*
next
;
struct
SDbObj
*
pDb
;
void
*
idPool
;
SChildTableObj
**
tableList
;
}
SVgObj
;
...
...
@@ -151,17 +165,18 @@ typedef struct {
int8_t
compression
;
int8_t
walLevel
;
int8_t
replications
;
int8_t
reserved
[
1
6
];
int8_t
reserved
[
1
2
];
}
SDbCfg
;
typedef
struct
SDbObj
{
char
name
[
TSDB_ACCT_LEN
+
TSDB_DB_NAME_LEN
];
int8_t
reserved0
[
4
];
char
acct
[
TSDB_USER_LEN
];
int64_t
createdTime
;
int32_t
cfgVersion
;
SDbCfg
cfg
;
int8_t
status
;
int8_t
reserved
[
14
];
int8_t
reserved
1
[
14
];
int8_t
updateEnd
[
1
];
int32_t
refCount
;
int32_t
numOfVgroups
;
...
...
@@ -186,13 +201,6 @@ typedef struct SUserObj {
}
SUserObj
;
typedef
struct
{
int32_t
numOfUsers
;
int32_t
numOfDbs
;
int32_t
numOfTimeSeries
;
int32_t
numOfPointsPerSecond
;
int32_t
numOfConns
;
int32_t
numOfQueries
;
int32_t
numOfStreams
;
int64_t
totalStorage
;
// Total storage wrtten from this account
int64_t
compStorage
;
// Compressed storage on disk
int64_t
queryTime
;
...
...
@@ -200,34 +208,44 @@ typedef struct {
int64_t
inblound
;
int64_t
outbound
;
int64_t
sKey
;
int32_t
numOfUsers
;
int32_t
numOfDbs
;
int32_t
numOfTimeSeries
;
int32_t
numOfPointsPerSecond
;
int32_t
numOfConns
;
int32_t
numOfQueries
;
int32_t
numOfStreams
;
int8_t
accessState
;
// Checked by mgmt heartbeat message
int8_t
reserved
[
3
];
}
SAcctInfo
;
typedef
struct
SAcctObj
{
char
user
[
TSDB_USER_LEN
];
char
pass
[
TSDB_KEY_LEN
];
SAcctCfg
cfg
;
int32_t
acctId
;
int64_t
createdTime
;
int32_t
acctId
;
int8_t
status
;
int8_t
reserved
[
14
];
int8_t
reserved
0
[
10
];
int8_t
updateEnd
[
1
];
int32_t
refCount
;
SAcctInfo
acctInfo
;
int32_t
refCount
;
int8_t
reserved1
[
4
];
pthread_mutex_t
mutex
;
}
SAcctObj
;
typedef
struct
{
int8_t
type
;
int32_t
index
;
char
db
[
TSDB_DB_NAME_LEN
];
void
*
pIter
;
int8_t
type
;
int16_t
numOfColumns
;
int32_t
index
;
int32_t
rowSize
;
int32_t
numOfRows
;
int32_t
numOfReads
;
void
*
pIter
;
int16_t
offset
[
TSDB_MAX_COLUMNS
];
int16_t
bytes
[
TSDB_MAX_COLUMNS
];
int32_t
numOfReads
;
int8_t
reserved0
[
2
];
uint16_t
payloadLen
;
char
payload
[];
}
SShowObj
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录