Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
614b5a33
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看板
未验证
提交
614b5a33
编写于
7月 19, 2021
作者:
S
Shengliang Guan
提交者:
GitHub
7月 19, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #6884 from taosdata/feature/m2d6
Feature/m2d6
上级
9a2ceeed
697257f9
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
101 addition
and
46 deletion
+101
-46
packaging/tools/install_client.sh
packaging/tools/install_client.sh
+7
-1
packaging/tools/makeclient.sh
packaging/tools/makeclient.sh
+13
-4
packaging/tools/makeclient_power.sh
packaging/tools/makeclient_power.sh
+47
-14
src/client/src/tscSubquery.c
src/client/src/tscSubquery.c
+18
-22
src/kit/taosdemo/taosdemo.c
src/kit/taosdemo/taosdemo.c
+0
-2
src/query/src/qTsbuf.c
src/query/src/qTsbuf.c
+9
-0
src/tsdb/src/tsdbRead.c
src/tsdb/src/tsdbRead.c
+4
-0
tests/pytest/query/queryPerformance.py
tests/pytest/query/queryPerformance.py
+2
-1
tests/pytest/tools/taosdemoPerformance.py
tests/pytest/tools/taosdemoPerformance.py
+1
-1
tests/pytest/tools/taosdumpTest.py
tests/pytest/tools/taosdumpTest.py
+0
-1
未找到文件。
packaging/tools/install_client.sh
浏览文件 @
614b5a33
...
...
@@ -182,7 +182,13 @@ function install_jemalloc() {
${
csudo
}
/usr/bin/install
-c
-d
/usr/local/share/man/man3
${
csudo
}
/usr/bin/install
-c
-m
644
${
jemalloc_dir
}
/share/man/man3/jemalloc.3 /usr/local/share/man/man3
fi
${
csudo
}
ldconfig
if
[
-d
/etc/ld.so.conf.d
]
;
then
${
csudo
}
echo
"/usr/local/lib"
>
/etc/ld.so.conf.d/jemalloc.conf
${
csudo
}
ldconfig
else
echo
"/etc/ld.so.conf.d not found!"
fi
fi
}
...
...
packaging/tools/makeclient.sh
浏览文件 @
614b5a33
...
...
@@ -41,10 +41,10 @@ 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
else
bin_files
=
"
${
build_dir
}
/bin/taos
${
build_dir
}
/bin/taosdump
${
build_dir
}
/bin/taosdemo
\
${
script_dir
}
/remove_client.sh
${
script_dir
}
/set_core.sh
${
script_dir
}
/get_client.sh
${
script_dir
}
/taosd-dump-cfg.gdb"
fi
...
...
@@ -139,7 +139,7 @@ if [[ "$pagMode" != "lite" ]] && [[ "$cpuType" != "aarch32" ]]; then
cp
-r
${
examples_dir
}
/C#
${
install_dir
}
/examples
fi
# Copy driver
mkdir
-p
${
install_dir
}
/driver
mkdir
-p
${
install_dir
}
/driver
cp
${
lib_files
}
${
install_dir
}
/driver
# Copy connector
...
...
@@ -168,7 +168,7 @@ fi
# exit 1
cd
${
release_dir
}
cd
${
release_dir
}
# install_dir has been distinguishes cluster from edege, so comments this code
pkg_name
=
${
install_dir
}
-
${
osType
}
-
${
cpuType
}
...
...
@@ -195,6 +195,15 @@ if [ "$pagMode" == "lite" ]; then
pkg_name
=
${
pkg_name
}
-Lite
fi
if
[
"
$verType
"
==
"beta"
]
;
then
pkg_name
=
${
pkg_name
}
-
${
verType
}
elif
[
"
$verType
"
==
"stable"
]
;
then
pkg_name
=
${
pkg_name
}
else
echo
"unknow verType, nor stable or beta"
exit
1
fi
if
[
"
$osType
"
!=
"Darwin"
]
;
then
tar
-zcv
-f
"
$(
basename
${
pkg_name
}
)
.tar.gz"
$(
basename
${
install_dir
}
)
--remove-files
||
:
else
...
...
packaging/tools/makeclient_power.sh
浏览文件 @
614b5a33
...
...
@@ -41,10 +41,10 @@ fi
if
[
"
$osType
"
!=
"Darwin"
]
;
then
# if [ "$pagMode" == "lite" ]; then
# strip ${build_dir}/bin/powerd
# strip ${build_dir}/bin/powerd
# strip ${build_dir}/bin/power
# bin_files="${build_dir}/bin/power ${script_dir}/remove_client_power.sh"
# else
# else
# bin_files="${build_dir}/bin/power ${build_dir}/bin/powerdemo ${script_dir}/remove_client_power.sh ${script_dir}/set_core.sh"
# fi
lib_files
=
"
${
build_dir
}
/lib/libtaos.so.
${
version
}
"
...
...
@@ -67,6 +67,39 @@ mkdir -p ${install_dir}
mkdir
-p
${
install_dir
}
/inc
&&
cp
${
header_files
}
${
install_dir
}
/inc
mkdir
-p
${
install_dir
}
/cfg
&&
cp
${
cfg_dir
}
/taos.cfg
${
install_dir
}
/cfg/taos.cfg
if
[
-f
${
build_dir
}
/bin/jemalloc-config
]
;
then
mkdir
-p
${
install_dir
}
/jemalloc/
{
bin,lib,lib/pkgconfig,include/jemalloc,share/doc/jemalloc,share/man/man3
}
cp
${
build_dir
}
/bin/jemalloc-config
${
install_dir
}
/jemalloc/bin
if
[
-f
${
build_dir
}
/bin/jemalloc.sh
]
;
then
cp
${
build_dir
}
/bin/jemalloc.sh
${
install_dir
}
/jemalloc/bin
fi
if
[
-f
${
build_dir
}
/bin/jeprof
]
;
then
cp
${
build_dir
}
/bin/jeprof
${
install_dir
}
/jemalloc/bin
fi
if
[
-f
${
build_dir
}
/include/jemalloc/jemalloc.h
]
;
then
cp
${
build_dir
}
/include/jemalloc/jemalloc.h
${
install_dir
}
/jemalloc/include/jemalloc
fi
if
[
-f
${
build_dir
}
/lib/libjemalloc.so.2
]
;
then
cp
${
build_dir
}
/lib/libjemalloc.so.2
${
install_dir
}
/jemalloc/lib
ln
-sf
libjemalloc.so.2
${
install_dir
}
/jemalloc/lib/libjemalloc.so
fi
if
[
-f
${
build_dir
}
/lib/libjemalloc.a
]
;
then
cp
${
build_dir
}
/lib/libjemalloc.a
${
install_dir
}
/jemalloc/lib
fi
if
[
-f
${
build_dir
}
/lib/libjemalloc_pic.a
]
;
then
cp
${
build_dir
}
/lib/libjemalloc_pic.a
${
install_dir
}
/jemalloc/lib
fi
if
[
-f
${
build_dir
}
/lib/pkgconfig/jemalloc.pc
]
;
then
cp
${
build_dir
}
/lib/pkgconfig/jemalloc.pc
${
install_dir
}
/jemalloc/lib/pkgconfig
fi
if
[
-f
${
build_dir
}
/share/doc/jemalloc/jemalloc.html
]
;
then
cp
${
build_dir
}
/share/doc/jemalloc/jemalloc.html
${
install_dir
}
/jemalloc/share/doc/jemalloc
fi
if
[
-f
${
build_dir
}
/share/man/man3/jemalloc.3
]
;
then
cp
${
build_dir
}
/share/man/man3/jemalloc.3
${
install_dir
}
/jemalloc/share/man/man3
fi
fi
sed
-i
'/dataDir/ {s/taos/power/g}'
${
install_dir
}
/cfg/taos.cfg
sed
-i
'/logDir/ {s/taos/power/g}'
${
install_dir
}
/cfg/taos.cfg
sed
-i
"s/TDengine/PowerDB/g"
${
install_dir
}
/cfg/taos.cfg
...
...
@@ -77,11 +110,11 @@ if [ "$osType" != "Darwin" ]; then
strip
${
build_dir
}
/bin/taos
cp
${
build_dir
}
/bin/taos
${
install_dir
}
/bin/power
cp
${
script_dir
}
/remove_power.sh
${
install_dir
}
/bin
else
else
cp
${
build_dir
}
/bin/taos
${
install_dir
}
/bin/power
cp
${
script_dir
}
/remove_power.sh
${
install_dir
}
/bin
cp
${
build_dir
}
/bin/taosdemo
${
install_dir
}
/bin/powerdemo
cp
${
build_dir
}
/bin/taosdump
${
install_dir
}
/bin/powerdump
cp
${
build_dir
}
/bin/taosdemo
${
install_dir
}
/bin/powerdemo
cp
${
build_dir
}
/bin/taosdump
${
install_dir
}
/bin/powerdump
cp
${
script_dir
}
/set_core.sh
${
install_dir
}
/bin
cp
${
script_dir
}
/get_client.sh
${
install_dir
}
/bin
cp
${
script_dir
}
/taosd-dump-cfg.gdb
${
install_dir
}
/bin
...
...
@@ -158,15 +191,15 @@ if [[ "$pagMode" != "lite" ]] && [[ "$cpuType" != "aarch32" ]]; then
cp
-r
${
examples_dir
}
/JDBC
${
install_dir
}
/examples
cp
-r
${
examples_dir
}
/matlab
${
install_dir
}
/examples
sed
-i
'/password/ {s/taosdata/powerdb/g}'
${
install_dir
}
/examples/matlab/TDengineDemo.m
cp
-r
${
examples_dir
}
/python
${
install_dir
}
/examples
cp
-r
${
examples_dir
}
/python
${
install_dir
}
/examples
sed
-i
'/password/ {s/taosdata/powerdb/g}'
${
install_dir
}
/examples/python/read_example.py
cp
-r
${
examples_dir
}
/R
${
install_dir
}
/examples
sed
-i
'/password/ {s/taosdata/powerdb/g}'
${
install_dir
}
/examples/R/command.txt
cp
-r
${
examples_dir
}
/go
${
install_dir
}
/examples
cp
-r
${
examples_dir
}
/go
${
install_dir
}
/examples
sed
-i
'/root/ {s/taosdata/powerdb/g}'
${
install_dir
}
/examples/go/taosdemo.go
fi
# Copy driver
mkdir
-p
${
install_dir
}
/driver
mkdir
-p
${
install_dir
}
/driver
cp
${
lib_files
}
${
install_dir
}
/driver
# Copy connector
...
...
@@ -188,11 +221,11 @@ if [[ "$pagMode" != "lite" ]] && [[ "$cpuType" != "aarch32" ]]; then
echo
"WARNING: go connector not found, please check if want to use it!"
fi
cp
-r
${
connector_dir
}
/python
${
install_dir
}
/connector
sed
-i
'/password/ {s/taosdata/powerdb/g}'
${
install_dir
}
/connector/python/taos/cinterface.py
sed
-i
'/password/ {s/taosdata/powerdb/g}'
${
install_dir
}
/connector/python/taos/subscription.py
sed
-i
'/self._password/ {s/taosdata/powerdb/g}'
${
install_dir
}
/connector/python/taos/connection.py
fi
# Copy release note
...
...
@@ -200,7 +233,7 @@ fi
# exit 1
cd
${
release_dir
}
cd
${
release_dir
}
if
[
"
$verMode
"
==
"cluster"
]
;
then
pkg_name
=
${
install_dir
}
-
${
osType
}
-
${
cpuType
}
...
...
@@ -217,8 +250,8 @@ fi
if
[
"
$verType
"
==
"beta"
]
;
then
pkg_name
=
${
pkg_name
}
-
${
verType
}
elif
[
"
$verType
"
==
"stable"
]
;
then
pkg_name
=
${
pkg_name
}
elif
[
"
$verType
"
==
"stable"
]
;
then
pkg_name
=
${
pkg_name
}
else
echo
"unknow verType, nor stable or beta"
exit
1
...
...
src/client/src/tscSubquery.c
浏览文件 @
614b5a33
...
...
@@ -712,6 +712,15 @@ static void updateQueryTimeRange(SQueryInfo* pQueryInfo, STimeWindow* win) {
pQueryInfo
->
window
=
*
win
;
}
int32_t
tagValCompar
(
const
void
*
p1
,
const
void
*
p2
)
{
const
STidTags
*
t1
=
(
const
STidTags
*
)
varDataVal
(
p1
);
const
STidTags
*
t2
=
(
const
STidTags
*
)
varDataVal
(
p2
);
__compar_fn_t
func
=
getComparFunc
(
t1
->
padding
,
0
);
return
func
(
t1
->
tag
,
t2
->
tag
);
}
int32_t
tidTagsCompar
(
const
void
*
p1
,
const
void
*
p2
)
{
const
STidTags
*
t1
=
(
const
STidTags
*
)
(
p1
);
const
STidTags
*
t2
=
(
const
STidTags
*
)
(
p2
);
...
...
@@ -720,28 +729,7 @@ int32_t tidTagsCompar(const void* p1, const void* p2) {
return
(
t1
->
vgId
>
t2
->
vgId
)
?
1
:
-
1
;
}
tstr
*
tag1
=
(
tstr
*
)
t1
->
tag
;
tstr
*
tag2
=
(
tstr
*
)
t2
->
tag
;
if
(
tag1
->
len
!=
tag2
->
len
)
{
return
(
tag1
->
len
>
tag2
->
len
)
?
1
:
-
1
;
}
return
strncmp
(
tag1
->
data
,
tag2
->
data
,
tag1
->
len
);
}
int32_t
tagValCompar
(
const
void
*
p1
,
const
void
*
p2
)
{
const
STidTags
*
t1
=
(
const
STidTags
*
)
varDataVal
(
p1
);
const
STidTags
*
t2
=
(
const
STidTags
*
)
varDataVal
(
p2
);
tstr
*
tag1
=
(
tstr
*
)
t1
->
tag
;
tstr
*
tag2
=
(
tstr
*
)
t2
->
tag
;
if
(
tag1
->
len
!=
tag2
->
len
)
{
return
(
tag1
->
len
>
tag2
->
len
)
?
1
:
-
1
;
}
return
memcmp
(
tag1
->
data
,
tag2
->
data
,
tag1
->
len
);
return
tagValCompar
(
p1
,
p2
);
}
void
tscBuildVgroupTableInfo
(
SSqlObj
*
pSql
,
STableMetaInfo
*
pTableMetaInfo
,
SArray
*
tables
)
{
...
...
@@ -871,6 +859,12 @@ static bool checkForDuplicateTagVal(SSchema* pColSchema, SJoinSupporter* p1, SSq
return
true
;
}
static
void
setTidTagType
(
SJoinSupporter
*
p
,
uint8_t
type
)
{
for
(
int32_t
i
=
0
;
i
<
p
->
num
;
++
i
)
{
STidTags
*
tag
=
(
STidTags
*
)
varDataVal
(
p
->
pIdTagList
+
i
*
p
->
tagSize
);
tag
->
padding
=
type
;
}
}
static
int32_t
getIntersectionOfTableTuple
(
SQueryInfo
*
pQueryInfo
,
SSqlObj
*
pParentSql
,
SArray
*
resList
)
{
int16_t
joinNum
=
pParentSql
->
subState
.
numOfSub
;
...
...
@@ -890,6 +884,8 @@ static int32_t getIntersectionOfTableTuple(SQueryInfo* pQueryInfo, SSqlObj* pPar
for
(
int32_t
i
=
0
;
i
<
joinNum
;
i
++
)
{
SJoinSupporter
*
p
=
pParentSql
->
pSubs
[
i
]
->
param
;
setTidTagType
(
p
,
pColSchema
->
type
);
ctxlist
[
i
].
p
=
p
;
ctxlist
[
i
].
res
=
taosArrayInit
(
p
->
num
,
size
);
...
...
src/kit/taosdemo/taosdemo.c
浏览文件 @
614b5a33
...
...
@@ -1141,7 +1141,6 @@ static void parse_args(int argc, char *argv[], SArguments *arguments) {
if
(
arguments
->
disorderRatio
)
{
printf
(
"# Data order: %d
\n
"
,
arguments
->
disorderRatio
);
printf
(
"# Data out of order rate: %d
\n
"
,
arguments
->
disorderRange
);
}
printf
(
"# Delete method: %d
\n
"
,
arguments
->
method_of_delete
);
printf
(
"# Answer yes when prompt: %d
\n
"
,
arguments
->
answer_yes
);
...
...
@@ -2196,7 +2195,6 @@ static void printfQuerySystemInfo(TAOS * taos) {
snprintf
(
buffer
,
MAX_QUERY_SQL_LENGTH
,
"show %s.stables;"
,
dbInfos
[
i
]
->
name
);
res
=
taos_query
(
taos
,
buffer
);
xDumpResultToFile
(
filename
,
res
);
free
(
dbInfos
[
i
]);
}
...
...
src/query/src/qTsbuf.c
浏览文件 @
614b5a33
...
...
@@ -267,6 +267,10 @@ static void writeDataToDisk(STSBuf* pTSBuf) {
if
(
pBlock
->
tag
.
nType
==
TSDB_DATA_TYPE_BINARY
||
pBlock
->
tag
.
nType
==
TSDB_DATA_TYPE_NCHAR
)
{
metaLen
+=
(
int32_t
)
fwrite
(
&
pBlock
->
tag
.
nLen
,
1
,
sizeof
(
pBlock
->
tag
.
nLen
),
pTSBuf
->
f
);
metaLen
+=
(
int32_t
)
fwrite
(
pBlock
->
tag
.
pz
,
1
,
(
size_t
)
pBlock
->
tag
.
nLen
,
pTSBuf
->
f
);
}
else
if
(
pBlock
->
tag
.
nType
==
TSDB_DATA_TYPE_FLOAT
)
{
metaLen
+=
(
int32_t
)
fwrite
(
&
pBlock
->
tag
.
nLen
,
1
,
sizeof
(
pBlock
->
tag
.
nLen
),
pTSBuf
->
f
);
float
tfloat
=
(
float
)
pBlock
->
tag
.
dKey
;
metaLen
+=
(
int32_t
)
fwrite
(
&
tfloat
,
1
,
(
size_t
)
pBlock
->
tag
.
nLen
,
pTSBuf
->
f
);
}
else
if
(
pBlock
->
tag
.
nType
!=
TSDB_DATA_TYPE_NULL
)
{
metaLen
+=
(
int32_t
)
fwrite
(
&
pBlock
->
tag
.
nLen
,
1
,
sizeof
(
pBlock
->
tag
.
nLen
),
pTSBuf
->
f
);
metaLen
+=
(
int32_t
)
fwrite
(
&
pBlock
->
tag
.
i64
,
1
,
(
size_t
)
pBlock
->
tag
.
nLen
,
pTSBuf
->
f
);
...
...
@@ -351,6 +355,11 @@ STSBlock* readDataFromDisk(STSBuf* pTSBuf, int32_t order, bool decomp) {
sz
=
fread
(
pBlock
->
tag
.
pz
,
(
size_t
)
pBlock
->
tag
.
nLen
,
1
,
pTSBuf
->
f
);
UNUSED
(
sz
);
}
else
if
(
pBlock
->
tag
.
nType
==
TSDB_DATA_TYPE_FLOAT
)
{
float
tfloat
=
0
;
sz
=
fread
(
&
tfloat
,
(
size_t
)
pBlock
->
tag
.
nLen
,
1
,
pTSBuf
->
f
);
pBlock
->
tag
.
dKey
=
(
double
)
tfloat
;
UNUSED
(
sz
);
}
else
if
(
pBlock
->
tag
.
nType
!=
TSDB_DATA_TYPE_NULL
)
{
//TODO check the return value
sz
=
fread
(
&
pBlock
->
tag
.
i64
,
(
size_t
)
pBlock
->
tag
.
nLen
,
1
,
pTSBuf
->
f
);
UNUSED
(
sz
);
...
...
src/tsdb/src/tsdbRead.c
浏览文件 @
614b5a33
...
...
@@ -3698,6 +3698,10 @@ static void* doFreeColumnInfoData(SArray* pColumnInfoData) {
}
static
void
*
destroyTableCheckInfo
(
SArray
*
pTableCheckInfo
)
{
if
(
pTableCheckInfo
==
NULL
)
{
return
NULL
;
}
size_t
size
=
taosArrayGetSize
(
pTableCheckInfo
);
for
(
int32_t
i
=
0
;
i
<
size
;
++
i
)
{
STableCheckInfo
*
p
=
taosArrayGet
(
pTableCheckInfo
,
i
);
...
...
tests/pytest/query/queryPerformance.py
浏览文件 @
614b5a33
...
...
@@ -73,10 +73,11 @@ class taosdemoQueryPerformace:
sql
=
"select avg(f1), max(f2), min(f3) from meters where ts <= '2017-07-15 10:40:01.000' and ts <= '2017-07-15 14:00:40.000'"
tableid
=
8
cursor
.
execute
(
"create table if not exists %s%d using %s tags(%d,
\"
%s
\"
)"
%
(
self
.
tbPerfix
,
tableid
,
self
.
stbName
,
tableid
,
sql
))
sql
=
"select last(*) from meters"
tableid
=
9
cursor
.
execute
(
"create table if not exists %s%d using %s tags(%d, '%s')"
%
(
self
.
tbPerfix
,
tableid
,
self
.
stbName
,
tableid
,
sql
))
cursor
.
close
()
def
query
(
self
):
...
...
tests/pytest/tools/taosdemoPerformance.py
浏览文件 @
614b5a33
...
...
@@ -19,7 +19,6 @@ import json
from
util.log
import
tdLog
from
util.sql
import
tdSql
class
taosdemoPerformace
:
def
__init__
(
self
,
commitID
,
dbName
):
self
.
commitID
=
commitID
...
...
@@ -124,6 +123,7 @@ class taosdemoPerformace:
def
insertData
(
self
):
tdSql
.
prepare
()
buildPath
=
self
.
getBuildPath
()
if
(
buildPath
==
""
):
tdLog
.
exit
(
"taosdemo not found!"
)
...
...
tests/pytest/tools/taosdumpTest.py
浏览文件 @
614b5a33
...
...
@@ -105,7 +105,6 @@ class TDTestCase:
# 6--days,7--keep0,keep1,keep, 12--block,
isCommunity
=
self
.
checkCommunity
()
print
(
"iscommunity: %d"
%
isCommunity
)
for
i
in
range
(
len
(
dbresult
)):
if
dbresult
[
i
][
0
]
==
'db'
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录