Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
冷面1992
TDengine
提交
f54a8d04
TDengine
项目概览
冷面1992
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f54a8d04
编写于
9月 14, 2021
作者:
G
Ganlin Zhao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-6638]<fix>: OpenTSDB telnet line tags should be separated using whitespace not comma
上级
e4503b8e
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
19 addition
and
19 deletion
+19
-19
src/client/src/tscParseOpenTSDB.c
src/client/src/tscParseOpenTSDB.c
+2
-2
tests/examples/c/apitest.c
tests/examples/c/apitest.c
+9
-9
tests/pytest/insert/insertTelnetLines.py
tests/pytest/insert/insertTelnetLines.py
+8
-8
未找到文件。
src/client/src/tscParseOpenTSDB.c
浏览文件 @
f54a8d04
...
@@ -211,8 +211,8 @@ static int32_t parseTelnetTagValue(TAOS_SML_KV *pKV, const char **index,
...
@@ -211,8 +211,8 @@ static int32_t parseTelnetTagValue(TAOS_SML_KV *pKV, const char **index,
start
=
cur
=
*
index
;
start
=
cur
=
*
index
;
while
(
1
)
{
while
(
1
)
{
//
','
or '\0' identifies a value
//
whitespace
or '\0' identifies a value
if
(
*
cur
==
'
,
'
||
*
cur
==
'\0'
)
{
if
(
*
cur
==
'
'
||
*
cur
==
'\0'
)
{
// '\0' indicates end of value
// '\0' indicates end of value
*
is_last_kv
=
(
*
cur
==
'\0'
)
?
true
:
false
;
*
is_last_kv
=
(
*
cur
==
'\0'
)
?
true
:
false
;
break
;
break
;
...
...
tests/examples/c/apitest.c
浏览文件 @
f54a8d04
...
@@ -1033,9 +1033,9 @@ void verify_telnet_insert(TAOS* taos) {
...
@@ -1033,9 +1033,9 @@ void verify_telnet_insert(TAOS* taos) {
/* metric */
/* metric */
char
*
lines0
[]
=
{
char
*
lines0
[]
=
{
"stb0_0 1626006833639000000ns 4i8 host=
\"
host0
\"
,
interface=
\"
eth0
\"
"
,
"stb0_0 1626006833639000000ns 4i8 host=
\"
host0
\"
interface=
\"
eth0
\"
"
,
"stb0_1 1626006833639000000ns 4i8 host=
\"
host0
\"
,
interface=
\"
eth0
\"
"
,
"stb0_1 1626006833639000000ns 4i8 host=
\"
host0
\"
interface=
\"
eth0
\"
"
,
"stb0_2 1626006833639000000ns 4i8 host=
\"
host0
\"
,
interface=
\"
eth0
\"
"
,
"stb0_2 1626006833639000000ns 4i8 host=
\"
host0
\"
interface=
\"
eth0
\"
"
,
};
};
code
=
taos_insert_telnet_lines
(
taos
,
lines0
,
3
);
code
=
taos_insert_telnet_lines
(
taos
,
lines0
,
3
);
if
(
code
)
{
if
(
code
)
{
...
@@ -1057,7 +1057,7 @@ void verify_telnet_insert(TAOS* taos) {
...
@@ -1057,7 +1057,7 @@ void verify_telnet_insert(TAOS* taos) {
}
}
/* metric value */
/* metric value */
//tinyin
//tinyin
t
char
*
lines2_0
[]
=
{
char
*
lines2_0
[]
=
{
"stb2_0 1626006833651ms -127i8 host=
\"
host0
\"
"
,
"stb2_0 1626006833651ms -127i8 host=
\"
host0
\"
"
,
"stb2_0 1626006833652ms 127i8 host=
\"
host0
\"
"
"stb2_0 1626006833652ms 127i8 host=
\"
host0
\"
"
...
@@ -1176,8 +1176,8 @@ void verify_telnet_insert(TAOS* taos) {
...
@@ -1176,8 +1176,8 @@ void verify_telnet_insert(TAOS* taos) {
/* tags */
/* tags */
//tag value types
//tag value types
char
*
lines3_0
[]
=
{
char
*
lines3_0
[]
=
{
"stb3_0 1626006833610ms 1 t1=127i8
,t2=32767i16,t3=2147483647i32,t4=9223372036854775807i64,t5=3.4E38f32,t6=1.7E308f64,t7=true,t8=
\"
binary_val_1
\"
,
t9=L
\"
标签值1
\"
"
,
"stb3_0 1626006833610ms 1 t1=127i8
t2=32767i16 t3=2147483647i32 t4=9223372036854775807i64 t5=3.4E38f32 t6=1.7E308f64 t7=true t8=
\"
binary_val_1
\"
t9=L
\"
标签值1
\"
"
,
"stb3_0 1626006833610ms 2 t1=-127i8
,t2=-32767i16,t3=-2147483647i32,t4=-9223372036854775807i64,t5=-3.4E38f32,t6=-1.7E308f64,t7=false,t8=
\"
binary_val_2
\"
,
t9=L
\"
标签值2
\"
"
"stb3_0 1626006833610ms 2 t1=-127i8
t2=-32767i16 t3=-2147483647i32 t4=-9223372036854775807i64 t5=-3.4E38f32 t6=-1.7E308f64 t7=false t8=
\"
binary_val_2
\"
t9=L
\"
标签值2
\"
"
};
};
code
=
taos_insert_telnet_lines
(
taos
,
lines3_0
,
2
);
code
=
taos_insert_telnet_lines
(
taos
,
lines3_0
,
2
);
if
(
code
)
{
if
(
code
)
{
...
@@ -1186,9 +1186,9 @@ void verify_telnet_insert(TAOS* taos) {
...
@@ -1186,9 +1186,9 @@ void verify_telnet_insert(TAOS* taos) {
//tag ID as child table name
//tag ID as child table name
char
*
lines3_1
[]
=
{
char
*
lines3_1
[]
=
{
"stb3_1 1626006833610ms 1 id=
\"
child_table1
\"
,
host=
\"
host1
\"
"
,
"stb3_1 1626006833610ms 1 id=
\"
child_table1
\"
host=
\"
host1
\"
"
,
"stb3_1 1626006833610ms 2 host=
\"
host2
\"
,
iD=
\"
child_table2
\"
"
,
"stb3_1 1626006833610ms 2 host=
\"
host2
\"
iD=
\"
child_table2
\"
"
,
"stb3_1 1626006833610ms 3 ID=
\"
child_table3
\"
,
host=
\"
host3
\"
"
"stb3_1 1626006833610ms 3 ID=
\"
child_table3
\"
host=
\"
host3
\"
"
};
};
code
=
taos_insert_telnet_lines
(
taos
,
lines3_1
,
3
);
code
=
taos_insert_telnet_lines
(
taos
,
lines3_1
,
3
);
if
(
code
)
{
if
(
code
)
{
...
...
tests/pytest/insert/insertTelnetLines.py
浏览文件 @
f54a8d04
...
@@ -33,9 +33,9 @@ class TDTestCase:
...
@@ -33,9 +33,9 @@ class TDTestCase:
### metric ###
### metric ###
print
(
"============= step1 : test metric ================"
)
print
(
"============= step1 : test metric ================"
)
lines0
=
[
lines0
=
[
"stb0_0 1626006833639000000ns 4i8 host=
\"
host0
\"
,
interface=
\"
eth0
\"
"
,
"stb0_0 1626006833639000000ns 4i8 host=
\"
host0
\"
interface=
\"
eth0
\"
"
,
"stb0_1 1626006833639000000ns 4i8 host=
\"
host0
\"
,
interface=
\"
eth0
\"
"
,
"stb0_1 1626006833639000000ns 4i8 host=
\"
host0
\"
interface=
\"
eth0
\"
"
,
"stb0_2 1626006833639000000ns 4i8 host=
\"
host0
\"
,
interface=
\"
eth0
\"
"
,
"stb0_2 1626006833639000000ns 4i8 host=
\"
host0
\"
interface=
\"
eth0
\"
"
,
]
]
code
=
self
.
_conn
.
insert_telnet_lines
(
lines0
)
code
=
self
.
_conn
.
insert_telnet_lines
(
lines0
)
...
@@ -245,8 +245,8 @@ class TDTestCase:
...
@@ -245,8 +245,8 @@ class TDTestCase:
print
(
"============= step3 : test tags ================"
)
print
(
"============= step3 : test tags ================"
)
#tag value types
#tag value types
lines3_0
=
[
lines3_0
=
[
"stb3_0 1626006833610ms 1 t1=127i8
,t2=32767i16,t3=2147483647i32,t4=9223372036854775807i64,t5=3.4E38f32,t6=1.7E308f64,t7=true,t8=
\"
binary_val_1
\"
,
t9=L
\"
标签值1
\"
"
,
"stb3_0 1626006833610ms 1 t1=127i8
t2=32767i16 t3=2147483647i32 t4=9223372036854775807i64 t5=3.4E38f32 t6=1.7E308f64 t7=true t8=
\"
binary_val_1
\"
t9=L
\"
标签值1
\"
"
,
"stb3_0 1626006833610ms 2 t1=-127i8
,t2=-32767i16,t3=-2147483647i32,t4=-9223372036854775807i64,t5=-3.4E38f32,t6=-1.7E308f64,t7=false,t8=
\"
binary_val_2
\"
,
t9=L
\"
标签值2
\"
"
"stb3_0 1626006833610ms 2 t1=-127i8
t2=-32767i16 t3=-2147483647i32 t4=-9223372036854775807i64 t5=-3.4E38f32 t6=-1.7E308f64 t7=false t8=
\"
binary_val_2
\"
t9=L
\"
标签值2
\"
"
]
]
code
=
self
.
_conn
.
insert_telnet_lines
(
lines3_0
)
code
=
self
.
_conn
.
insert_telnet_lines
(
lines3_0
)
...
@@ -288,9 +288,9 @@ class TDTestCase:
...
@@ -288,9 +288,9 @@ class TDTestCase:
#tag ID as child table name
#tag ID as child table name
lines3_1
=
[
lines3_1
=
[
"stb3_1 1626006833610ms 1 id=
\"
child_table1
\"
,
host=
\"
host1
\"
"
,
"stb3_1 1626006833610ms 1 id=
\"
child_table1
\"
host=
\"
host1
\"
"
,
"stb3_1 1626006833610ms 2 host=
\"
host2
\"
,
iD=
\"
child_table2
\"
"
,
"stb3_1 1626006833610ms 2 host=
\"
host2
\"
iD=
\"
child_table2
\"
"
,
"stb3_1 1626006833610ms 3 ID=
\"
child_table3
\"
,
host=
\"
host3
\"
"
"stb3_1 1626006833610ms 3 ID=
\"
child_table3
\"
host=
\"
host3
\"
"
]
]
code
=
self
.
_conn
.
insert_telnet_lines
(
lines3_1
)
code
=
self
.
_conn
.
insert_telnet_lines
(
lines3_1
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录