Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
57ec3859
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看板
提交
57ec3859
编写于
8月 29, 2020
作者:
H
Hui Li
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-1228]
上级
29532fff
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
118 addition
and
38 deletion
+118
-38
CMakeLists.txt
CMakeLists.txt
+1
-0
cmake/define.inc
cmake/define.inc
+4
-0
cmake/input.inc
cmake/input.inc
+5
-0
cmake/install.inc
cmake/install.inc
+6
-1
packaging/release.sh
packaging/release.sh
+22
-9
packaging/tools/install_client.sh
packaging/tools/install_client.sh
+2
-2
packaging/tools/makeclient.sh
packaging/tools/makeclient.sh
+1
-1
packaging/tools/remove.sh
packaging/tools/remove.sh
+18
-22
packaging/tools/remove_client.sh
packaging/tools/remove_client.sh
+2
-0
src/inc/taosdef.h
src/inc/taosdef.h
+4
-0
src/kit/shell/src/shellEngine.c
src/kit/shell/src/shellEngine.c
+11
-0
src/kit/taosdemo/taosdemo.c
src/kit/taosdemo/taosdemo.c
+20
-0
src/os/src/linux/linuxEnv.c
src/os/src/linux/linuxEnv.c
+13
-3
src/util/src/tconfig.c
src/util/src/tconfig.c
+5
-0
src/util/src/tlog.c
src/util/src/tlog.c
+4
-0
未找到文件。
CMakeLists.txt
浏览文件 @
57ec3859
...
...
@@ -19,6 +19,7 @@ SET(TD_MEM_CHECK FALSE)
SET
(
TD_PAGMODE_LITE FALSE
)
SET
(
TD_SOMODE_STATIC FALSE
)
SET
(
TD_OEM_POWER FALSE
)
SET
(
TD_GODLL FALSE
)
SET
(
TD_COMMUNITY_DIR
${
PROJECT_SOURCE_DIR
}
)
...
...
cmake/define.inc
浏览文件 @
57ec3859
...
...
@@ -17,6 +17,10 @@ IF (TD_GODLL)
ADD_DEFINITIONS
(
-
D_TD_GO_DLL_
)
ENDIF
()
IF
(
TD_OEM_POWER
)
ADD_DEFINITIONS
(
-
D_TD_OEM_POWER_
)
ENDIF
()
IF
(
TD_MEM_CHECK
)
ADD_DEFINITIONS
(
-
DTAOS_MEM_CHECK
)
ENDIF
()
...
...
cmake/input.inc
浏览文件 @
57ec3859
...
...
@@ -27,6 +27,11 @@ IF (${SOMODE} MATCHES "static")
MESSAGE
(
STATUS
"Link so using static mode"
)
ENDIF
()
IF
(
$
{
DBNAME
}
MATCHES
"power"
)
SET
(
TD_OEM_POWER
TRUE
)
MESSAGE
(
STATUS
"OEM power is true"
)
ENDIF
()
IF
(
$
{
DLLTYPE
}
MATCHES
"go"
)
SET
(
TD_GODLL
TRUE
)
MESSAGE
(
STATUS
"input dll type: "
$
{
DLLTYPE
})
...
...
cmake/install.inc
浏览文件 @
57ec3859
...
...
@@ -4,7 +4,12 @@ IF (TD_LINUX)
INSTALL
(
CODE
"execute_process(COMMAND chmod 777 ${TD_MAKE_INSTALL_SH})"
)
INSTALL
(
CODE
"execute_process(COMMAND ${TD_MAKE_INSTALL_SH} ${TD_COMMUNITY_DIR} ${PROJECT_BINARY_DIR})"
)
ELSEIF
(
TD_WINDOWS
)
SET
(
CMAKE_INSTALL_PREFIX
C
:/
TDengine
)
IF
(
TD_OEM_POWER
)
SET
(
CMAKE_INSTALL_PREFIX
C
:/
PowerDB
)
ELSE
()
SET
(
CMAKE_INSTALL_PREFIX
C
:/
TDengine
)
ENDIF
()
IF
(
NOT
TD_GODLL
)
#INSTALL(DIRECTORY ${TD_COMMUNITY_DIR}/src/connector/go DESTINATION connector)
#INSTALL(DIRECTORY ${TD_COMMUNITY_DIR}/src/connector/grafana DESTINATION connector)
...
...
packaging/release.sh
浏览文件 @
57ec3859
...
...
@@ -11,6 +11,7 @@ set -e
# -V [stable | beta]
# -l [full | lite]
# -s [static | dynamic]
# -d [taos | power]
# -n [2.0.0.3]
# -m [2.0.0.0]
...
...
@@ -21,10 +22,11 @@ cpuType=x64 # [aarch32 | aarch64 | x64 | x86 | mips64 ...]
osType
=
Linux
# [Linux | Kylin | Alpine | Raspberrypi | Darwin | Windows | Ningsi60 | Ningsi80 |...]
pagMode
=
full
# [full | lite]
soMode
=
dynamic
# [static | dynamic]
dbName
=
taos
# [taos | power]
verNumber
=
""
verNumberComp
=
"2.0.0.0"
while
getopts
"hv:V:c:o:l:s:n:m:"
arg
while
getopts
"hv:V:c:o:l:s:
d:
n:m:"
arg
do
case
$arg
in
v
)
...
...
@@ -47,6 +49,10 @@ do
#echo "soMode=$OPTARG"
soMode
=
$(
echo
$OPTARG
)
;;
d
)
#echo "dbName=$OPTARG"
dbName
=
$(
echo
$OPTARG
)
;;
n
)
#echo "verNumber=$OPTARG"
verNumber
=
$(
echo
$OPTARG
)
...
...
@@ -66,6 +72,7 @@ do
echo
" -V [stable | beta] "
echo
" -l [full | lite] "
echo
" -s [static | dynamic] "
echo
" -d [taos | power] "
echo
" -n [version number] "
echo
" -m [compatible version number] "
exit
0
...
...
@@ -77,7 +84,7 @@ do
esac
done
echo
"verMode=
${
verMode
}
verType=
${
verType
}
cpuType=
${
cpuType
}
osType=
${
osType
}
pagMode=
${
pagMode
}
soMode=
${
soMode
}
verNumber=
${
verNumber
}
verNumberComp=
${
verNumberComp
}
"
echo
"verMode=
${
verMode
}
verType=
${
verType
}
cpuType=
${
cpuType
}
osType=
${
osType
}
pagMode=
${
pagMode
}
soMode=
${
soMode
}
dbName=
${
dbName
}
verNumber=
${
verNumber
}
verNumberComp=
${
verNumberComp
}
"
curr_dir
=
$(
pwd
)
...
...
@@ -170,9 +177,9 @@ cd ${compile_dir}
# check support cpu type
if
[[
"
$cpuType
"
==
"x64"
]]
||
[[
"
$cpuType
"
==
"aarch64"
]]
||
[[
"
$cpuType
"
==
"aarch32"
]]
||
[[
"
$cpuType
"
==
"mips64"
]]
;
then
if
[
"
$verMode
"
!=
"cluster"
]
;
then
cmake ../
-DCPUTYPE
=
${
cpuType
}
-DOSTYPE
=
${
osType
}
-DSOMODE
=
${
soMode
}
-DVERTYPE
=
${
verType
}
-DVERDATE
=
"
${
build_time
}
"
-DGITINFO
=
${
gitinfo
}
-DGITINFOI
=
${
gitinfoOfInternal
}
-DVERNUMBER
=
${
verNumber
}
-DVERCOMPATIBLE
=
${
verNumberComp
}
-DPAGMODE
=
${
pagMode
}
cmake ../
-DCPUTYPE
=
${
cpuType
}
-DOSTYPE
=
${
osType
}
-DSOMODE
=
${
soMode
}
-D
DBNAME
=
${
dbName
}
-D
VERTYPE
=
${
verType
}
-DVERDATE
=
"
${
build_time
}
"
-DGITINFO
=
${
gitinfo
}
-DGITINFOI
=
${
gitinfoOfInternal
}
-DVERNUMBER
=
${
verNumber
}
-DVERCOMPATIBLE
=
${
verNumberComp
}
-DPAGMODE
=
${
pagMode
}
else
cmake ../../
-DCPUTYPE
=
${
cpuType
}
-DOSTYPE
=
${
osType
}
-DSOMODE
=
${
soMode
}
-DVERTYPE
=
${
verType
}
-DVERDATE
=
"
${
build_time
}
"
-DGITINFO
=
${
gitinfo
}
-DGITINFOI
=
${
gitinfoOfInternal
}
-DVERNUMBER
=
${
verNumber
}
-DVERCOMPATIBLE
=
${
verNumberComp
}
cmake ../../
-DCPUTYPE
=
${
cpuType
}
-DOSTYPE
=
${
osType
}
-DSOMODE
=
${
soMode
}
-D
DBNAME
=
${
dbName
}
-D
VERTYPE
=
${
verType
}
-DVERDATE
=
"
${
build_time
}
"
-DGITINFO
=
${
gitinfo
}
-DGITINFOI
=
${
gitinfoOfInternal
}
-DVERNUMBER
=
${
verNumber
}
-DVERCOMPATIBLE
=
${
verNumberComp
}
fi
else
echo
"input cpuType=
${
cpuType
}
error!!!"
...
...
@@ -185,7 +192,7 @@ cd ${curr_dir}
# 3. Call the corresponding script for packaging
if
[
"
$osType
"
!=
"Darwin"
]
;
then
if
[[
"
$verMode
"
!=
"cluster"
]]
&&
[[
"
$cpuType
"
==
"x64"
]]
;
then
if
[[
"
$verMode
"
!=
"cluster"
]]
&&
[[
"
$cpuType
"
==
"x64"
]]
&&
[[
"
$dbName
"
==
"taos"
]]
;
then
echo
"====do deb package for the ubuntu system===="
output_dir
=
"
${
top_dir
}
/debs"
if
[
-d
${
output_dir
}
]
;
then
...
...
@@ -208,11 +215,17 @@ if [ "$osType" != "Darwin" ]; then
echo
"====do tar.gz package for all systems===="
cd
${
script_dir
}
/tools
${
csudo
}
./makepkg.sh
${
compile_dir
}
${
verNumber
}
"
${
build_time
}
"
${
cpuType
}
${
osType
}
${
verMode
}
${
verType
}
${
pagMode
}
${
csudo
}
./makeclient.sh
${
compile_dir
}
${
verNumber
}
"
${
build_time
}
"
${
cpuType
}
${
osType
}
${
verMode
}
${
verType
}
${
pagMode
}
${
csudo
}
./makearbi.sh
${
compile_dir
}
${
verNumber
}
"
${
build_time
}
"
${
cpuType
}
${
osType
}
${
verMode
}
${
verType
}
${
pagMode
}
if
[[
"
$dbName
"
==
"taos"
]]
;
then
${
csudo
}
./makepkg.sh
${
compile_dir
}
${
verNumber
}
"
${
build_time
}
"
${
cpuType
}
${
osType
}
${
verMode
}
${
verType
}
${
pagMode
}
${
csudo
}
./makeclient.sh
${
compile_dir
}
${
verNumber
}
"
${
build_time
}
"
${
cpuType
}
${
osType
}
${
verMode
}
${
verType
}
${
pagMode
}
${
csudo
}
./makearbi.sh
${
compile_dir
}
${
verNumber
}
"
${
build_time
}
"
${
cpuType
}
${
osType
}
${
verMode
}
${
verType
}
${
pagMode
}
else
${
csudo
}
./makepkg_power.sh
${
compile_dir
}
${
verNumber
}
"
${
build_time
}
"
${
cpuType
}
${
osType
}
${
verMode
}
${
verType
}
${
pagMode
}
${
dbName
}
${
csudo
}
./makeclient_power.sh
${
compile_dir
}
${
verNumber
}
"
${
build_time
}
"
${
cpuType
}
${
osType
}
${
verMode
}
${
verType
}
${
pagMode
}
${
dbName
}
${
csudo
}
./makearbi_power.sh
${
compile_dir
}
${
verNumber
}
"
${
build_time
}
"
${
cpuType
}
${
osType
}
${
verMode
}
${
verType
}
${
pagMode
}
fi
else
cd
${
script_dir
}
/tools
./makeclient.sh
${
compile_dir
}
${
verNumber
}
"
${
build_time
}
"
${
cpuType
}
${
osType
}
${
verMode
}
${
verType
}
./makeclient.sh
${
compile_dir
}
${
verNumber
}
"
${
build_time
}
"
${
cpuType
}
${
osType
}
${
verMode
}
${
verType
}
${
dbName
}
fi
packaging/tools/install_client.sh
浏览文件 @
57ec3859
...
...
@@ -85,7 +85,7 @@ function install_bin() {
# Remove links
${
csudo
}
rm
-f
${
bin_link_dir
}
/taos
||
:
if
[
"
$osType
"
==
"Darwin"
]
;
then
${
csudo
}
rm
-f
${
bin_link_dir
}
/taosd
ump
||
:
${
csudo
}
rm
-f
${
bin_link_dir
}
/taosd
emo
||
:
fi
${
csudo
}
rm
-f
${
bin_link_dir
}
/rmtaos
||
:
${
csudo
}
rm
-f
${
bin_link_dir
}
/set_core
||
:
...
...
@@ -95,7 +95,7 @@ function install_bin() {
#Make link
[
-x
${
install_main_dir
}
/bin/taos
]
&&
${
csudo
}
ln
-s
${
install_main_dir
}
/bin/taos
${
bin_link_dir
}
/taos
||
:
if
[
"
$osType
"
==
"Darwin"
]
;
then
[
-x
${
install_main_dir
}
/bin/taosd
ump
]
&&
${
csudo
}
ln
-s
${
install_main_dir
}
/bin/taosdump
${
bin_link_dir
}
/taosdump
||
:
[
-x
${
install_main_dir
}
/bin/taosd
emo
]
&&
${
csudo
}
ln
-s
${
install_main_dir
}
/bin/taosdemo
${
bin_link_dir
}
/taosdemo
||
:
fi
[
-x
${
install_main_dir
}
/bin/remove_client.sh
]
&&
${
csudo
}
ln
-s
${
install_main_dir
}
/bin/remove_client.sh
${
bin_link_dir
}
/rmtaos
||
:
[
-x
${
install_main_dir
}
/bin/set_core.sh
]
&&
${
csudo
}
ln
-s
${
install_main_dir
}
/bin/set_core.sh
${
bin_link_dir
}
/set_core
||
:
...
...
packaging/tools/makeclient.sh
浏览文件 @
57ec3859
...
...
@@ -41,7 +41,7 @@ fi
if
[
"
$osType
"
!=
"Darwin"
]
;
then
if
[
"
$pagMode
"
==
"lite"
]
;
then
strip
${
build_dir
}
/bin/taosd
#
strip ${build_dir}/bin/taosd
strip
${
build_dir
}
/bin/taos
bin_files
=
"
${
build_dir
}
/bin/taos
${
script_dir
}
/remove_client.sh"
else
...
...
packaging/tools/remove.sh
浏览文件 @
57ec3859
...
...
@@ -102,36 +102,31 @@ function clean_log() {
function
clean_service_on_systemd
()
{
taosd_service_config
=
"
${
service_config_dir
}
/
${
taos_service_name
}
.service"
if
systemctl is-active
--quiet
${
taos_service_name
}
;
then
echo
"TDengine taosd is running, stopping it..."
${
csudo
}
systemctl stop
${
taos_service_name
}
&> /dev/null
||
echo
&> /dev/null
fi
${
csudo
}
systemctl disable
${
taos_service_name
}
&> /dev/null
||
echo
&> /dev/null
${
csudo
}
rm
-f
${
taosd_service_config
}
tarbitratord_service_config
=
"
${
service_config_dir
}
/
${
tarbitrator_service_name
}
.service"
if
systemctl is-active
--quiet
${
tarbitrator_service_name
}
;
then
echo
"TDengine tarbitrator is running, stopping it..."
${
csudo
}
systemctl stop
${
tarbitrator_service_name
}
&> /dev/null
||
echo
&> /dev/null
fi
${
csudo
}
systemctl disable
${
tarbitrator_service_name
}
&> /dev/null
||
echo
&> /dev/null
${
csudo
}
rm
-f
${
tarbitratord_service_config
}
if
[
"
$verMode
"
==
"cluster"
]
;
then
tarbitratord_service_config
=
"
${
service_config_dir
}
/
${
tarbitrator_service_name
}
.service"
if
systemctl is-active
--quiet
${
tarbitrator_service_name
}
;
then
echo
"TDengine tarbitrator is running, stopping it..."
${
csudo
}
systemctl stop
${
tarbitrator_service_name
}
&> /dev/null
||
echo
&> /dev/null
fi
${
csudo
}
systemctl disable
${
tarbitrator_service_name
}
&> /dev/null
||
echo
&> /dev/null
${
csudo
}
rm
-f
${
tarbitratord_service_config
}
nginx_service_config
=
"
${
service_config_dir
}
/
${
nginx_service_name
}
.service"
if
[
-d
${
bin_dir
}
/web
]
;
then
if
systemctl is-active
--quiet
${
nginx_service_name
}
;
then
echo
"Nginx for TDengine is running, stopping it..."
${
csudo
}
systemctl stop
${
nginx_service_name
}
&> /dev/null
||
echo
&> /dev/null
fi
${
csudo
}
systemctl disable
${
nginx_service_name
}
&> /dev/null
||
echo
&> /dev/null
${
csudo
}
rm
-f
${
nginx_service_config
}
nginx_service_config
=
"
${
service_config_dir
}
/
${
nginx_service_name
}
.service"
if
[
-d
${
bin_dir
}
/web
]
;
then
if
systemctl is-active
--quiet
${
nginx_service_name
}
;
then
echo
"Nginx for TDengine is running, stopping it..."
${
csudo
}
systemctl stop
${
nginx_service_name
}
&> /dev/null
||
echo
&> /dev/null
fi
${
csudo
}
systemctl disable
${
nginx_service_name
}
&> /dev/null
||
echo
&> /dev/null
${
csudo
}
rm
-f
${
nginx_service_config
}
fi
fi
}
...
...
@@ -227,3 +222,4 @@ elif echo $osinfo | grep -qwi "centos" ; then
fi
echo
-e
"
${
GREEN
}
TDengine is removed successfully!
${
NC
}
"
echo
\ No newline at end of file
packaging/tools/remove_client.sh
浏览文件 @
57ec3859
...
...
@@ -39,6 +39,7 @@ function clean_bin() {
${
csudo
}
rm
-f
${
bin_link_dir
}
/taos
||
:
${
csudo
}
rm
-f
${
bin_link_dir
}
/taosdemo
||
:
${
csudo
}
rm
-f
${
bin_link_dir
}
/rmtaos
||
:
${
csudo
}
rm
-f
${
bin_link_dir
}
/set_core
||
:
}
function
clean_lib
()
{
...
...
@@ -80,3 +81,4 @@ clean_config
${
csudo
}
rm
-rf
${
install_main_dir
}
echo
-e
"
${
GREEN
}
TDengine client is removed successfully!
${
NC
}
"
echo
src/inc/taosdef.h
浏览文件 @
57ec3859
...
...
@@ -85,7 +85,11 @@ extern const int32_t TYPE_BYTES[11];
#define TSDB_DATA_NULL_STR_L "null"
#define TSDB_DEFAULT_USER "root"
#ifdef _TD_OEM_POWER_
#define TSDB_DEFAULT_PASS "powerdb"
#else
#define TSDB_DEFAULT_PASS "taosdata"
#endif
#define TSDB_TRUE 1
#define TSDB_FALSE 0
...
...
src/kit/shell/src/shellEngine.c
浏览文件 @
57ec3859
...
...
@@ -30,11 +30,22 @@
#include <regex.h>
/**************** Global variables ****************/
#ifdef _TD_OEM_POWER_
char
CLIENT_VERSION
[]
=
"Welcome to the PowerDB shell from %s, Client Version:%s
\n
"
"Copyright (c) 2017 by PowerDB, Inc. All rights reserved.
\n\n
"
;
char
PROMPT_HEADER
[]
=
"power> "
;
char
CONTINUE_PROMPT
[]
=
" -> "
;
int
prompt_size
=
7
;
#else
char
CLIENT_VERSION
[]
=
"Welcome to the TDengine shell from %s, Client Version:%s
\n
"
"Copyright (c) 2017 by TAOS Data, Inc. All rights reserved.
\n\n
"
;
char
PROMPT_HEADER
[]
=
"taos> "
;
char
CONTINUE_PROMPT
[]
=
" -> "
;
int
prompt_size
=
6
;
#endif
TAOS_RES
*
result
=
NULL
;
SShellHistory
history
;
...
...
src/kit/taosdemo/taosdemo.c
浏览文件 @
57ec3859
...
...
@@ -89,7 +89,11 @@ typedef struct DemoArguments {
{
0
,
'h'
,
"host"
,
0
,
"The host to connect to TDengine. Default is localhost."
,
0
},
{
0
,
'p'
,
"port"
,
0
,
"The TCP/IP port number to use for the connection. Default is 0."
,
1
},
{
0
,
'u'
,
"user"
,
0
,
"The TDengine user name to use when connecting to the server. Default is 'root'."
,
2
},
#ifdef _TD_OEM_POWER_
{
0
,
'P'
,
"password"
,
0
,
"The password to use when connecting to the server. Default is 'powerdb'."
,
3
},
#else
{
0
,
'P'
,
"password"
,
0
,
"The password to use when connecting to the server. Default is 'taosdata'."
,
3
},
#endif
{
0
,
'd'
,
"database"
,
0
,
"Destination database. Default is 'test'."
,
3
},
{
0
,
'a'
,
"replica"
,
0
,
"Set the replica parameters of the database, Default 1, min: 1, max: 3."
,
3
},
{
0
,
'm'
,
"table_prefix"
,
0
,
"Table prefix name. Default is 't'."
,
3
},
...
...
@@ -104,7 +108,11 @@ typedef struct DemoArguments {
{
0
,
'r'
,
"num_of_records_per_req"
,
0
,
"The number of records per request. Default is 1000."
,
10
},
{
0
,
't'
,
"num_of_tables"
,
0
,
"The number of tables. Default is 10000."
,
11
},
{
0
,
'n'
,
"num_of_records_per_table"
,
0
,
"The number of records per table. Default is 100000."
,
12
},
#ifdef _TD_OEM_POWER_
{
0
,
'c'
,
"config_directory"
,
0
,
"Configuration directory. Default is '/etc/power/'."
,
14
},
#else
{
0
,
'c'
,
"config_directory"
,
0
,
"Configuration directory. Default is '/etc/taos/'."
,
14
},
#endif
{
0
,
'x'
,
0
,
0
,
"Insert only flag."
,
13
},
{
0
,
'O'
,
"order"
,
0
,
"Insert mode--0: In order, 1: Out of order. Default is in order."
,
14
},
{
0
,
'R'
,
"rate"
,
0
,
"Out of order data's rate--if order=1 Default 10, min: 0, max: 50."
,
14
},
...
...
@@ -279,7 +287,11 @@ typedef struct DemoArguments {
printf
(
"%s%s
\n
"
,
indent
,
"-u"
);
printf
(
"%s%s%s
\n
"
,
indent
,
indent
,
"user, The user name to use when connecting to the server. Default is 'root'."
);
printf
(
"%s%s
\n
"
,
indent
,
"-p"
);
#ifdef _TD_OEM_POWER_
printf
(
"%s%s%s
\n
"
,
indent
,
indent
,
"password, The password to use when connecting to the server. Default is 'powerdb'."
);
#else
printf
(
"%s%s%s
\n
"
,
indent
,
indent
,
"password, The password to use when connecting to the server. Default is 'taosdata'."
);
#endif
printf
(
"%s%s
\n
"
,
indent
,
"-d"
);
printf
(
"%s%s%s
\n
"
,
indent
,
indent
,
"database, Destination database. Default is 'test'."
);
printf
(
"%s%s
\n
"
,
indent
,
"-a"
);
...
...
@@ -309,7 +321,11 @@ typedef struct DemoArguments {
printf
(
"%s%s
\n
"
,
indent
,
"-n"
);
printf
(
"%s%s%s
\n
"
,
indent
,
indent
,
"num_of_records_per_table, The number of records per table. Default is 100000."
);
printf
(
"%s%s
\n
"
,
indent
,
"-c"
);
#ifdef _TD_OEM_POWER_
printf
(
"%s%s%s
\n
"
,
indent
,
indent
,
"config_directory, Configuration directory. Default is '/etc/power/'."
);
#else
printf
(
"%s%s%s
\n
"
,
indent
,
indent
,
"config_directory, Configuration directory. Default is '/etc/taos/'."
);
#endif
printf
(
"%s%s
\n
"
,
indent
,
"-x"
);
printf
(
"%s%s%s
\n
"
,
indent
,
indent
,
"flag, Insert only flag."
);
printf
(
"%s%s
\n
"
,
indent
,
"-O"
);
...
...
@@ -513,7 +529,11 @@ int main(int argc, char *argv[]) {
SDemoArguments
arguments
=
{
NULL
,
// host
0
,
// port
"root"
,
// user
#ifdef _TD_OEM_POWER_
"powerdb"
,
// password
#else
"taosdata"
,
// password
#endif
"test"
,
// database
1
,
// replica
"t"
,
// tb_prefix
...
...
src/os/src/linux/linuxEnv.c
浏览文件 @
57ec3859
...
...
@@ -18,15 +18,25 @@
#include "tglobal.h"
void
osInit
()
{
#ifdef _TD_OEM_POWER_
if
(
configDir
[
0
]
==
0
)
{
strcpy
(
configDir
,
"/etc/power"
);
}
strcpy
(
tsDataDir
,
"/var/lib/power"
);
strcpy
(
tsLogDir
,
"/var/log/power"
);
strcpy
(
tsScriptDir
,
"/etc/power"
);
#else
if
(
configDir
[
0
]
==
0
)
{
strcpy
(
configDir
,
"/etc/taos"
);
}
strcpy
(
tsDataDir
,
"/var/lib/taos"
);
strcpy
(
tsLogDir
,
"/var/log/taos"
);
strcpy
(
tsScriptDir
,
"/etc/taos"
);
#endif
strcpy
(
tsVnodeDir
,
""
);
strcpy
(
tsDnodeDir
,
""
);
strcpy
(
tsMnodeDir
,
""
);
strcpy
(
tsDataDir
,
"/var/lib/taos"
);
strcpy
(
tsLogDir
,
"/var/log/taos"
);
strcpy
(
tsScriptDir
,
"/etc/taos"
);
strcpy
(
tsOsName
,
"Linux"
);
}
\ No newline at end of file
src/util/src/tconfig.c
浏览文件 @
57ec3859
...
...
@@ -260,8 +260,13 @@ void taosReadGlobalLogCfg() {
}
strcpy
(
configDir
,
full_path
.
we_wordv
[
0
]);
}
else
{
#ifdef _TD_OEM_POWER_
printf
(
"configDir:%s not there, use default value: /etc/power"
,
configDir
);
strcpy
(
configDir
,
"/etc/power"
);
#else
printf
(
"configDir:%s not there, use default value: /etc/taos"
,
configDir
);
strcpy
(
configDir
,
"/etc/taos"
);
#endif
}
wordfree
(
&
full_path
);
...
...
src/util/src/tlog.c
浏览文件 @
57ec3859
...
...
@@ -66,7 +66,11 @@ int32_t tsAsyncLog = 1;
float
tsTotalLogDirGB
=
0
;
float
tsAvailLogDirGB
=
0
;
float
tsMinimalLogDirGB
=
0
.
1
f
;
#ifdef _TD_OEM_POWER_
char
tsLogDir
[
TSDB_FILENAME_LEN
]
=
"/var/log/power"
;
#else
char
tsLogDir
[
TSDB_FILENAME_LEN
]
=
"/var/log/taos"
;
#endif
static
SLogObj
tsLogObj
=
{
.
fileNum
=
1
};
static
void
*
taosAsyncOutputLog
(
void
*
param
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录