Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
75bd0eba
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
75bd0eba
编写于
3月 19, 2020
作者:
S
slguan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-15] move sdb to mnode module
上级
4662cff5
变更
11
显示空白变更内容
内联
并排
Showing
11 changed file
with
47 addition
and
79 deletion
+47
-79
src/CMakeLists.txt
src/CMakeLists.txt
+0
-1
src/dnode/CMakeLists.txt
src/dnode/CMakeLists.txt
+1
-1
src/mnode/CMakeLists.txt
src/mnode/CMakeLists.txt
+1
-1
src/mnode/inc/mgmtSdb.h
src/mnode/inc/mgmtSdb.h
+0
-0
src/mnode/src/mgmtSdb.c
src/mnode/src/mgmtSdb.c
+45
-2
src/sdb/CMakeLists.txt
src/sdb/CMakeLists.txt
+0
-16
src/sdb/src/sdbstr.c
src/sdb/src/sdbstr.c
+0
-58
src/util/inc/hashint.h
src/util/inc/hashint.h
+0
-0
src/util/inc/hashstr.h
src/util/inc/hashstr.h
+0
-0
src/util/src/hashint.c
src/util/src/hashint.c
+0
-0
src/util/src/hashstr.c
src/util/src/hashstr.c
+0
-0
未找到文件。
src/CMakeLists.txt
浏览文件 @
75bd0eba
...
...
@@ -12,7 +12,6 @@ ADD_SUBDIRECTORY(client)
ADD_SUBDIRECTORY
(
query
)
ADD_SUBDIRECTORY
(
kit
)
ADD_SUBDIRECTORY
(
plugins
)
ADD_SUBDIRECTORY
(
sdb
)
ADD_SUBDIRECTORY
(
mnode
)
ADD_SUBDIRECTORY
(
vnode
)
ADD_SUBDIRECTORY
(
dnode
)
...
...
src/dnode/CMakeLists.txt
浏览文件 @
75bd0eba
...
...
@@ -13,7 +13,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 tsdb
)
TARGET_LINK_LIBRARIES
(
taosd mnode taos_static monitor http tsdb
)
#IF (TD_CLUSTER)
# TARGET_LINK_LIBRARIES(taosd dcluster)
...
...
src/mnode/CMakeLists.txt
浏览文件 @
75bd0eba
...
...
@@ -13,7 +13,7 @@ IF ((TD_LINUX_64) OR (TD_LINUX_32 AND TD_ARM))
AUX_SOURCE_DIRECTORY
(
src SRC
)
ADD_LIBRARY
(
mnode
${
SRC
}
)
TARGET_LINK_LIBRARIES
(
mnode trpc tutil
sdb
pthread
)
TARGET_LINK_LIBRARIES
(
mnode trpc tutil pthread
)
IF
(
TD_CLUSTER
)
TARGET_LINK_LIBRARIES
(
mnode
)
...
...
src/
sdb/inc/sdbint
.h
→
src/
mnode/inc/mgmtSdb
.h
浏览文件 @
75bd0eba
文件已移动
src/
sdb/src/sdbEngine
.c
→
src/
mnode/src/mgmtSdb
.c
浏览文件 @
75bd0eba
...
...
@@ -13,11 +13,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#define _DEFAULT_SOURCE
#include "os.h"
#include "sdb.h"
#include "sdbint.h"
#include "tutil.h"
#include "mgmtSdb.h"
#define abs(x) (((x) < 0) ? -(x) : (x))
...
...
@@ -1015,3 +1015,46 @@ void *sdbFetchRow(void *handle, void *pNode, void **ppRow) {
int64_t
sdbGetId
(
void
*
handle
)
{
return
((
SSdbTable
*
)
handle
)
->
id
;
}
int64_t
sdbGetNumOfRows
(
void
*
handle
)
{
return
((
SSdbTable
*
)
handle
)
->
numOfRows
;
}
int32_t
(
*
mpeerInitMnodesFp
)(
char
*
directory
)
=
NULL
;
void
(
*
mpeerCleanUpMnodesFp
)()
=
NULL
;
int32_t
(
*
mpeerForwardRequestFp
)(
SSdbTable
*
pTable
,
char
type
,
void
*
cont
,
int32_t
contLen
)
=
NULL
;
char
*
sdbStatusStr
[]
=
{
"offline"
,
"unsynced"
,
"syncing"
,
"serving"
,
"null"
};
char
*
sdbRoleStr
[]
=
{
"unauthed"
,
"undecided"
,
"master"
,
"slave"
,
"null"
};
int32_t
sdbForwardDbReqToPeer
(
SSdbTable
*
pTable
,
char
type
,
char
*
data
,
int32_t
dataLen
)
{
if
(
mpeerForwardRequestFp
)
{
return
mpeerForwardRequestFp
(
pTable
,
type
,
data
,
dataLen
);
}
else
{
return
0
;
}
}
int32_t
sdbInitPeers
(
char
*
directory
)
{
if
(
mpeerInitMnodesFp
)
{
return
(
*
mpeerInitMnodesFp
)(
directory
);
}
else
{
return
0
;
}
}
void
sdbCleanUpPeers
()
{
if
(
mpeerCleanUpMnodesFp
)
{
(
*
mpeerCleanUpMnodesFp
)();
}
}
src/sdb/CMakeLists.txt
已删除
100644 → 0
浏览文件 @
4662cff5
CMAKE_MINIMUM_REQUIRED
(
VERSION 2.8
)
PROJECT
(
TDengine
)
INCLUDE_DIRECTORIES
(
${
TD_OS_DIR
}
/inc
)
INCLUDE_DIRECTORIES
(
${
TD_COMMUNITY_DIR
}
/src/inc
)
INCLUDE_DIRECTORIES
(
${
TD_COMMUNITY_DIR
}
/src/util/inc
)
INCLUDE_DIRECTORIES
(
inc
)
IF
((
TD_LINUX_64
)
OR
(
TD_LINUX_32 AND TD_ARM
))
AUX_SOURCE_DIRECTORY
(
src SRC
)
ADD_LIBRARY
(
sdb
${
SRC
}
)
TARGET_LINK_LIBRARIES
(
sdb trpc
)
IF
(
TD_CLUSTER
)
TARGET_LINK_LIBRARIES
(
sdb
)
ENDIF
()
ENDIF
()
src/sdb/src/sdbstr.c
已删除
100644 → 0
浏览文件 @
4662cff5
/*
* 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/>.
*/
#define _DEFAULT_SOURCE
#include "sdbint.h"
int32_t
(
*
mpeerInitMnodesFp
)(
char
*
directory
)
=
NULL
;
void
(
*
mpeerCleanUpMnodesFp
)()
=
NULL
;
int32_t
(
*
mpeerForwardRequestFp
)(
SSdbTable
*
pTable
,
char
type
,
void
*
cont
,
int32_t
contLen
)
=
NULL
;
char
*
sdbStatusStr
[]
=
{
"offline"
,
"unsynced"
,
"syncing"
,
"serving"
,
"null"
};
char
*
sdbRoleStr
[]
=
{
"unauthed"
,
"undecided"
,
"master"
,
"slave"
,
"null"
};
int32_t
sdbForwardDbReqToPeer
(
SSdbTable
*
pTable
,
char
type
,
char
*
data
,
int32_t
dataLen
)
{
if
(
mpeerForwardRequestFp
)
{
return
mpeerForwardRequestFp
(
pTable
,
type
,
data
,
dataLen
);
}
else
{
return
0
;
}
}
int32_t
sdbInitPeers
(
char
*
directory
)
{
if
(
mpeerInitMnodesFp
)
{
return
(
*
mpeerInitMnodesFp
)(
directory
);
}
else
{
return
0
;
}
}
void
sdbCleanUpPeers
()
{
if
(
mpeerCleanUpMnodesFp
)
{
(
*
mpeerCleanUpMnodesFp
)();
}
}
src/
sdb
/inc/hashint.h
→
src/
util
/inc/hashint.h
浏览文件 @
75bd0eba
文件已移动
src/
sdb
/inc/hashstr.h
→
src/
util
/inc/hashstr.h
浏览文件 @
75bd0eba
文件已移动
src/
sdb
/src/hashint.c
→
src/
util
/src/hashint.c
浏览文件 @
75bd0eba
文件已移动
src/
sdb
/src/hashstr.c
→
src/
util
/src/hashstr.c
浏览文件 @
75bd0eba
文件已移动
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录