Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
654a5061
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看板
提交
654a5061
编写于
11月 04, 2019
作者:
H
hjxilinx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
configure the socket type(TCP/UDP) in config file.#671
上级
ba197c2d
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
26 addition
and
11 deletion
+26
-11
packaging/cfg/taos.cfg
packaging/cfg/taos.cfg
+3
-0
src/client/src/tscSystem.c
src/client/src/tscSystem.c
+2
-2
src/inc/tglobalcfg.h
src/inc/tglobalcfg.h
+8
-6
src/inc/trpc.h
src/inc/trpc.h
+3
-0
src/system/src/mgmtShell.c
src/system/src/mgmtShell.c
+1
-1
src/system/src/vnodeShell.c
src/system/src/vnodeShell.c
+1
-1
src/util/src/tglobalcfg.c
src/util/src/tglobalcfg.c
+8
-1
未找到文件。
packaging/cfg/taos.cfg
浏览文件 @
654a5061
...
...
@@ -54,6 +54,9 @@
# interval of system monitor
# monitorInterval 60
# set socket type(UDP by default). if udpsocket is 0, TCP is applied for all connections
# udpsocket 1
# RPC re-try timer, millisecond
# rpcTimer 300
...
...
src/client/src/tscSystem.c
浏览文件 @
654a5061
...
...
@@ -118,7 +118,7 @@ void taos_init_imp() {
rpcInit
.
sessionsPerChann
=
tsMaxVnodeConnections
/
tscNumOfThreads
;
rpcInit
.
idMgmt
=
TAOS_ID_FREE
;
rpcInit
.
noFree
=
0
;
rpcInit
.
connType
=
TAOS_CONN_
UDP
;
rpcInit
.
connType
=
TAOS_CONN_
SOCKET_TYPE_C
()
;
rpcInit
.
qhandle
=
tscQhandle
;
pVnodeConn
=
taosOpenRpc
(
&
rpcInit
);
if
(
pVnodeConn
==
NULL
)
{
...
...
@@ -139,7 +139,7 @@ void taos_init_imp() {
rpcInit
.
sessionsPerChann
=
tsMaxMgmtConnections
;
rpcInit
.
idMgmt
=
TAOS_ID_FREE
;
rpcInit
.
noFree
=
0
;
rpcInit
.
connType
=
TAOS_CONN_
UDP
;
rpcInit
.
connType
=
TAOS_CONN_
SOCKET_TYPE_C
()
;
rpcInit
.
qhandle
=
tscQhandle
;
pTscMgmtConn
=
taosOpenRpc
(
&
rpcInit
);
if
(
pTscMgmtConn
==
NULL
)
{
...
...
src/inc/tglobalcfg.h
浏览文件 @
654a5061
...
...
@@ -132,6 +132,8 @@ extern int tsStreamCompRetryDelay;
extern
int
tsProjectExecInterval
;
extern
int64_t
tsMaxRetentWindow
;
extern
int
tsUDPSocket
;
extern
char
tsHttpIp
[];
extern
short
tsHttpPort
;
extern
int
tsHttpCacheSessions
;
...
...
@@ -182,12 +184,12 @@ void tsSetTimeZone();
void
tsSetLocale
();
void
tsInitGlobalConfig
();
#define TSDB_CFG_CTYPE_B_CONFIG
1
// can be configured from file
#define TSDB_CFG_CTYPE_B_SHOW
2
// can displayed by "show configs" commands
#define TSDB_CFG_CTYPE_B_LOG
4
// is a log type configuration
#define TSDB_CFG_CTYPE_B_CLIENT
8
// can be displayed in the client log
#define TSDB_CFG_CTYPE_B_OPTION
16
// can be configured by taos_options function
#define TSDB_CFG_CTYPE_B_NOT_PRINT
32
#define TSDB_CFG_CTYPE_B_CONFIG
1U
// can be configured from file
#define TSDB_CFG_CTYPE_B_SHOW
2U
// can displayed by "show configs" commands
#define TSDB_CFG_CTYPE_B_LOG
4U
// is a log type configuration
#define TSDB_CFG_CTYPE_B_CLIENT
8U
// can be displayed in the client log
#define TSDB_CFG_CTYPE_B_OPTION
16U
// can be configured by taos_options function
#define TSDB_CFG_CTYPE_B_NOT_PRINT
32U
#define TSDB_CFG_CSTATUS_NONE 0 // not configured
#define TSDB_CFG_CSTATUS_DEFAULT 1 // use system default value
...
...
src/inc/trpc.h
浏览文件 @
654a5061
...
...
@@ -34,6 +34,9 @@ extern "C" {
#define TAOS_ID_FREE 1
#define TAOS_ID_REALLOCATE 2
#define TAOS_CONN_SOCKET_TYPE_S() ((tsUDPSocket == 1)? TAOS_CONN_UDPS:TAOS_CONN_TCPS)
#define TAOS_CONN_SOCKET_TYPE_C() ((tsUDPSocket == 1)? TAOS_CONN_UDP:TAOS_CONN_TCPC)
#define taosSendMsgToPeer(x, y, z) taosSendMsgToPeerH(x, y, z, NULL)
#define taosOpenRpcChann(x, y, z) taosOpenRpcChannWithQ(x, y, z, NULL)
#define taosBuildReqMsg(x, y) taosBuildReqMsgWithSize(x, y, 512)
...
...
src/system/src/mgmtShell.c
浏览文件 @
654a5061
...
...
@@ -64,7 +64,7 @@ int mgmtInitShell() {
rpcInit
.
numOfChanns
=
1
;
rpcInit
.
sessionsPerChann
=
tsMaxShellConns
;
rpcInit
.
idMgmt
=
TAOS_ID_FREE
;
rpcInit
.
connType
=
TAOS_CONN_
UDPS
;
rpcInit
.
connType
=
TAOS_CONN_
SOCKET_TYPE_S
()
;
rpcInit
.
idleTime
=
tsShellActivityTimer
*
2000
;
rpcInit
.
qhandle
=
mgmtQhandle
;
rpcInit
.
afp
=
mgmtRetriveUserAuthInfo
;
...
...
src/system/src/vnodeShell.c
浏览文件 @
654a5061
...
...
@@ -127,7 +127,7 @@ int vnodeInitShell() {
rpcInit
.
numOfChanns
=
TSDB_MAX_VNODES
;
rpcInit
.
sessionsPerChann
=
16
;
rpcInit
.
idMgmt
=
TAOS_ID_FREE
;
rpcInit
.
connType
=
TAOS_CONN_
UDPS
;
rpcInit
.
connType
=
TAOS_CONN_
SOCKET_TYPE_S
()
;
rpcInit
.
idleTime
=
tsShellActivityTimer
*
2000
;
rpcInit
.
qhandle
=
rpcQhandle
[
0
];
rpcInit
.
efp
=
vnodeSendVpeerCfgMsg
;
...
...
src/util/src/tglobalcfg.c
浏览文件 @
654a5061
...
...
@@ -122,6 +122,8 @@ int tsStreamCompRetryDelay = 10; // the stream computing delay
int
tsProjectExecInterval
=
10000
;
// every 10sec, the projection will be executed once
int64_t
tsMaxRetentWindow
=
24
*
3600L
;
// maximum time window tolerance
int
tsUDPSocket
=
1
;
// use UDP by default, if tsUDPSocket equals to 0, all connection use TCP socket
char
tsHttpIp
[
TSDB_IPv4ADDR_LEN
]
=
"0.0.0.0"
;
short
tsHttpPort
=
6020
;
// only tcp, range tcp[6020]
// short tsNginxPort = 6060; //only tcp, range tcp[6060]
...
...
@@ -494,7 +496,12 @@ void tsInitGlobalConfig() {
tsInitConfigOption
(
cfg
++
,
"defaultUser"
,
tsDefaultUser
,
TSDB_CFG_VTYPE_STRING
,
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_CLIENT
,
0
,
0
,
TSDB_USER_LEN
,
TSDB_CFG_UTYPE_NONE
);
tsInitConfigOption
(
cfg
++
,
"defaultPass"
,
tsDefaultPass
,
TSDB_CFG_VTYPE_STRING
,
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_CLIENT
|
TSDB_CFG_CTYPE_B_NOT_PRINT
,
0
,
0
,
TSDB_PASSWORD_LEN
,
TSDB_CFG_UTYPE_NONE
);
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_CLIENT
|
TSDB_CFG_CTYPE_B_NOT_PRINT
,
0
,
0
,
TSDB_PASSWORD_LEN
,
TSDB_CFG_UTYPE_NONE
);
// socket type, udp by default
tsInitConfigOption
(
cfg
++
,
"udpsocket"
,
&
tsUDPSocket
,
TSDB_CFG_VTYPE_INT
,
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_CLIENT
|
TSDB_CFG_CTYPE_B_SHOW
,
0
,
1
,
1
,
TSDB_CFG_UTYPE_NONE
);
// locale & charset
tsInitConfigOption
(
cfg
++
,
"timezone"
,
tsTimezone
,
TSDB_CFG_VTYPE_STRING
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录