Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
2abbf436
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1185
Star
22015
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2abbf436
编写于
2月 06, 2020
作者:
S
slguan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
#1177
上级
0fb0d0bd
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
83 addition
and
19 deletion
+83
-19
src/dnode/CMakeLists.txt
src/dnode/CMakeLists.txt
+3
-1
src/dnode/inc/dnodeModule.h
src/dnode/inc/dnodeModule.h
+2
-3
src/dnode/inc/dnodeService.h
src/dnode/inc/dnodeService.h
+0
-3
src/dnode/inc/dnodeSystem.h
src/dnode/inc/dnodeSystem.h
+0
-3
src/dnode/src/dnodeModule.c
src/dnode/src/dnodeModule.c
+5
-2
src/dnode/src/dnodeService.c
src/dnode/src/dnodeService.c
+26
-5
src/dnode/src/dnodeSystem.c
src/dnode/src/dnodeSystem.c
+1
-2
src/inc/dnode.h
src/inc/dnode.h
+43
-0
src/inc/tglobalcfg.h
src/inc/tglobalcfg.h
+3
-0
未找到文件。
src/dnode/CMakeLists.txt
浏览文件 @
2abbf436
...
...
@@ -2,7 +2,10 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT
(
TDengine
)
IF
((
TD_LINUX_64
)
OR
(
TD_LINUX_32 AND TD_ARM
))
INCLUDE_DIRECTORIES
(
${
TD_OS_DIR
}
/inc
)
INCLUDE_DIRECTORIES
(
${
TD_COMMUNITY_DIR
}
/src/inc
)
INCLUDE_DIRECTORIES
(
${
TD_ENTERPRISE_DIR
}
/src/inc
)
INCLUDE_DIRECTORIES
(
${
TD_COMMUNITY_DIR
}
/src/dnode/inc
)
INCLUDE_DIRECTORIES
(
${
TD_COMMUNITY_DIR
}
/src/mnode/detail/inc
)
INCLUDE_DIRECTORIES
(
${
TD_COMMUNITY_DIR
}
/src/vnode/detail/inc
)
...
...
@@ -11,7 +14,6 @@ IF ((TD_LINUX_64) OR (TD_LINUX_32 AND TD_ARM))
INCLUDE_DIRECTORIES
(
${
TD_COMMUNITY_DIR
}
/src/modules/monitor/inc
)
INCLUDE_DIRECTORIES
(
${
TD_COMMUNITY_DIR
}
/inc
)
INCLUDE_DIRECTORIES
(
${
TD_ENTERPRISE_DIR
}
/src/util/cluster/inc
)
INCLUDE_DIRECTORIES
(
${
TD_OS_DIR
}
/inc
)
INCLUDE_DIRECTORIES
(
inc
)
AUX_SOURCE_DIRECTORY
(
src SRC
)
...
...
src/dnode/inc/dnodeModule.h
浏览文件 @
2abbf436
...
...
@@ -33,6 +33,8 @@ enum _module {
TSDB_MOD_MGMT
,
TSDB_MOD_HTTP
,
TSDB_MOD_MONITOR
,
TSDB_MOD_DCLUSTER
,
TSDB_MOD_MSTORAGE
,
TSDB_MOD_MAX
};
...
...
@@ -54,9 +56,6 @@ void dnodeAllocModules();
int32_t
dnodeInitModules
();
void
dnodeCleanUpModules
();
extern
void
(
*
dnodeStartModules
)();
void
dnodeStartModulesEdgeImp
();
#ifdef __cplusplus
}
#endif
...
...
src/dnode/inc/dnodeService.h
浏览文件 @
2abbf436
...
...
@@ -20,9 +20,6 @@
extern
"C"
{
#endif
void
(
*
dnodeParseParameterK
)();
void
dnodeParseParameterKComImp
();
#ifdef __cplusplus
}
#endif
...
...
src/dnode/inc/dnodeSystem.h
浏览文件 @
2abbf436
...
...
@@ -26,9 +26,6 @@ extern "C" {
extern
pthread_mutex_t
dmutex
;
extern
bool
tsDnodeStopping
;
extern
int
(
*
dnodeInitStorage
)();
extern
void
(
*
dnodeCleanupStorage
)();
extern
int
(
*
dnodeCheckSystem
)();
int
dnodeInitSystem
();
void
dnodeCleanUpSystem
();
...
...
src/dnode/src/dnodeModule.c
浏览文件 @
2abbf436
...
...
@@ -23,9 +23,11 @@
#include "httpSystem.h"
#include "mgmtSystem.h"
#include "dcluster.h"
#include "mstorage.h"
SModule
tsModule
[
TSDB_MOD_MAX
]
=
{
0
};
uint32_t
tsModuleStatus
=
0
;
void
(
*
dnodeStartModules
)()
=
NULL
;
void
dnodeAllocModules
()
{
tsModule
[
TSDB_MOD_MGMT
].
name
=
"mgmt"
;
...
...
@@ -116,7 +118,7 @@ int32_t dnodeInitModules() {
return
0
;
}
void
dnodeStartModules
Edge
Imp
()
{
void
dnodeStartModulesImp
()
{
for
(
int
mod
=
1
;
mod
<
TSDB_MOD_MAX
;
++
mod
)
{
if
(
tsModule
[
mod
].
num
!=
0
&&
tsModule
[
mod
].
startFp
)
{
if
((
*
tsModule
[
mod
].
startFp
)()
!=
0
)
{
...
...
@@ -129,3 +131,4 @@ void dnodeStartModulesEdgeImp() {
(
*
tsModule
[
TSDB_MOD_MGMT
].
cleanUpFp
)();
}
}
void
(
*
dnodeStartModules
)()
=
dnodeStartModulesImp
;
src/dnode/src/dnodeService.c
浏览文件 @
2abbf436
...
...
@@ -14,16 +14,37 @@
*/
#define _DEFAULT_SOURCE
#include "os.h"
#include "dnodeSystem.h"
#include "tglobalcfg.h"
#include "tsdb.h"
#include "vnode.h"
#include "dnodeSystem.h"
#ifdef CLUSTER
#include "dnodeCluster.h"
#include "httpAdmin.h"
#include "mnodeAccount.h"
#include "mnodeBalance.h"
#include "mnodeCluster.h"
#include "mnodeReplica.h"
#include "multilevelStorage.h"
#include "vnodeCluster.h"
#include "vnodeReplica.h"
void
init
()
{
dnodeClusterInit
();
httpAdminInit
();
mnodeAccountInit
();
mnodeBalanceInit
();
mnodeClusterInit
();
mnodeReplicaInit
();
multilevelStorageInit
();
vnodeClusterInit
();
vnodeReplicaInit
();
}
#endif
void
(
*
dnodeParseParameterK
)()
=
NULL
;
void
dnodeParseParameterKComImp
()
{}
void
dnodeParseParameterKImp
()
{}
void
(
*
dnodeParseParameterK
)()
=
dnodeParseParameterKImp
;
/* Termination handler */
void
signal_handler
(
int
signum
,
siginfo_t
*
sigInfo
,
void
*
context
)
{
...
...
src/dnode/src/dnodeSystem.c
浏览文件 @
2abbf436
...
...
@@ -18,6 +18,7 @@
#include "tsdb.h"
#include "tlog.h"
#include "ttimer.h"
#include "dnode.h"
#include "dnodeMgmt.h"
#include "dnodeModule.h"
#include "dnodeService.h"
...
...
@@ -285,11 +286,9 @@ void dnodeInitPlugin() {
taosSendMsgToMnode
=
taosSendMsgToMnodeEdgeImp
;
taosSendSimpleRspToMnode
=
taosSendSimpleRspToMnodeEdgeImp
;
dnodeParseParameterK
=
dnodeParseParameterKComImp
;
dnodeCheckSystem
=
dnodeCheckSystemComImp
;
dnodeInitStorage
=
dnodeInitStorageComImp
;
dnodeCleanupStorage
=
dnodeCleanupStorageComImp
;
dnodeStartModules
=
dnodeStartModulesEdgeImp
;
}
src/inc/dnode.h
0 → 100644
浏览文件 @
2abbf436
/*
* 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/>.
*/
#ifndef TDENGINE_DNODE_H
#define TDENGINE_DNODE_H
#ifdef __cplusplus
extern
"C"
{
#endif
#include <stdint.h>
#include <pthread.h>
extern
pthread_mutex_t
dmutex
;
// dnodeCluster
extern
void
(
*
dnodeStartModules
)();
extern
void
(
*
dnodeParseParameterK
)();
extern
int32_t
(
*
dnodeCheckSystem
)();
// multilevelStorage
extern
int32_t
(
*
dnodeInitStorage
)();
extern
void
(
*
dnodeCleanupStorage
)();
void
dnodeCheckDbRunning
(
const
char
*
dir
);
#ifdef __cplusplus
}
#endif
#endif
src/inc/tglobalcfg.h
浏览文件 @
2abbf436
...
...
@@ -262,6 +262,9 @@ SGlobalConfig *tsGetConfigOption(const char *option);
#define NEEDTO_COMPRESSS_MSG(size) (tsCompressMsgSize != -1 && (size) > tsCompressMsgSize)
extern
char
mgmtDirectory
[];
#ifdef __cplusplus
}
#endif
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录