节点管理

    示例:

    • 查询 root.ln 的下一层:show child paths root.ln
    1. | child paths|
    2. +------------+
    3. |root.ln.wf01|
    4. |root.ln.wf02|
    5. +------------+
    • 查询形如 root.xx.xx.xx 的路径:show child paths root.*.*
    1. +---------------+
    2. | child paths|
    3. +---------------+
    4. |root.ln.wf01.s1|
    5. |root.ln.wf02.s2|
    6. +---------------+
    1. SHOW CHILD NODES pathPattern

    可以查看此路径模式所匹配的节点的下一层的所有节点。

    示例:

    • 查询 root 的下一层:show child nodes root
    • 查询 root.ln 的下一层 :show child nodes root.ln
    1. +------------+
    2. | child nodes|
    3. +------------+
    4. | wf01|
    5. | wf02|
    6. +------------+
    1. IoTDB > COUNT NODES root.** LEVEL=2
    2. IoTDB > COUNT NODES root.ln.** LEVEL=2
    3. IoTDB > COUNT NODES root.ln.wf01.* LEVEL=3
    4. IoTDB > COUNT NODES root.**.temperature LEVEL=3

    对于上面提到的例子和 Metadata Tree,你可以获得如下结果:

    1. +-----+
    2. |count|
    3. +-----+
    4. | 4|
    5. Total line number = 1
    6. It costs 0.003s
    7. +-----+
    8. |count|
    9. +-----+
    10. +-----+
    11. Total line number = 1
    12. It costs 0.002s
    13. +-----+
    14. |count|
    15. +-----+
    16. | 1|
    17. +-----+
    18. Total line number = 1
    19. It costs 0.002s
    20. +-----+
    21. |count|
    22. +-----+
    23. | 2|
    24. +-----+
    25. Total line number = 1
    26. It costs 0.002s
    • SHOW DEVICES pathPattern? (WITH STORAGE GROUP)? limitClause? #showDevices

    Show Timeseries 相似,IoTDB 目前也支持两种方式查看设备。

    • SHOW DEVICES 语句显示当前所有的设备信息,等价于 SHOW DEVICES root.**
    • SHOW DEVICES <PathPattern> 语句规定了 PathPattern,返回给定的路径模式所匹配的设备信息。

    你可以获得如下数据:

    1. +-------------------+---------+
    2. | devices|isAligned|
    3. +-------------------+---------+
    4. | root.ln.wf01.wt01| false|
    5. | root.ln.wf02.wt02| false|
    6. |root.sgcc.wf03.wt01| false|
    7. +-------------------+---------+
    8. Total line number = 4
    9. It costs 0.002s
    10. +-----------------+---------+
    11. | devices|isAligned|
    12. +-----------------+---------+
    13. |root.ln.wf01.wt01| false|
    14. |root.ln.wf02.wt02| false|
    15. +-----------------+---------+
    16. Total line number = 2
    17. It costs 0.001s

    其中,isAligned表示该设备下的时间序列是否对齐。

    查看设备及其存储组信息,可以使用 SHOW DEVICES WITH STORAGE GROUP 语句。

    • SHOW DEVICES WITH STORAGE GROUP 语句显示当前所有的设备信息和其所在的存储组,等价于 SHOW DEVICES root.**
    • SHOW DEVICES <PathPattern> WITH STORAGE GROUP 语句规定了 PathPattern,返回给定的路径模式所匹配的设备信息和其所在的存储组。
    1. IoTDB> show devices with storage group
    2. IoTDB> show devices root.ln.** with storage group

    你可以获得如下数据:

    1. +-------------------+-------------+---------+
    2. | devices|storage group|isAligned|
    3. +-------------------+-------------+---------+
    4. | root.ln.wf01.wt01| root.ln| false|
    5. | root.ln.wf02.wt02| root.ln| false|
    6. |root.sgcc.wf03.wt01| root.sgcc| false|
    7. | root.turbine.d1| root.turbine| false|
    8. +-------------------+-------------+---------+
    9. Total line number = 4
    10. It costs 0.003s
    11. +-----------------+-------------+---------+
    12. | devices|storage group|isAligned|
    13. +-----------------+-------------+---------+
    14. |root.ln.wf01.wt01| root.ln| false|
    15. |root.ln.wf02.wt02| root.ln| false|
    16. +-----------------+-------------+---------+
    17. Total line number = 2