Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
529f906e
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看板
提交
529f906e
编写于
6月 25, 2021
作者:
T
tickduan
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop' into fix/lhhuo/TD-4872-O3-core
上级
f4931b4d
d5155996
变更
9
展开全部
隐藏空白更改
内联
并排
Showing
9 changed file
with
648 addition
and
185 deletion
+648
-185
README-CN.md
README-CN.md
+8
-2
README.md
README.md
+6
-0
src/common/inc/tdataformat.h
src/common/inc/tdataformat.h
+5
-0
src/common/src/tdataformat.c
src/common/src/tdataformat.c
+1
-1
src/kit/taosdemo/taosdemo.c
src/kit/taosdemo/taosdemo.c
+65
-83
tests/pytest/fulltest.sh
tests/pytest/fulltest.sh
+1
-1
tests/pytest/insert/in_function.py
tests/pytest/insert/in_function.py
+486
-98
tests/pytest/tools/taosdumpTest.py
tests/pytest/tools/taosdumpTest.py
+2
-0
tests/pytest/tools/taosdumpTest2.py
tests/pytest/tools/taosdumpTest2.py
+74
-0
未找到文件。
README-CN.md
浏览文件 @
529f906e
...
@@ -23,7 +23,7 @@ TDengine是涛思数据专为物联网、车联网、工业互联网、IT运维
...
@@ -23,7 +23,7 @@ TDengine是涛思数据专为物联网、车联网、工业互联网、IT运维
TDengine是一个高效的存储、查询、分析时序大数据的平台,专为物联网、车联网、工业互联网、运维监测等优化而设计。您可以像使用关系型数据库MySQL一样来使用它,但建议您在使用前仔细阅读一遍下面的文档,特别是
[
数据模型
](
https://www.taosdata.com/cn/documentation/architecture
)
与
[
数据建模
](
https://www.taosdata.com/cn/documentation/model
)
。除本文档之外,欢迎
[
下载产品白皮书
](
https://www.taosdata.com/downloads/TDengine%20White%20Paper.pdf
)
。
TDengine是一个高效的存储、查询、分析时序大数据的平台,专为物联网、车联网、工业互联网、运维监测等优化而设计。您可以像使用关系型数据库MySQL一样来使用它,但建议您在使用前仔细阅读一遍下面的文档,特别是
[
数据模型
](
https://www.taosdata.com/cn/documentation/architecture
)
与
[
数据建模
](
https://www.taosdata.com/cn/documentation/model
)
。除本文档之外,欢迎
[
下载产品白皮书
](
https://www.taosdata.com/downloads/TDengine%20White%20Paper.pdf
)
。
#
生成
#
构建
TDengine目前2.0版服务器仅能在Linux系统上安装和运行,后续会支持Windows、macOS等系统。客户端可以在Windows或Linux上安装和运行。任何OS的应用也可以选择RESTful接口连接服务器taosd。CPU支持X64/ARM64/MIPS64/Alpha64,后续会支持ARM32、RISC-V等CPU架构。用户可根据需求选择通过
[
源码
](
https://www.taosdata.com/cn/getting-started/#通过源码安装
)
或者
[
安装包
](
https://www.taosdata.com/cn/getting-started/#通过安装包安装
)
来安装。本快速指南仅适用于通过源码安装。
TDengine目前2.0版服务器仅能在Linux系统上安装和运行,后续会支持Windows、macOS等系统。客户端可以在Windows或Linux上安装和运行。任何OS的应用也可以选择RESTful接口连接服务器taosd。CPU支持X64/ARM64/MIPS64/Alpha64,后续会支持ARM32、RISC-V等CPU架构。用户可根据需求选择通过
[
源码
](
https://www.taosdata.com/cn/getting-started/#通过源码安装
)
或者
[
安装包
](
https://www.taosdata.com/cn/getting-started/#通过安装包安装
)
来安装。本快速指南仅适用于通过源码安装。
...
@@ -107,7 +107,7 @@ Go 连接器和 Grafana 插件在其他独立仓库,如果安装它们的话
...
@@ -107,7 +107,7 @@ Go 连接器和 Grafana 插件在其他独立仓库,如果安装它们的话
git submodule update
--init
--recursive
git submodule update
--init
--recursive
```
```
##
生成
TDengine
##
构建
TDengine
### Linux 系统
### Linux 系统
...
@@ -116,6 +116,12 @@ mkdir debug && cd debug
...
@@ -116,6 +116,12 @@ mkdir debug && cd debug
cmake ..
&&
cmake
--build
.
cmake ..
&&
cmake
--build
.
```
```
您可以选择使用 Jemalloc 作为内存分配器,替代默认的 glibc:
```
bash
apt
install
autoconf
cmake ..
-DJEMALLOC_ENABLED
=
true
```
在X86-64、X86、arm64、arm32 和 mips64 平台上,TDengine 生成脚本可以自动检测机器架构。也可以手动配置 CPUTYPE 参数来指定 CPU 类型,如 aarch64 或 aarch32 等。
在X86-64、X86、arm64、arm32 和 mips64 平台上,TDengine 生成脚本可以自动检测机器架构。也可以手动配置 CPUTYPE 参数来指定 CPU 类型,如 aarch64 或 aarch32 等。
aarch64:
aarch64:
...
...
README.md
浏览文件 @
529f906e
...
@@ -110,6 +110,12 @@ mkdir debug && cd debug
...
@@ -110,6 +110,12 @@ mkdir debug && cd debug
cmake ..
&&
cmake
--build
.
cmake ..
&&
cmake
--build
.
```
```
You can use Jemalloc as memory allocator instead of glibc:
```
apt install autoconf
cmake .. -DJEMALLOC_ENABLED=true
```
TDengine build script can detect the host machine's architecture on X86-64, X86, arm64, arm32 and mips64 platform.
TDengine build script can detect the host machine's architecture on X86-64, X86, arm64, arm32 and mips64 platform.
You can also specify CPUTYPE option like aarch64 or aarch32 too if the detection result is not correct:
You can also specify CPUTYPE option like aarch64 or aarch32 too if the detection result is not correct:
...
...
src/common/inc/tdataformat.h
浏览文件 @
529f906e
...
@@ -289,6 +289,11 @@ static FORCE_INLINE TKEY dataColsTKeyFirst(SDataCols *pCols) {
...
@@ -289,6 +289,11 @@ static FORCE_INLINE TKEY dataColsTKeyFirst(SDataCols *pCols) {
}
}
}
}
static
FORCE_INLINE
TSKEY
dataColsKeyAtRow
(
SDataCols
*
pCols
,
int
row
)
{
ASSERT
(
row
<
pCols
->
numOfRows
);
return
dataColsKeyAt
(
pCols
,
row
);
}
static
FORCE_INLINE
TSKEY
dataColsKeyFirst
(
SDataCols
*
pCols
)
{
static
FORCE_INLINE
TSKEY
dataColsKeyFirst
(
SDataCols
*
pCols
)
{
if
(
pCols
->
numOfRows
)
{
if
(
pCols
->
numOfRows
)
{
return
dataColsKeyAt
(
pCols
,
0
);
return
dataColsKeyAt
(
pCols
,
0
);
...
...
src/common/src/tdataformat.c
浏览文件 @
529f906e
...
@@ -452,7 +452,7 @@ int tdMergeDataCols(SDataCols *target, SDataCols *source, int rowsToMerge, int *
...
@@ -452,7 +452,7 @@ int tdMergeDataCols(SDataCols *target, SDataCols *source, int rowsToMerge, int *
SDataCols
*
pTarget
=
NULL
;
SDataCols
*
pTarget
=
NULL
;
if
((
target
->
numOfRows
==
0
)
||
(
dataColsKeyLast
(
target
)
<
dataColsKey
First
(
source
)))
{
// No overlap
if
((
target
->
numOfRows
==
0
)
||
(
dataColsKeyLast
(
target
)
<
dataColsKey
AtRow
(
source
,
*
pOffset
)))
{
// No overlap
ASSERT
(
target
->
numOfRows
+
rowsToMerge
<=
target
->
maxPoints
);
ASSERT
(
target
->
numOfRows
+
rowsToMerge
<=
target
->
maxPoints
);
for
(
int
i
=
0
;
i
<
rowsToMerge
;
i
++
)
{
for
(
int
i
=
0
;
i
<
rowsToMerge
;
i
++
)
{
for
(
int
j
=
0
;
j
<
source
->
numOfCols
;
j
++
)
{
for
(
int
j
=
0
;
j
<
source
->
numOfCols
;
j
++
)
{
...
...
src/kit/taosdemo/taosdemo.c
浏览文件 @
529f906e
此差异已折叠。
点击以展开。
tests/pytest/fulltest.sh
浏览文件 @
529f906e
...
@@ -235,7 +235,7 @@ python3 ./test.py -f query/queryTscomputWithNow.py
...
@@ -235,7 +235,7 @@ python3 ./test.py -f query/queryTscomputWithNow.py
python3 ./test.py
-f
query/computeErrorinWhere.py
python3 ./test.py
-f
query/computeErrorinWhere.py
python3 ./test.py
-f
query/queryTsisNull.py
python3 ./test.py
-f
query/queryTsisNull.py
python3 ./test.py
-f
query/subqueryFilter.py
python3 ./test.py
-f
query/subqueryFilter.py
python3 ./test.py
-f
query/nestedQuery/queryInterval.py
#
python3 ./test.py -f query/nestedQuery/queryInterval.py
python3 ./test.py
-f
query/queryStateWindow.py
python3 ./test.py
-f
query/queryStateWindow.py
...
...
tests/pytest/insert/in_function.py
浏览文件 @
529f906e
此差异已折叠。
点击以展开。
tests/pytest/tools/taosdumpTest.py
浏览文件 @
529f906e
...
@@ -45,7 +45,9 @@ class TDTestCase:
...
@@ -45,7 +45,9 @@ class TDTestCase:
for
i
in
range
(
100
):
for
i
in
range
(
100
):
sql
+=
"(%d, %d, 'nchar%d')"
%
(
currts
+
i
,
i
%
100
,
i
%
100
)
sql
+=
"(%d, %d, 'nchar%d')"
%
(
currts
+
i
,
i
%
100
,
i
%
100
)
tdSql
.
execute
(
sql
)
tdSql
.
execute
(
sql
)
os
.
system
(
"rm /tmp/*.sql"
)
os
.
system
(
"taosdump --databases db -o /tmp"
)
os
.
system
(
"taosdump --databases db -o /tmp"
)
tdSql
.
execute
(
"drop database db"
)
tdSql
.
execute
(
"drop database db"
)
...
...
tests/pytest/tools/taosdumpTest2.py
0 → 100644
浏览文件 @
529f906e
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
#
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
#
###################################################################
# -*- coding: utf-8 -*-
import
sys
import
os
from
util.log
import
*
from
util.cases
import
*
from
util.sql
import
*
from
util.dnodes
import
*
class
TDTestCase
:
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
(),
logSql
)
self
.
ts
=
1601481600000
self
.
numberOfTables
=
1
self
.
numberOfRecords
=
15000
def
run
(
self
):
tdSql
.
prepare
()
tdSql
.
execute
(
"create table st(ts timestamp, c1 timestamp, c2 int, c3 bigint, c4 float, c5 double, c6 binary(8), c7 smallint, c8 tinyint, c9 bool, c10 nchar(8)) tags(t1 int)"
)
tdSql
.
execute
(
"create table t1 using st tags(0)"
)
currts
=
self
.
ts
finish
=
0
while
(
finish
<
self
.
numberOfRecords
):
sql
=
"insert into t1 values"
for
i
in
range
(
finish
,
self
.
numberOfRecords
):
sql
+=
"(%d, 1019774612, 29931, 1442173978, 165092.468750, 1128.643179, 'MOCq1pTu', 18405, 82, 0, 'g0A6S0Fu')"
%
(
currts
+
i
)
finish
=
i
+
1
if
(
1048576
-
len
(
sql
))
<
16384
:
break
tdSql
.
execute
(
sql
)
os
.
system
(
"rm /tmp/*.sql"
)
os
.
system
(
"taosdump --databases db -o /tmp -B 32766 -L 1048576"
)
tdSql
.
execute
(
"drop database db"
)
tdSql
.
query
(
"show databases"
)
tdSql
.
checkRows
(
0
)
os
.
system
(
"taosdump -i /tmp"
)
tdSql
.
query
(
"show databases"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
'db'
)
tdSql
.
execute
(
"use db"
)
tdSql
.
query
(
"show stables"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
'st'
)
tdSql
.
query
(
"select count(*) from t1"
)
tdSql
.
checkData
(
0
,
0
,
self
.
numberOfRecords
)
def
stop
(
self
):
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录