Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
哥们要飞
TDengine
提交
56d54930
T
TDengine
项目概览
哥们要飞
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
1
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,发现更多精彩内容 >>
未验证
提交
56d54930
编写于
12月 24, 2019
作者:
H
haojun Liao
提交者:
GitHub
12月 24, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1004 from taosdata/feature/slguan
#1003 [TBASE-779]
上级
af4b51cc
9d864c65
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
81 addition
and
28 deletion
+81
-28
packaging/cfg/taos.cfg
packaging/cfg/taos.cfg
+71
-11
src/client/src/tscServer.c
src/client/src/tscServer.c
+2
-2
src/client/src/tscSql.c
src/client/src/tscSql.c
+3
-7
src/inc/tglobalcfg.h
src/inc/tglobalcfg.h
+0
-2
src/util/src/tglobalcfg.c
src/util/src/tglobalcfg.c
+5
-6
未找到文件。
packaging/cfg/taos.cfg
浏览文件 @
56d54930
...
...
@@ -5,14 +5,39 @@
# #
########################################################
# master IP for TDengine system
# masterIp 127.0.0.1
# Internal IP address of the server, which can be acquired by using ifconfig command.
# internalIp 127.0.0.1
# second IP for TDengine system, for cluster version only
# secondIp 127.0.0.1
# IP address of the server
# privateIp 127.0.0.1
# public IP of server, on which the tdengine are deployed
# this IP is assigned by cloud service provider, for cluster version only
# publicIp 127.0.0.1
# network is bound to 0.0.0.0
# anyIp 1
# set socket type ("udp" and "tcp")
# the server and client should have the same socket type. Otherwise, connect will fail
# sockettype udp
# client local IP
# localIp 127.0.0.1
# data file's directory
# for the cluster version, data file's directory is configured this way
# option mount_path tier_level
# dataDir /mnt/disk1/taos 0
# dataDir /mnt/disk2/taos 0
# dataDir /mnt/disk3/taos 0
# dataDir /mnt/disk4/taos 0
# dataDir /mnt/disk5/taos 0
# dataDir /mnt/disk6/taos 1
# dataDir /mnt/disk7/taos 1
# for the stand-alone version, data file's directory is configured this way
# dataDir /var/lib/taos
# log file's directory
...
...
@@ -27,6 +52,18 @@
# port for DNode connect to Client, default udp[6035-6039] tcp[6035]
# vnodeShellPort 6035
# port for MNode connect to VNode, default udp[6040-6044] tcp[6040], for cluster version only
# mgmtVnodePort 6040
# port for DNode connect to DNode, default tcp[6045], for cluster version only
# vnodeVnodePort 6045
# port for MNode connect to MNode, default udp[6050], for cluster version only
# mgmtMgmtPort 6050
# port sync file MNode and MNode, default tcp[6050], for cluster version only
# mgmtSyncPort 6050
# number of threads per CPU core
# numOfThreadsPerCore 1
...
...
@@ -54,11 +91,7 @@
# interval of system monitor
# monitorInterval 60
# set socket type("udp" and "tcp").
# The server and client should have the same socket type. Otherwise, connect will fail.
# sockettype udp
# The compressed rpc message, option:
# the compressed rpc message, option:
# -1 (no compression)
# 0 (all message compressed),
# > 0 (rpc message body which larger than this value will be compressed)
...
...
@@ -73,12 +106,18 @@
# commit interval,unit is second
# ctime 3600
# interval of DNode report status to MNode, unit is Second
# interval of DNode report status to MNode, unit is Second
, for cluster version only
# statusInterval 1
# interval of Shell send HB to MNode, unit is Second
# shellActivityTimer 3
# interval of DNode send HB to DNode, unit is Second, for cluster version only
# vnodePeerHBTimer 1
# interval of MNode send HB to MNode, unit is Second, for cluster version only
# mgmtPeerHBTimer 1
# time to keep MeterMeta in Cache, seconds
# meterMetaKeepTimer 7200
...
...
@@ -94,6 +133,12 @@
# max number of tables
# maxTables 650000
# max number of Dnodes, for cluster version only
# maxDnodes 1000
# Max number of VGroups, for cluster version only
# maxVGroups 1000
# system locale
# locale en_US.UTF-8
...
...
@@ -118,6 +163,9 @@
# number of days to keep DB file
# keep 3650
# number of replications, for cluster version only
# replications 1
# client default database(database should be created)
# defaultDB
...
...
@@ -139,18 +187,30 @@
# max connection to Vnode
# maxVnodeConnections 10000
# start http service in the cluster
# mnode take into account while balance, for cluster version only
# mgmtEqualVnodeNum 4
# number of seconds allowed for a dnode to be offline, for cluster version only
# offlineThreshold 864000
# start http service
# http 1
# start system monitor module
in the cluster
# start system monitor module
# monitor 1
# maximum number of rows returned by the restful interface
# restfulRowLimit 10240
# number of threads used to process http requests
# httpMaxThreads 2
# pre-allocated number of http sessions
# httpCacheSessions 100
# whether to enable HTTP compression transmission
# httpEnableCompress 0
# whether the telegraf table name contains the number of tags and the number of fields
# telegrafUseFieldNum 0
...
...
src/client/src/tscServer.c
浏览文件 @
56d54930
...
...
@@ -183,7 +183,7 @@ void tscGetConnToMgmt(SSqlObj *pSql, uint8_t *pCode) {
#ifdef CLUSTER
connInit
.
peerIp
=
tscMgmtIpList
.
ipstr
[
pSql
->
index
];
#else
connInit
.
peerIp
=
ts
ServerIpStr
;
connInit
.
peerIp
=
ts
MasterIp
;
#endif
thandle
=
taosOpenRpcConn
(
&
connInit
,
pCode
);
}
...
...
@@ -291,7 +291,7 @@ void tscGetConnToVnode(SSqlObj *pSql, uint8_t *pCode) {
connInit
.
peerId
=
htonl
((
pVPeersDesc
[
0
].
vnode
<<
TSDB_SHELL_VNODE_BITS
));
connInit
.
shandle
=
pVnodeConn
;
connInit
.
ahandle
=
pSql
;
connInit
.
peerIp
=
ts
ServerIpStr
;
connInit
.
peerIp
=
ts
MasterIp
;
connInit
.
peerPort
=
tsVnodeShellPort
;
thandle
=
taosOpenRpcConn
(
&
connInit
,
pCode
);
vidIndex
=
(
vidIndex
+
1
)
%
tscNumOfThreads
;
...
...
src/client/src/tscSql.c
浏览文件 @
56d54930
...
...
@@ -70,8 +70,8 @@ TAOS *taos_connect_imp(const char *ip, const char *user, const char *pass, const
}
#else
if
(
ip
&&
ip
[
0
])
{
if
(
ip
!=
ts
ServerIpStr
)
{
strcpy
(
ts
ServerIpStr
,
ip
);
if
(
ip
!=
ts
MasterIp
)
{
strcpy
(
ts
MasterIp
,
ip
);
}
tsServerIp
=
inet_addr
(
ip
);
}
...
...
@@ -153,11 +153,7 @@ TAOS *taos_connect_imp(const char *ip, const char *user, const char *pass, const
TAOS
*
taos_connect
(
const
char
*
ip
,
const
char
*
user
,
const
char
*
pass
,
const
char
*
db
,
uint16_t
port
)
{
if
(
ip
==
NULL
||
(
ip
!=
NULL
&&
(
strcmp
(
"127.0.0.1"
,
ip
)
==
0
||
strcasecmp
(
"localhost"
,
ip
)
==
0
)))
{
#ifdef CLUSTER
ip
=
tsMasterIp
;
#else
ip
=
tsServerIpStr
;
#endif
}
tscTrace
(
"try to create a connection to %s"
,
ip
);
...
...
@@ -181,7 +177,7 @@ TAOS *taos_connect_a(char *ip, char *user, char *pass, char *db, uint16_t port,
void
*
param
,
void
**
taos
)
{
#ifndef CLUSTER
if
(
ip
==
NULL
)
{
ip
=
ts
ServerIpStr
;
ip
=
ts
MasterIp
;
}
#endif
return
taos_connect_imp
(
ip
,
user
,
pass
,
db
,
port
,
fp
,
param
,
taos
);
...
...
src/inc/tglobalcfg.h
浏览文件 @
56d54930
...
...
@@ -75,7 +75,6 @@ extern float tsNumOfThreadsPerCore;
extern
float
tsRatioOfQueryThreads
;
extern
char
tsPublicIp
[];
extern
char
tsPrivateIp
[];
extern
char
tsServerIpStr
[];
extern
short
tsNumOfVnodesPerCore
;
extern
short
tsNumOfTotalVnodes
;
extern
short
tsCheckHeaderFile
;
...
...
@@ -148,7 +147,6 @@ extern int tsHttpMaxThreads;
extern
int
tsHttpEnableCompress
;
extern
int
tsHttpEnableRecordSql
;
extern
int
tsTelegrafUseFieldNum
;
extern
int
tsAdminRowLimit
;
extern
int
tsTscEnableRecordSql
;
extern
int
tsAnyIp
;
...
...
src/util/src/tglobalcfg.c
浏览文件 @
56d54930
...
...
@@ -56,7 +56,11 @@ int tscEmbedded = 0;
*/
int64_t
tsMsPerDay
[]
=
{
86400000L
,
86400000000L
};
#ifdef CLUSTER
char
tsMasterIp
[
TSDB_IPv4ADDR_LEN
]
=
{
0
};
#else
char
tsMasterIp
[
TSDB_IPv4ADDR_LEN
]
=
"127.0.0.1"
;
#endif
char
tsSecondIp
[
TSDB_IPv4ADDR_LEN
]
=
{
0
};
uint16_t
tsMgmtShellPort
=
6030
;
// udp[6030-6034] tcp[6030]
uint16_t
tsVnodeShellPort
=
6035
;
// udp[6035-6039] tcp[6035]
...
...
@@ -76,7 +80,6 @@ float tsNumOfThreadsPerCore = 1.0;
float
tsRatioOfQueryThreads
=
0
.
5
;
char
tsPublicIp
[
TSDB_IPv4ADDR_LEN
]
=
{
0
};
char
tsPrivateIp
[
TSDB_IPv4ADDR_LEN
]
=
{
0
};
char
tsServerIpStr
[
TSDB_IPv4ADDR_LEN
]
=
"127.0.0.1"
;
short
tsNumOfVnodesPerCore
=
8
;
short
tsNumOfTotalVnodes
=
0
;
short
tsCheckHeaderFile
=
0
;
...
...
@@ -118,7 +121,7 @@ int tsBalanceMonitorInterval = 2; // seconds
int
tsBalanceStartInterval
=
300
;
// seconds
int
tsBalancePolicy
=
0
;
// 1-use sys.montor
int
tsOfflineThreshold
=
864000
;
// seconds 10days
int
tsMgmtEqualVnodeNum
=
0
;
int
tsMgmtEqualVnodeNum
=
4
;
int
tsEnableHttpModule
=
1
;
int
tsEnableMonitorModule
=
1
;
...
...
@@ -160,7 +163,6 @@ int tsHttpMaxThreads = 2;
int
tsHttpEnableCompress
=
0
;
int
tsHttpEnableRecordSql
=
0
;
int
tsTelegrafUseFieldNum
=
0
;
int
tsAdminRowLimit
=
10240
;
int
tsTscEnableRecordSql
=
0
;
int
tsEnableCoreFile
=
0
;
...
...
@@ -447,9 +449,6 @@ static void doInitGlobalConfig() {
tsInitConfigOption
(
cfg
++
,
"secondIp"
,
tsSecondIp
,
TSDB_CFG_VTYPE_IPSTR
,
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_CLIENT
|
TSDB_CFG_CTYPE_B_CLUSTER
,
0
,
0
,
TSDB_IPv4ADDR_LEN
,
TSDB_CFG_UTYPE_NONE
);
tsInitConfigOption
(
cfg
++
,
"serverIp"
,
tsServerIpStr
,
TSDB_CFG_VTYPE_IPSTR
,
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_CLIENT
|
TSDB_CFG_CTYPE_B_LITE
,
0
,
0
,
TSDB_IPv4ADDR_LEN
,
TSDB_CFG_UTYPE_NONE
);
tsInitConfigOption
(
cfg
++
,
"publicIp"
,
tsPublicIp
,
TSDB_CFG_VTYPE_IPSTR
,
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_CLUSTER
,
0
,
0
,
TSDB_IPv4ADDR_LEN
,
TSDB_CFG_UTYPE_NONE
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录