'How to know which vnode a table is in when using TDengine?
I am use TDengine now. I know that TDengine likes Cassandra that both use virtual node as virtualization. How can I know which vnode a table is in? I tried to use describe tbname
, but I got no information like below:
enter image description here
Solution 1:[1]
you can use "show vgroups" to check how many vnodes you have
taos> show vgroups;
vgId | tables | status | onlines | v1_dnode | v1_status | compacting |
==========================================================================================
3 | 1000 | ready | 1 | 1 | master | 0 |
4 | 1000 | ready | 1 | 1 | master | 0 |
5 | 1000 | ready | 1 | 1 | master | 0 |
6 | 1000 | ready | 1 | 1 | master | 0 |
7 | 1000 | ready | 1 | 1 | master | 0 |
8 | 1000 | ready | 1 | 1 | master | 0 |
9 | 1000 | ready | 1 | 1 | master | 0 |
10 | 1000 | ready | 1 | 1 | master | 0 |
11 | 1000 | ready | 1 | 1 | master | 0 |
12 | 1000 | ready | 1 | 1 | master | 0 |
Query OK, 10 row(s) in set (0.001933s)
From the output, you know the vgroup id, then you can use "show tables like tbname" to get which vnode the table is in.
taos> show tables like "d8645";
table_name | created_time | columns | stable_name | uid | tid | vgId |
==========================================================================================================================================================
d8645 | 2022-04-24 14:43:23.183 | 4 | meters | 2814763207660351 | 801 | 10 |
Query OK, 1 row(s) in set (0.009541s)
From the output, you know that table d8645 is in vgroup 10
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Xiao Ping |