最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【已解决】创建TDengine的demo数据taosdemo用于测试效果

数据 crifan 476浏览 0评论
折腾:
【未解决】试用TDeigine数据库的功能和效果
期间,去创建demo示例数据用于测试效果。
然后看看:
[[email protected] tdengine]# taos
taos      taosd     taosdemo  taosdump  
然后去看看是有taosdemo的
直接去试试
[[email protected] tdengine]# taosdemo 
Failed to connect to TDengine, reason:failed to connect to server
结果连不上server。是因为此处没有启动服务端。
或许可以:
用ssh开2个连接连接服务器
其中一个开服务器端taosd
另外一个运行taosdemo
再去另外连接一个终端
taosdemo
然后开始插入数据:
[[email protected] tdengine]# taos
taos      taosd     taosdemo  taosdump
[[email protected] tdengine]# taos^C
[[email protected] tdengine]# taosdemo
Creating meters super table...
meters created!
Creating 10000 table(s)......
Table(s) created!
Inserting data......

服务器端有很多对应log输出:
02/29 20:36:29.436811 4129 7f027b637700 MND user:root login from 127.0.0.1, code:0
02/29 20:36:32.438005 4129 7f0279e34700 MND DB:0.test is created by root
02/29 20:36:32.439245 4129 7f027e63d700 DND vid:1, vpeer cfg received, replica:1 session:1001, vnodeList replica:0 session:0, acct:root db:0.test
02/29 20:36:32.439275 4129 7f027e63d700 DND vid:1, vpeer:0 ip:0x0 vid:1 
02/29 20:36:32.439278 4129 7f027e63d700 DND vid:1, vnode is empty
02/29 20:36:32.439281 4129 7f027e63d700 DND vid:1, status:offline, start to create vnode
02/29 20:36:32.439640 4129 7f027e63d700 DND vid:1, cache pool is allocated:0x8c0
02/29 20:36:32.440673 4129 7f027e63d700 DND vid:1, commit log is initialized
02/29 20:36:32.440687 4129 7f027e63d700 DND vid:1, storage initialized, version:0 fileId:0 numOfFiles:0
02/29 20:36:32.440691 4129 7f027e63d700 DND vid:1, status:creating, start to open
02/29 20:36:32.440743 4129 7f027e63d700 DND vid:1, sessions:1001, shell is opened
02/29 20:36:32.440749 4129 7f027e63d700 DND vid:1, status:master numOfPeers:0
02/29 20:36:32.440752 4129 7f027e63d700 DND vid:1, stream role is changed from stop to start
02/29 20:36:32.440768 4129 7f027e63d700 DND vid:1, vnode is opened, openVnodes:2, status:master
02/29 20:36:32.627507 4129 7f027e63d700 DND vid:2, vpeer cfg received, replica:1 session:1001, vnodeList replica:0 session:0, acct:root db:0.test
02/29 20:36:32.627518 4129 7f027e63d700 DND vid:2, vpeer:0 ip:0x0 vid:2 
02/29 20:36:32.627521 4129 7f027e63d700 DND vid:2, vnode is empty
02/29 20:36:32.627524 4129 7f027e63d700 DND vid:2, status:offline, start to create vnode
...
02/29 20:36:34.118269 4129 7f027e63d700 DND vid:10, status:creating, start to open
02/29 20:36:34.118299 4129 7f027e63d700 DND vid:10, sessions:1001, shell is opened
02/29 20:36:34.118306 4129 7f027e63d700 DND vid:10, status:master numOfPeers:0
02/29 20:36:34.118309 4129 7f027e63d700 DND vid:10, stream role is changed from stop to start
02/29 20:36:34.118320 4129 7f027e63d700 DND vid:10, vnode is opened, openVnodes:11, status:master
02/29 20:36:39.300317 4129 7f027de3c700 MND user:root login from 127.0.0.1, code:0
...
02/29 20:36:39.303573 4129 7f027ce3a700 MND user:root login from 127.0.0.1, code:0
02/29 20:37:00.235498 4129 7f02633f9700 DND vid:1, committing to file, firstKey:1500000000000 lastKey:1500000001999 ssid:0 esid:1000
02/29 20:37:00.238795 4129 7f02633f9700 DND vid:1, fileId:1736, empty header file:/var/lib/taos/tsdb/vnode1/db/v1f1736.head dataFile:/var/lib/taos/tsdb/vnode1/db/v1f1736.data ...lastFile:/var/lib/taos/tsdb/vnode5/db/v5f1736.last on disk:/var/lib/taos is created
02/29 20:37:00.388018 4129 7f0260bf4700 DND vid:5, data file:/var/lib/taos/tsdb/vnode5/db/v5f1736.data is opened to write
02/29 20:37:00.441036 4129 7f019a575700 DND vid:4, committing to file, firstKey:1500000000000 lastKey:1500000001999 ssid:0 esid:1000
02/29 20:37:00.444442 4129 7f01dacbb700 DND vid:9, committing to file, firstKey:1500000000000 lastKey:1500000001999 ssid:0 esid:1000
02/29 20:37:00.446643 4129 7f019a575700 DND vid:4, fileId:1736, empty header file:/var/lib/taos/tsdb/vnode4/db/v4f1736.head dataFile:/var/lib/taos/tsdb/vnode4/db/v4f1736.data lastFile:/var/lib/taos/tsdb/vnode4/db/v4f1736.last on disk:/var/lib/taos is created 
02/29 20:37:00.446798 4129 7f019a575700 DND vid:4, data file:/var/lib/taos/tsdb/vnode4/db/v4f1736.data is opened to write
02/29 20:37:00.447774 4129 7f01dacbb700 DND vid:9, fileId:1736, empty header file:/var/lib/taos/tsdb/vnode9/db/v9f1736.head dataFile:/var/lib/taos/tsdb/vnode9/db/v9f1736.data lastFile:/var/lib/taos/tsdb/vnode9/db/v9f1736.last on disk:/var/lib/taos is created 
02/29 20:37:00.447960 4129 7f01dacbb700 DND vid:9, data file:/var/lib/taos/tsdb/vnode9/db/v9f1736.data is opened to write
02/29 20:37:00.478963 4129 7f01da4ba700 DND vid:10, committing to file, firstKey:1500000000000 lastKey:1500000001999 ssid:0 esid:1000
02/29 20:37:00.481972 4129 7f01da4ba700 DND vid:10, fileId:1736, empty header file:/var/lib/taos/tsdb/vnode10/db/v10f1736.head dataFile:/var/lib/taos/tsdb/vnode10/db/v10f1736.data lastFile:/var/lib/taos/tsdb/vnode10/db/v10f1736.last on disk:/var/lib/taos is created 
02/29 20:37:00.482164 4129 7f01da4ba700 DND vid:10, data file:/var/lib/taos/tsdb/vnode10/db/v10f1736.data is opened to write
02/29 20:37:00.494521 4129 7f02633f9700 DND vid:1, committing is over
02/29 20:37:00.538701 4129 7f0262bf8700 DND vid:7, committing is over
02/29 20:37:00.569978 4129 7f0261bf6700 DND vid:8, committing is over
02/29 20:37:00.602185 4129 7f02613f5700 DND vid:2, committing is over
02/29 20:37:00.606749 4129 7f02623f7700 DND vid:6, committing is over
此处运行了20分钟左右了,数据还没插入完毕
还没完毕
结果 23:03 再打开电脑发现 iTerm2的终端 都崩溃了
剩下服务器端,还在继续插入数据:
那就继续等待插入数据吧
后来过了一夜,不知道何时电脑已经关机。所以不知道数据是否插入完成。
去连接服务器看看情况。
后来确认插入demo数据已完成:
[[email protected] tdengine]# taos


Welcome to the TDengine shell from linux, community client version:1.6.5.5 community server version:1.6.5.5
Copyright (c) 2017 by TAOS Data, Inc. All rights reserved.


taos> show databases;
              name              |     created time     |  ntables  |  vgroups  |replica| days  |  keep1,keep2,keep(D)   |  tables   |   rows    | cache(b)  |      ablocks       |tblocks| ctime(s)  | clog | comp |time precision|  status  |
==============================================================================================================================================================================================================================================
log                             | 20-02-29 20:11:41.989|          4|          1|      1|     10|30,30,30                |         32|       1024|       2048|             2.00000|     32|       3600|     1|     2|us            |ready     |
test                            | 20-02-29 20:36:32.437|      10000|         10|      1|     10|3650,3650,3650          |       1000|       4096|      16384|             4.00000|     50|       3600|     1|     2|ms            |ready     |
Query OK, 2 row(s) in set (0.000974s)


taos> select count(*) from test.meters;
      count(*)       |
======================
           1000000000|
Query OK, 1 row(s) in set (0.337635s)
插入了10亿条数据。
后续就可以去试试效果了。

转载请注明:在路上 » 【已解决】创建TDengine的demo数据taosdemo用于测试效果

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
83 queries in 0.113 seconds, using 20.53MB memory