diff --git a/src/UserGuide/Master/Table/Reference/System-Tables_apache.md b/src/UserGuide/Master/Table/Reference/System-Tables_apache.md index 2aa05d9fd..e57c59d6b 100644 --- a/src/UserGuide/Master/Table/Reference/System-Tables_apache.md +++ b/src/UserGuide/Master/Table/Reference/System-Tables_apache.md @@ -57,6 +57,7 @@ IoTDB> show tables from information_schema | queries| INF| |queries_costs_histogram| INF| | regions| INF| +| services| INF| | subscriptions| INF| | tables| INF| | topics| INF| @@ -66,7 +67,7 @@ IoTDB> show tables from information_schema ## 2. System Tables -* ​**Names**​: `DATABASES`, `TABLES`, `REGIONS`, `QUERIES`, `COLUMNS`, `PIPES`, `PIPE_PLUGINS`, `SUBSCRIPTION`, `TOPICS`, `VIEWS`, `MODELS`, `FUNCTIONS`, `CONFIGURATIONS`, `KEYWORDS`, `NODES`, `CONFIG_NODES`, `DATA_NODES` , `CONNECTIONS`, `CURRENT_QUERIES`, `QUERIES_COSTS_HISTOGRAM` (detailed descriptions in later sections) +* ​**Names**​: `DATABASES`, `TABLES`, `REGIONS`, `QUERIES`, `COLUMNS`, `PIPES`, `PIPE_PLUGINS`, `SUBSCRIPTION`, `TOPICS`, `VIEWS`, `MODELS`, `FUNCTIONS`, `CONFIGURATIONS`, `KEYWORDS`, `NODES`, `CONFIG_NODES`, `DATA_NODES` , `CONNECTIONS`, `CURRENT_QUERIES`, `QUERIES_COSTS_HISTOGRAM`, `SERVICES` (detailed descriptions in later sections) * ​**Operations**​: Read-only, only supports `SELECT`, `COUNT/SHOW DEVICES`, `DESC`. Any modifications to table structure or content are not allowed and will result in an error: `"The database 'information_schema' can only be queried." ` * ​**Column Names**​: System table column names are all lowercase by default and separated by underscores (`_`). @@ -343,7 +344,7 @@ IoTDB> select * from information_schema.topics +----------+----------------------------------------------------------------+ ``` -### 2.10 VIEWS Table +### 2.10 VIEWS > This system table is available starting from version V2.0.5. @@ -369,9 +370,9 @@ IoTDB> select * from information_schema.views ``` -### 2.11 MODELS Table +### 2.11 MODELS -> This system table is available starting from version V 2.0.5 and has been discontinued since version V 2.0.8. +> This system table is available starting from version V 2.0.5 and has been discontinued since version V 2.0.8-beta. * Contains information about all models in the database. * The table structure is as follows: @@ -402,7 +403,7 @@ IoTDB> select * from information_schema.models where model_type = 'BUILT_IN_FORE ``` -### 2.12 FUNCTIONS Table +### 2.12 FUNCTIONS > This system table is available starting from version V2.0.5. @@ -434,7 +435,7 @@ IoTDB> select * from information_schema.functions where function_type='built-in ``` -### 2.13 CONFIGURATIONS Table +### 2.13 CONFIGURATIONS > This system table is available starting from version V2.0.5. @@ -473,7 +474,7 @@ IoTDB> select * from information_schema.configurations ``` -### 2.14 KEYWORDS Table +### 2.14 KEYWORDS > This system table is available starting from version V2.0.5. @@ -506,7 +507,7 @@ IoTDB> select * from information_schema.keywords limit 10 ``` -### 2.15 NODES Table +### 2.15 NODES > This system table is available starting from version V2.0.5. @@ -538,7 +539,7 @@ IoTDB> select * from information_schema.nodes ``` -### 2.16 CONFIG\_NODES Table +### 2.16 CONFIG\_NODES > This system table is available starting from version V2.0.5. @@ -564,7 +565,7 @@ IoTDB> select * from information_schema.config_nodes ``` -### 2.17 DATA\_NODES Table +### 2.17 DATA\_NODES > This system table is available starting from version V2.0.5. @@ -594,9 +595,9 @@ IoTDB> select * from information_schema.data_nodes +-------+---------------+-----------------+-----------+--------+--------+-------------------+---------------------+ ``` -### 2.18 CONNECTIONS Table +### 2.18 CONNECTIONS -> This system table is available starting from version V 2.0.8 +> This system table is available starting from version V 2.0.8-beta * Contains all connections in the cluster. * The table structure is as follows: @@ -621,9 +622,9 @@ IoTDB> select * from information_schema.connections; +-----------+-------+----------+---------+-----------------------------+---------+ ``` -### 2.19 CURRENT_QUERIES Table +### 2.19 CURRENT_QUERIES -> This system table is available starting from version V 2.0.8 +> This system table is available starting from version V 2.0.8-beta * Contains all queries whose execution end time falls within the range `[now() - query_cost_stat_window, now())`, including currently executing queries. The `query_cost_stat_window` parameter represents the query cost statistics window. Its default value is 0 and can be configured via the `iotdb-system.properties` configuration file. * The table structure is as follows: @@ -652,9 +653,9 @@ IoTDB> select * from information_schema.current_queries; +-----------------------+-------+-----------------------------+--------+-----------+---------+------------------------------------------------+----+---------+ ``` -### 2.20 QUERIES_COSTS_HISTOGRAM Table +### 2.20 QUERIES_COSTS_HISTOGRAM -> This system table is available starting from version V 2.0.8 +> This system table is available starting from version V 2.0.8-beta * Contains a histogram of query execution times within the past `query_cost_stat_window` period (only statistics for completed SQL queries). The `query_cost_stat_window` parameter represents the query cost statistics window. Its default value is 0 and can be configured via the `iotdb-system.properties` configuration file. * The table structure is as follows: @@ -686,6 +687,30 @@ IoTDB> select * from information_schema.queries_costs_histogram limit 10 +------+----+-----------+ ``` +### 2.21 SERVICES + +> This system table is available starting from version V 2.0.8-beta + +* Displays services (MQTT service, REST service) on all active DataNodes (with RUNNING or READ-ONLY status). +* Table structure: + +| Column Name | Data Type | Column Type | Description | +|---------------|-----------|-------------|---------------------------------| +| service_name | STRING | TAG | Service Name | +| datanode_id | INT32 | ATTRIBUTE | DataNode ID where service runs | +| state | STRING | ATTRIBUTE | Service status: RUNNING/STOPPED | + +* Query example: +```sql +IoTDB> SELECT * FROM information_schema.services ++------------+-----------+---------+ +|service_name|datanode_id|state | ++------------+-----------+---------+ +|MQTT |1 |STOPPED | +|REST |1 |RUNNING | ++------------+-----------+---------+ +``` + ## 3. Permission Description diff --git a/src/UserGuide/Master/Table/Reference/System-Tables_timecho.md b/src/UserGuide/Master/Table/Reference/System-Tables_timecho.md index 7bb37e58c..b48984261 100644 --- a/src/UserGuide/Master/Table/Reference/System-Tables_timecho.md +++ b/src/UserGuide/Master/Table/Reference/System-Tables_timecho.md @@ -57,6 +57,7 @@ IoTDB> show tables from information_schema | queries| INF| |queries_costs_histogram| INF| | regions| INF| +| services| INF| | subscriptions| INF| | tables| INF| | topics| INF| @@ -66,7 +67,7 @@ IoTDB> show tables from information_schema ## 2. System Tables -* ​**Names**​: `DATABASES`, `TABLES`, `REGIONS`, `QUERIES`, `COLUMNS`, `PIPES`, `PIPE_PLUGINS`, `SUBSCRIPTION`, `TOPICS`, `VIEWS`, `MODELS`, `FUNCTIONS`, `CONFIGURATIONS`, `KEYWORDS`, `NODES`, `CONFIG_NODES`, `DATA_NODES`, `CONNECTIONS`, `CURRENT_QUERIES`, `QUERIES_COSTS_HISTOGRAM` (detailed descriptions in later sections) +* ​**Names**​: `DATABASES`, `TABLES`, `REGIONS`, `QUERIES`, `COLUMNS`, `PIPES`, `PIPE_PLUGINS`, `SUBSCRIPTION`, `TOPICS`, `VIEWS`, `MODELS`, `FUNCTIONS`, `CONFIGURATIONS`, `KEYWORDS`, `NODES`, `CONFIG_NODES`, `DATA_NODES`, `CONNECTIONS`, `CURRENT_QUERIES`, `QUERIES_COSTS_HISTOGRAM`, `SERVICES` (detailed descriptions in later sections) * ​**Operations**​: Read-only, only supports `SELECT`, `COUNT/SHOW DEVICES`, `DESC`. Any modifications to table structure or content are not allowed and will result in an error: `"The database 'information_schema' can only be queried." ` * ​**Column Names**​: System table column names are all lowercase by default and separated by underscores (`_`). @@ -343,7 +344,7 @@ IoTDB> select * from information_schema.topics +----------+----------------------------------------------------------------+ ``` -### 2.10 VIEWS Table +### 2.10 VIEWS > This system table is available starting from version V2.0.5. @@ -369,9 +370,9 @@ IoTDB> select * from information_schema.views ``` -### 2.11 MODELS Table +### 2.11 MODELS -> This system table is available starting from version V 2.0.5 and has been discontinued since version V 2.0.8. +> This system table is available starting from version V 2.0.5 and has been discontinued since version V 2.0.8-beta. * Contains information about all models in the database. * The table structure is as follows: @@ -402,7 +403,7 @@ IoTDB> select * from information_schema.models where model_type = 'BUILT_IN_FORE ``` -### 2.12 FUNCTIONS Table +### 2.12 FUNCTIONS > This system table is available starting from version V2.0.5. @@ -434,7 +435,7 @@ IoTDB> select * from information_schema.functions where function_type='built-in ``` -### 2.13 CONFIGURATIONS Table +### 2.13 CONFIGURATIONS > This system table is available starting from version V2.0.5. @@ -473,7 +474,7 @@ IoTDB> select * from information_schema.configurations ``` -### 2.14 KEYWORDS Table +### 2.14 KEYWORDS > This system table is available starting from version V2.0.5. @@ -506,7 +507,7 @@ IoTDB> select * from information_schema.keywords limit 10 ``` -### 2.15 NODES Table +### 2.15 NODES > This system table is available starting from version V2.0.5. @@ -538,7 +539,7 @@ IoTDB> select * from information_schema.nodes ``` -### 2.16 CONFIG\_NODES Table +### 2.16 CONFIG\_NODES > This system table is available starting from version V2.0.5. @@ -564,7 +565,7 @@ IoTDB> select * from information_schema.config_nodes ``` -### 2.17 DATA\_NODES Table +### 2.17 DATA\_NODES > This system table is available starting from version V2.0.5. @@ -594,9 +595,9 @@ IoTDB> select * from information_schema.data_nodes +-------+---------------+-----------------+-----------+--------+--------+-------------------+---------------------+ ``` -### 2.18 CONNECTIONS Table +### 2.18 CONNECTIONS -> This system table is available starting from version V 2.0.8 +> This system table is available starting from version V 2.0.8-beta * Contains all connections in the cluster. * The table structure is as follows: @@ -621,9 +622,9 @@ IoTDB> select * from information_schema.connections; +-----------+-------+----------+---------+-----------------------------+---------+ ``` -### 2.19 CURRENT_QUERIES Table +### 2.19 CURRENT_QUERIES -> This system table is available starting from version V 2.0.8 +> This system table is available starting from version V 2.0.8-beta * Contains all queries whose execution end time falls within the range `[now() - query_cost_stat_window, now())`, including currently executing queries. The `query_cost_stat_window` parameter represents the query cost statistics window. Its default value is 0 and can be configured via the `iotdb-system.properties` configuration file. * The table structure is as follows: @@ -652,9 +653,9 @@ IoTDB> select * from information_schema.current_queries; +-----------------------+-------+-----------------------------+--------+-----------+---------+------------------------------------------------+----+---------+ ``` -### 2.20 QUERIES_COSTS_HISTOGRAM Table +### 2.20 QUERIES_COSTS_HISTOGRAM -> This system table is available starting from version V 2.0.8 +> This system table is available starting from version V 2.0.8-beta * Contains a histogram of query execution times within the past `query_cost_stat_window` period (only statistics for completed SQL queries). The `query_cost_stat_window` parameter represents the query cost statistics window. Its default value is 0 and can be configured via the `iotdb-system.properties` configuration file. * The table structure is as follows: @@ -686,6 +687,30 @@ IoTDB> select * from information_schema.queries_costs_histogram limit 10 +------+----+-----------+ ``` +### 2.21 SERVICES + +> This system table is available starting from version V 2.0.8-beta + +* Displays services (MQTT service, REST service) on all active DataNodes (with RUNNING or READ-ONLY status). +* Table structure: + +| Column Name | Data Type | Column Type | Description | +|---------------|-----------|-------------|---------------------------------| +| service_name | STRING | TAG | Service Name | +| datanode_id | INT32 | ATTRIBUTE | DataNode ID where service runs | +| state | STRING | ATTRIBUTE | Service status: RUNNING/STOPPED | + +* Query example: +```sql +IoTDB> SELECT * FROM information_schema.services ++------------+-----------+---------+ +|service_name|datanode_id|state | ++------------+-----------+---------+ +|MQTT |1 |STOPPED | +|REST |1 |RUNNING | ++------------+-----------+---------+ +``` + ## 3. Permission Description diff --git a/src/UserGuide/Master/Table/User-Manual/Maintenance-commands_apache.md b/src/UserGuide/Master/Table/User-Manual/Maintenance-commands_apache.md index 659e7a5d1..a91d8285c 100644 --- a/src/UserGuide/Master/Table/User-Manual/Maintenance-commands_apache.md +++ b/src/UserGuide/Master/Table/User-Manual/Maintenance-commands_apache.md @@ -341,7 +341,7 @@ IoTDB> SHOW REGIONS **Description**: Returns the RPC addresses and ports of all available DataNodes in the current cluster. Note: A DataNode is considered "available" if it is not in the REMOVING state. -> This feature is supported starting from v2.0.8. +> This feature is supported starting from v2.0.8-beta. **Syntax**: @@ -367,6 +367,34 @@ IoTDB> SHOW AVAILABLE URLS +----------+-------+ ``` +### 1.11 View Service Information + +**Description**: Returns service information (MQTT service, REST service) on all active DataNodes (in RUNNING or READ-ONLY state) in the current cluster. + +> Supported since V2.0.8-beta + +#### Syntax: +```sql +showServicesStatement + : SHOW SERVICES + ; +``` + +#### Examples: +```sql +IoTDB> SHOW SERVICES +IoTDB> SHOW SERVICES ON 1 +``` + +Execution result: +```sql ++--------------+-------------+---------+ +| Service Name | DataNode ID | State | ++--------------+-------------+---------+ +| MQTT | 1 | STOPPED | +| REST | 1 | RUNNING | ++--------------+-------------+---------+ +``` ## 2. Status Setting diff --git a/src/UserGuide/Master/Table/User-Manual/Maintenance-commands_timecho.md b/src/UserGuide/Master/Table/User-Manual/Maintenance-commands_timecho.md index 02185325c..74ba99728 100644 --- a/src/UserGuide/Master/Table/User-Manual/Maintenance-commands_timecho.md +++ b/src/UserGuide/Master/Table/User-Manual/Maintenance-commands_timecho.md @@ -341,7 +341,7 @@ IoTDB> SHOW REGIONS **Description**: Returns the RPC addresses and ports of all available DataNodes in the current cluster. Note: A DataNode is considered "available" if it is not in the REMOVING state. -> This feature is supported starting from v2.0.8. +> This feature is supported starting from v2.0.8-beta. **Syntax**: @@ -365,8 +365,37 @@ IoTDB> SHOW AVAILABLE URLS +----------+-------+ | 0.0.0.0| 6667| +----------+-------+ +``` + +### 1.11 View Service Information + +**Description**: Returns service information (MQTT service, REST service) on all active DataNodes (in RUNNING or READ-ONLY state) in the current cluster. + +> Supported since V2.0.8-beta + +#### Syntax: +```sql +showServicesStatement + : SHOW SERVICES + ; +``` + +#### Examples: +```sql +IoTDB> SHOW SERVICES +IoTDB> SHOW SERVICES ON 1 ``` +Execution result: +```sql ++--------------+-------------+---------+ +| Service Name | DataNode ID | State | ++--------------+-------------+---------+ +| MQTT | 1 | STOPPED | +| REST | 1 | RUNNING | ++--------------+-------------+---------+ +``` + ## 2. Status Setting diff --git a/src/UserGuide/Master/Tree/User-Manual/Maintenance-commands.md b/src/UserGuide/Master/Tree/User-Manual/Maintenance-commands.md index b6d0988bd..1ed8b8521 100644 --- a/src/UserGuide/Master/Tree/User-Manual/Maintenance-commands.md +++ b/src/UserGuide/Master/Tree/User-Manual/Maintenance-commands.md @@ -24,7 +24,7 @@ ### 1.1 Viewing the Connected Model -**Description**: Returns the current SQL dialect model (`Tree` or `Table`). +**Description**: Returns the current SQL dialect mode (`Tree` or `Table`). **Syntax**: @@ -247,7 +247,7 @@ IoTDB> SHOW REGIONS **Description**: Returns the RPC addresses and ports of all available DataNodes in the current cluster. Note: A DataNode is considered "available" if it is not in the REMOVING state. -> This feature is supported starting from v2.0.8. +> This feature is supported starting from v2.0.8-beta. **Syntax**: @@ -273,12 +273,41 @@ IoTDB> SHOW AVAILABLE URLS +----------+-------+ ``` +### 1.8 View Service Information + +**Description**: Returns service information (MQTT service, REST service) on all active DataNodes (in RUNNING or READ-ONLY state) in the current cluster. + +> This feature is supported starting from v2.0.8-beta. + +#### Syntax: +```sql +showServicesStatement + : SHOW SERVICES + ; +``` + +#### Examples: +```sql +IoTDB> SHOW SERVICES +IoTDB> SHOW SERVICES ON 1 +``` + +Execution result: +```sql ++--------------+-------------+---------+ +| Service Name | DataNode ID | State | ++--------------+-------------+---------+ +| MQTT | 1 | STOPPED | +| REST | 1 | RUNNING | ++--------------+-------------+---------+ +``` + ## 2. Status Setting ### 2.1 Setting the Connected Model -**Description**: Sets the current SQL dialect model to `Tree` or `Table` which can be used in both tree and table models. +**Description**: Sets the current SQL dialect mode to `Tree` or `Table` which can be used in both tree and table modes. **Syntax**: diff --git a/src/UserGuide/latest-Table/Reference/System-Tables_apache.md b/src/UserGuide/latest-Table/Reference/System-Tables_apache.md index a67792b56..e57c59d6b 100644 --- a/src/UserGuide/latest-Table/Reference/System-Tables_apache.md +++ b/src/UserGuide/latest-Table/Reference/System-Tables_apache.md @@ -57,6 +57,7 @@ IoTDB> show tables from information_schema | queries| INF| |queries_costs_histogram| INF| | regions| INF| +| services| INF| | subscriptions| INF| | tables| INF| | topics| INF| @@ -66,7 +67,7 @@ IoTDB> show tables from information_schema ## 2. System Tables -* ​**Names**​: `DATABASES`, `TABLES`, `REGIONS`, `QUERIES`, `COLUMNS`, `PIPES`, `PIPE_PLUGINS`, `SUBSCRIPTION`, `TOPICS`, `VIEWS`, `MODELS`, `FUNCTIONS`, `CONFIGURATIONS`, `KEYWORDS`, `NODES`, `CONFIG_NODES`, `DATA_NODES` , `CONNECTIONS`, `CURRENT_QUERIES`, `QUERIES_COSTS_HISTOGRAM` (detailed descriptions in later sections) +* ​**Names**​: `DATABASES`, `TABLES`, `REGIONS`, `QUERIES`, `COLUMNS`, `PIPES`, `PIPE_PLUGINS`, `SUBSCRIPTION`, `TOPICS`, `VIEWS`, `MODELS`, `FUNCTIONS`, `CONFIGURATIONS`, `KEYWORDS`, `NODES`, `CONFIG_NODES`, `DATA_NODES` , `CONNECTIONS`, `CURRENT_QUERIES`, `QUERIES_COSTS_HISTOGRAM`, `SERVICES` (detailed descriptions in later sections) * ​**Operations**​: Read-only, only supports `SELECT`, `COUNT/SHOW DEVICES`, `DESC`. Any modifications to table structure or content are not allowed and will result in an error: `"The database 'information_schema' can only be queried." ` * ​**Column Names**​: System table column names are all lowercase by default and separated by underscores (`_`). @@ -343,7 +344,7 @@ IoTDB> select * from information_schema.topics +----------+----------------------------------------------------------------+ ``` -### 2.10 VIEWS Table +### 2.10 VIEWS > This system table is available starting from version V2.0.5. @@ -369,7 +370,7 @@ IoTDB> select * from information_schema.views ``` -### 2.11 MODELS Table +### 2.11 MODELS > This system table is available starting from version V 2.0.5 and has been discontinued since version V 2.0.8-beta. @@ -402,7 +403,7 @@ IoTDB> select * from information_schema.models where model_type = 'BUILT_IN_FORE ``` -### 2.12 FUNCTIONS Table +### 2.12 FUNCTIONS > This system table is available starting from version V2.0.5. @@ -434,7 +435,7 @@ IoTDB> select * from information_schema.functions where function_type='built-in ``` -### 2.13 CONFIGURATIONS Table +### 2.13 CONFIGURATIONS > This system table is available starting from version V2.0.5. @@ -473,7 +474,7 @@ IoTDB> select * from information_schema.configurations ``` -### 2.14 KEYWORDS Table +### 2.14 KEYWORDS > This system table is available starting from version V2.0.5. @@ -506,7 +507,7 @@ IoTDB> select * from information_schema.keywords limit 10 ``` -### 2.15 NODES Table +### 2.15 NODES > This system table is available starting from version V2.0.5. @@ -538,7 +539,7 @@ IoTDB> select * from information_schema.nodes ``` -### 2.16 CONFIG\_NODES Table +### 2.16 CONFIG\_NODES > This system table is available starting from version V2.0.5. @@ -564,7 +565,7 @@ IoTDB> select * from information_schema.config_nodes ``` -### 2.17 DATA\_NODES Table +### 2.17 DATA\_NODES > This system table is available starting from version V2.0.5. @@ -594,7 +595,7 @@ IoTDB> select * from information_schema.data_nodes +-------+---------------+-----------------+-----------+--------+--------+-------------------+---------------------+ ``` -### 2.18 CONNECTIONS Table +### 2.18 CONNECTIONS > This system table is available starting from version V 2.0.8-beta @@ -621,7 +622,7 @@ IoTDB> select * from information_schema.connections; +-----------+-------+----------+---------+-----------------------------+---------+ ``` -### 2.19 CURRENT_QUERIES Table +### 2.19 CURRENT_QUERIES > This system table is available starting from version V 2.0.8-beta @@ -652,7 +653,7 @@ IoTDB> select * from information_schema.current_queries; +-----------------------+-------+-----------------------------+--------+-----------+---------+------------------------------------------------+----+---------+ ``` -### 2.20 QUERIES_COSTS_HISTOGRAM Table +### 2.20 QUERIES_COSTS_HISTOGRAM > This system table is available starting from version V 2.0.8-beta @@ -686,6 +687,30 @@ IoTDB> select * from information_schema.queries_costs_histogram limit 10 +------+----+-----------+ ``` +### 2.21 SERVICES + +> This system table is available starting from version V 2.0.8-beta + +* Displays services (MQTT service, REST service) on all active DataNodes (with RUNNING or READ-ONLY status). +* Table structure: + +| Column Name | Data Type | Column Type | Description | +|---------------|-----------|-------------|---------------------------------| +| service_name | STRING | TAG | Service Name | +| datanode_id | INT32 | ATTRIBUTE | DataNode ID where service runs | +| state | STRING | ATTRIBUTE | Service status: RUNNING/STOPPED | + +* Query example: +```sql +IoTDB> SELECT * FROM information_schema.services ++------------+-----------+---------+ +|service_name|datanode_id|state | ++------------+-----------+---------+ +|MQTT |1 |STOPPED | +|REST |1 |RUNNING | ++------------+-----------+---------+ +``` + ## 3. Permission Description diff --git a/src/UserGuide/latest-Table/Reference/System-Tables_timecho.md b/src/UserGuide/latest-Table/Reference/System-Tables_timecho.md index e7b43683a..b48984261 100644 --- a/src/UserGuide/latest-Table/Reference/System-Tables_timecho.md +++ b/src/UserGuide/latest-Table/Reference/System-Tables_timecho.md @@ -57,6 +57,7 @@ IoTDB> show tables from information_schema | queries| INF| |queries_costs_histogram| INF| | regions| INF| +| services| INF| | subscriptions| INF| | tables| INF| | topics| INF| @@ -66,7 +67,7 @@ IoTDB> show tables from information_schema ## 2. System Tables -* ​**Names**​: `DATABASES`, `TABLES`, `REGIONS`, `QUERIES`, `COLUMNS`, `PIPES`, `PIPE_PLUGINS`, `SUBSCRIPTION`, `TOPICS`, `VIEWS`, `MODELS`, `FUNCTIONS`, `CONFIGURATIONS`, `KEYWORDS`, `NODES`, `CONFIG_NODES`, `DATA_NODES`, `CONNECTIONS`, `CURRENT_QUERIES`, `QUERIES_COSTS_HISTOGRAM` (detailed descriptions in later sections) +* ​**Names**​: `DATABASES`, `TABLES`, `REGIONS`, `QUERIES`, `COLUMNS`, `PIPES`, `PIPE_PLUGINS`, `SUBSCRIPTION`, `TOPICS`, `VIEWS`, `MODELS`, `FUNCTIONS`, `CONFIGURATIONS`, `KEYWORDS`, `NODES`, `CONFIG_NODES`, `DATA_NODES`, `CONNECTIONS`, `CURRENT_QUERIES`, `QUERIES_COSTS_HISTOGRAM`, `SERVICES` (detailed descriptions in later sections) * ​**Operations**​: Read-only, only supports `SELECT`, `COUNT/SHOW DEVICES`, `DESC`. Any modifications to table structure or content are not allowed and will result in an error: `"The database 'information_schema' can only be queried." ` * ​**Column Names**​: System table column names are all lowercase by default and separated by underscores (`_`). @@ -343,7 +344,7 @@ IoTDB> select * from information_schema.topics +----------+----------------------------------------------------------------+ ``` -### 2.10 VIEWS Table +### 2.10 VIEWS > This system table is available starting from version V2.0.5. @@ -369,7 +370,7 @@ IoTDB> select * from information_schema.views ``` -### 2.11 MODELS Table +### 2.11 MODELS > This system table is available starting from version V 2.0.5 and has been discontinued since version V 2.0.8-beta. @@ -402,7 +403,7 @@ IoTDB> select * from information_schema.models where model_type = 'BUILT_IN_FORE ``` -### 2.12 FUNCTIONS Table +### 2.12 FUNCTIONS > This system table is available starting from version V2.0.5. @@ -434,7 +435,7 @@ IoTDB> select * from information_schema.functions where function_type='built-in ``` -### 2.13 CONFIGURATIONS Table +### 2.13 CONFIGURATIONS > This system table is available starting from version V2.0.5. @@ -473,7 +474,7 @@ IoTDB> select * from information_schema.configurations ``` -### 2.14 KEYWORDS Table +### 2.14 KEYWORDS > This system table is available starting from version V2.0.5. @@ -506,7 +507,7 @@ IoTDB> select * from information_schema.keywords limit 10 ``` -### 2.15 NODES Table +### 2.15 NODES > This system table is available starting from version V2.0.5. @@ -538,7 +539,7 @@ IoTDB> select * from information_schema.nodes ``` -### 2.16 CONFIG\_NODES Table +### 2.16 CONFIG\_NODES > This system table is available starting from version V2.0.5. @@ -564,7 +565,7 @@ IoTDB> select * from information_schema.config_nodes ``` -### 2.17 DATA\_NODES Table +### 2.17 DATA\_NODES > This system table is available starting from version V2.0.5. @@ -594,7 +595,7 @@ IoTDB> select * from information_schema.data_nodes +-------+---------------+-----------------+-----------+--------+--------+-------------------+---------------------+ ``` -### 2.18 CONNECTIONS Table +### 2.18 CONNECTIONS > This system table is available starting from version V 2.0.8-beta @@ -621,7 +622,7 @@ IoTDB> select * from information_schema.connections; +-----------+-------+----------+---------+-----------------------------+---------+ ``` -### 2.19 CURRENT_QUERIES Table +### 2.19 CURRENT_QUERIES > This system table is available starting from version V 2.0.8-beta @@ -652,7 +653,7 @@ IoTDB> select * from information_schema.current_queries; +-----------------------+-------+-----------------------------+--------+-----------+---------+------------------------------------------------+----+---------+ ``` -### 2.20 QUERIES_COSTS_HISTOGRAM Table +### 2.20 QUERIES_COSTS_HISTOGRAM > This system table is available starting from version V 2.0.8-beta @@ -686,6 +687,30 @@ IoTDB> select * from information_schema.queries_costs_histogram limit 10 +------+----+-----------+ ``` +### 2.21 SERVICES + +> This system table is available starting from version V 2.0.8-beta + +* Displays services (MQTT service, REST service) on all active DataNodes (with RUNNING or READ-ONLY status). +* Table structure: + +| Column Name | Data Type | Column Type | Description | +|---------------|-----------|-------------|---------------------------------| +| service_name | STRING | TAG | Service Name | +| datanode_id | INT32 | ATTRIBUTE | DataNode ID where service runs | +| state | STRING | ATTRIBUTE | Service status: RUNNING/STOPPED | + +* Query example: +```sql +IoTDB> SELECT * FROM information_schema.services ++------------+-----------+---------+ +|service_name|datanode_id|state | ++------------+-----------+---------+ +|MQTT |1 |STOPPED | +|REST |1 |RUNNING | ++------------+-----------+---------+ +``` + ## 3. Permission Description diff --git a/src/UserGuide/latest-Table/User-Manual/Maintenance-commands_apache.md b/src/UserGuide/latest-Table/User-Manual/Maintenance-commands_apache.md index 4351cf4fa..a91d8285c 100644 --- a/src/UserGuide/latest-Table/User-Manual/Maintenance-commands_apache.md +++ b/src/UserGuide/latest-Table/User-Manual/Maintenance-commands_apache.md @@ -367,6 +367,34 @@ IoTDB> SHOW AVAILABLE URLS +----------+-------+ ``` +### 1.11 View Service Information + +**Description**: Returns service information (MQTT service, REST service) on all active DataNodes (in RUNNING or READ-ONLY state) in the current cluster. + +> Supported since V2.0.8-beta + +#### Syntax: +```sql +showServicesStatement + : SHOW SERVICES + ; +``` + +#### Examples: +```sql +IoTDB> SHOW SERVICES +IoTDB> SHOW SERVICES ON 1 +``` + +Execution result: +```sql ++--------------+-------------+---------+ +| Service Name | DataNode ID | State | ++--------------+-------------+---------+ +| MQTT | 1 | STOPPED | +| REST | 1 | RUNNING | ++--------------+-------------+---------+ +``` ## 2. Status Setting diff --git a/src/UserGuide/latest-Table/User-Manual/Maintenance-commands_timecho.md b/src/UserGuide/latest-Table/User-Manual/Maintenance-commands_timecho.md index 27a0b101a..74ba99728 100644 --- a/src/UserGuide/latest-Table/User-Manual/Maintenance-commands_timecho.md +++ b/src/UserGuide/latest-Table/User-Manual/Maintenance-commands_timecho.md @@ -365,8 +365,37 @@ IoTDB> SHOW AVAILABLE URLS +----------+-------+ | 0.0.0.0| 6667| +----------+-------+ +``` + +### 1.11 View Service Information + +**Description**: Returns service information (MQTT service, REST service) on all active DataNodes (in RUNNING or READ-ONLY state) in the current cluster. + +> Supported since V2.0.8-beta + +#### Syntax: +```sql +showServicesStatement + : SHOW SERVICES + ; +``` + +#### Examples: +```sql +IoTDB> SHOW SERVICES +IoTDB> SHOW SERVICES ON 1 ``` +Execution result: +```sql ++--------------+-------------+---------+ +| Service Name | DataNode ID | State | ++--------------+-------------+---------+ +| MQTT | 1 | STOPPED | +| REST | 1 | RUNNING | ++--------------+-------------+---------+ +``` + ## 2. Status Setting diff --git a/src/UserGuide/latest/User-Manual/Maintenance-commands.md b/src/UserGuide/latest/User-Manual/Maintenance-commands.md index e72ce52fe..1ed8b8521 100644 --- a/src/UserGuide/latest/User-Manual/Maintenance-commands.md +++ b/src/UserGuide/latest/User-Manual/Maintenance-commands.md @@ -273,6 +273,35 @@ IoTDB> SHOW AVAILABLE URLS +----------+-------+ ``` +### 1.8 View Service Information + +**Description**: Returns service information (MQTT service, REST service) on all active DataNodes (in RUNNING or READ-ONLY state) in the current cluster. + +> This feature is supported starting from v2.0.8-beta. + +#### Syntax: +```sql +showServicesStatement + : SHOW SERVICES + ; +``` + +#### Examples: +```sql +IoTDB> SHOW SERVICES +IoTDB> SHOW SERVICES ON 1 +``` + +Execution result: +```sql ++--------------+-------------+---------+ +| Service Name | DataNode ID | State | ++--------------+-------------+---------+ +| MQTT | 1 | STOPPED | +| REST | 1 | RUNNING | ++--------------+-------------+---------+ +``` + ## 2. Status Setting diff --git a/src/zh/UserGuide/Master/Table/Reference/System-Tables_apache.md b/src/zh/UserGuide/Master/Table/Reference/System-Tables_apache.md index 418b08f66..4fd2ccdcd 100644 --- a/src/zh/UserGuide/Master/Table/Reference/System-Tables_apache.md +++ b/src/zh/UserGuide/Master/Table/Reference/System-Tables_apache.md @@ -57,6 +57,7 @@ IoTDB> show tables from information_schema | queries| INF| |queries_costs_histogram| INF| | regions| INF| +| services| INF| | subscriptions| INF| | tables| INF| | topics| INF| @@ -66,7 +67,7 @@ IoTDB> show tables from information_schema ## 2. 系统表 -* 名称:`DATABASES`, `TABLES`, `REGIONS`, `QUERIES`, `COLUMNS`, `PIPES`, `PIPE_PLUGINS`, `SUBSCRIPTION`, `TOPICS`, `VIEWS`, `MODELS`, `FUNCTIONS`, `CONFIGURATIONS`, `KEYWORDS`, `NODES`, `CONFIG_NODES`, `DATA_NODES`, `CONNECTIONS`, `CURRENT_QUERIES`, `QUERIES_COSTS_HISTOGRAM`(详细介绍见后面小节) +* 名称:`DATABASES`, `TABLES`, `REGIONS`, `QUERIES`, `COLUMNS`, `PIPES`, `PIPE_PLUGINS`, `SUBSCRIPTION`, `TOPICS`, `VIEWS`, `MODELS`, `FUNCTIONS`, `CONFIGURATIONS`, `KEYWORDS`, `NODES`, `CONFIG_NODES`, `DATA_NODES`, `CONNECTIONS`, `CURRENT_QUERIES`, `QUERIES_COSTS_HISTOGRAM`、`SERVICES`(详细介绍见后面小节) * 操作:只读,只支持`SELECT`, `COUNT/SHOW DEVICES`, `DESC`,不支持对于表结构 / 内容的任意修改,如果修改将会报错:`"The database 'information_schema' can only be queried"` * 列名:系统表的列名均默认为小写,且用`_`分隔 @@ -369,7 +370,7 @@ IoTDB> select * from information_schema.views ### 2.11 MODELS 表 -> 该系统表从 V 2.0.5 版本开始提供,从V 2.0.8 版本开始不再提供 +> 该系统表从 V 2.0.5 版本开始提供,从V 2.0.8-beta 版本开始不再提供 * 包含数据库内所有的模型信息 * 表结构如下表所示: @@ -589,7 +590,7 @@ IoTDB> select * from information_schema.data_nodes ### 2.18 CONNECTIONS 表 -> 该系统表从 V 2.0.8 版本开始提供 +> 该系统表从 V 2.0.8-beta 版本开始提供 * 包含集群中所有连接。 * 表结构如下表所示: @@ -616,7 +617,7 @@ IoTDB> select * from information_schema.connections; ### 2.19 CURRENT\_QUERIES 表 -> 该系统表从 V 2.0.8 版本开始提供 +> 该系统表从 V 2.0.8-beta 版本开始提供 * 包含所有执行结束时间在 `[now() - query_cost_stat_window, now())` 范围内的所有查询,也包括当前正在执行的查询。其中`query_cost_stat_window `代表查询耗时统计的窗口,默认值为 0 ,可通过配置文件`iotdb-system.properties`进行配置。 * 表结构如下表所示: @@ -647,7 +648,7 @@ IoTDB> select * from information_schema.current_queries; ### 2.20 QUERIES\_COSTS\_HISTOGRAM 表 -> 该系统表从 V 2.0.8 版本开始提供 +> 该系统表从 V 2.0.8-beta 版本开始提供 * 包含过去 `query_cost_stat_window` 时间内的查询耗时的直方图(仅统计已经执行结束的 SQL),其中`query_cost_stat_window `代表查询耗时统计的窗口,默认值为 0 ,可通过配置文件`iotdb-system.properties`进行配置。 * 表结构如下表所示: @@ -679,6 +680,32 @@ IoTDB> select * from information_schema.queries_costs_histogram limit 10 +------+----+-----------+ ``` +### 2.21 SERVICES 表 + +> 该系统表从 V 2.0.8-beta 版本开始提供 + +* 可展示所有正常工作(RUNNING 或 READ-ONLY) DN 上的服务(MQTT 服务、REST 服务)。 +* 表结构如下表所示: + +| 列名 | 数据类型 | 列类型 | 说明 | +| --------------- | ---------- | ----------- | ------------------------------ | +| service\_name | STRING | TAG | 服务名称 | +| datanode\_id | INT32 | ATTRIBUTE | 所在 DataNode 的 ID | +| state | STRING | ATTRIBUTE | 服务状态: RUNNING / STOPPED | + +* 查询示例: + +```SQL +IoTDB> select * from information_schema.services ++------------+-----------+-------+ +|service_name|datanode_id| state| ++------------+-----------+-------+ +| MQTT| 1|STOPPED| +| REST| 1|RUNNING| ++------------+-----------+-------+ +``` + + ## 3. 权限说明 * 不支持通过`GRANT/REVOKE`语句对 `information_schema` 数据库及其下任何表进行权限操作 diff --git a/src/zh/UserGuide/Master/Table/Reference/System-Tables_timecho.md b/src/zh/UserGuide/Master/Table/Reference/System-Tables_timecho.md index e13fa2c59..ba0b3aa96 100644 --- a/src/zh/UserGuide/Master/Table/Reference/System-Tables_timecho.md +++ b/src/zh/UserGuide/Master/Table/Reference/System-Tables_timecho.md @@ -57,6 +57,7 @@ IoTDB> show tables from information_schema | queries| INF| |queries_costs_histogram| INF| | regions| INF| +| services| INF| | subscriptions| INF| | tables| INF| | topics| INF| @@ -66,7 +67,7 @@ IoTDB> show tables from information_schema ## 2. 系统表 -* 名称:`DATABASES`, `TABLES`, `REGIONS`, `QUERIES`, `COLUMNS`, `PIPES`, `PIPE_PLUGINS`, `SUBSCRIPTION`, `TOPICS`, `VIEWS`, `MODELS`, `FUNCTIONS`, `CONFIGURATIONS`, `KEYWORDS`, `NODES`, `CONFIG_NODES`, `DATA_NODES`, `CONNECTIONS`, `CURRENT_QUERIES`, `QUERIES_COSTS_HISTOGRAM`(详细介绍见后面小节) +* 名称:`DATABASES`, `TABLES`, `REGIONS`, `QUERIES`, `COLUMNS`, `PIPES`, `PIPE_PLUGINS`, `SUBSCRIPTION`, `TOPICS`, `VIEWS`, `MODELS`, `FUNCTIONS`, `CONFIGURATIONS`, `KEYWORDS`, `NODES`, `CONFIG_NODES`, `DATA_NODES`, `CONNECTIONS`, `CURRENT_QUERIES`, `QUERIES_COSTS_HISTOGRAM`、`SERVICES`(详细介绍见后面小节) * 操作:只读,只支持`SELECT`, `COUNT/SHOW DEVICES`, `DESC`,不支持对于表结构 / 内容的任意修改,如果修改将会报错:`"The database 'information_schema' can only be queried"` * 列名:系统表的列名均默认为小写,且用`_`分隔 @@ -369,7 +370,7 @@ IoTDB> select * from information_schema.views ### 2.11 MODELS 表 -> 该系统表从 V 2.0.5 版本开始提供,从V 2.0.8 版本开始不再提供 +> 该系统表从 V 2.0.5 版本开始提供,从V 2.0.8-beta 版本开始不再提供 * 包含数据库内所有的模型信息 * 表结构如下表所示: @@ -589,7 +590,7 @@ IoTDB> select * from information_schema.data_nodes ### 2.18 CONNECTIONS 表 -> 该系统表从 V 2.0.8 版本开始提供 +> 该系统表从 V 2.0.8-beta 版本开始提供 * 包含集群中所有连接。 * 表结构如下表所示: @@ -616,7 +617,7 @@ IoTDB> select * from information_schema.connections; ### 2.19 CURRENT\_QUERIES 表 -> 该系统表从 V 2.0.8 版本开始提供 +> 该系统表从 V 2.0.8-beta 版本开始提供 * 包含所有执行结束时间在 `[now() - query_cost_stat_window, now())` 范围内的所有查询,也包括当前正在执行的查询。其中`query_cost_stat_window `代表查询耗时统计的窗口,默认值为 0 ,可通过配置文件`iotdb-system.properties`进行配置。 * 表结构如下表所示: @@ -647,7 +648,7 @@ IoTDB> select * from information_schema.current_queries; ### 2.20 QUERIES\_COSTS\_HISTOGRAM 表 -> 该系统表从 V 2.0.8 版本开始提供 +> 该系统表从 V 2.0.8-beta 版本开始提供 * 包含过去 `query_cost_stat_window` 时间内的查询耗时的直方图(仅统计已经执行结束的 SQL),其中`query_cost_stat_window `代表查询耗时统计的窗口,默认值为 0 ,可通过配置文件`iotdb-system.properties`进行配置。 * 表结构如下表所示: @@ -679,6 +680,31 @@ IoTDB> select * from information_schema.queries_costs_histogram limit 10 +------+----+-----------+ ``` +### 2.21 SERVICES 表 + +> 该系统表从 V 2.0.8-beta 版本开始提供 + +* 可展示所有正常工作(RUNNING 或 READ-ONLY) DN 上的服务(MQTT 服务、REST 服务)。 +* 表结构如下表所示: + +| 列名 | 数据类型 | 列类型 | 说明 | +| --------------- | ---------- | ----------- | ------------------------------ | +| service\_name | STRING | TAG | 服务名称 | +| datanode\_id | INT32 | ATTRIBUTE | 所在 DataNode 的 ID | +| state | STRING | ATTRIBUTE | 服务状态: RUNNING / STOPPED | + +* 查询示例: + +```SQL +IoTDB> select * from information_schema.services ++------------+-----------+-------+ +|service_name|datanode_id| state| ++------------+-----------+-------+ +| MQTT| 1|STOPPED| +| REST| 1|RUNNING| ++------------+-----------+-------+ +``` + ## 3. 权限说明 diff --git a/src/zh/UserGuide/Master/Table/User-Manual/Maintenance-statement_apache.md b/src/zh/UserGuide/Master/Table/User-Manual/Maintenance-statement_apache.md index 8c74bea38..bcb9f7336 100644 --- a/src/zh/UserGuide/Master/Table/User-Manual/Maintenance-statement_apache.md +++ b/src/zh/UserGuide/Master/Table/User-Manual/Maintenance-statement_apache.md @@ -340,7 +340,7 @@ IoTDB> SHOW REGIONS **含义**:返回当前集群所有可用的 DataNode 的 RPC 地址和端口。注意:这里对于“可用”的定义为:处于非 REMOVING 状态的 DN 节点。 -> V2.0.8 起支持该功能 +> V2.0.8-beta 起支持该功能 #### 语法: @@ -366,6 +366,37 @@ IoTDB> SHOW AVAILABLE URLS +----------+-------+ ``` +### 1.11 查看服务信息 + +**含义**:返回当前集群所有正常工作(RUNNING 或 READ-ONLY) DN 上的服务信息(MQTT 服务、REST 服务)。 + +> V2.0.8-beta 起支持该功能 + +#### 语法: + +```SQL +showServicesStatement + : SHOW SERVICES + ; +``` + +#### 示例: + +```SQL +IoTDB> SHOW SERVICES +IoTDB> SHOW SERVICES ON 1 +``` + +执行结果如下: + +```SQL ++------------+-----------+-------+ +|service_name|datanode_id| state| ++------------+-----------+-------+ +| MQTT| 1|STOPPED| +| REST| 1|RUNNING| ++------------+-----------+-------+ +``` ## 2. 状态设置 diff --git a/src/zh/UserGuide/Master/Table/User-Manual/Maintenance-statement_timecho.md b/src/zh/UserGuide/Master/Table/User-Manual/Maintenance-statement_timecho.md index aadcb8b29..c955ea4a9 100644 --- a/src/zh/UserGuide/Master/Table/User-Manual/Maintenance-statement_timecho.md +++ b/src/zh/UserGuide/Master/Table/User-Manual/Maintenance-statement_timecho.md @@ -340,7 +340,7 @@ IoTDB> SHOW REGIONS **含义**:返回当前集群所有可用的 DataNode 的 RPC 地址和端口。注意:这里对于“可用”的定义为:处于非 REMOVING 状态的 DN 节点。 -> V2.0.8 起支持该功能 +> V2.0.8-beta 起支持该功能 #### 语法: @@ -365,6 +365,37 @@ IoTDB> SHOW AVAILABLE URLS | 0.0.0.0| 6667| +----------+-------+ ``` +### 1.11 查看服务信息 + +**含义**:返回当前集群所有正常工作(RUNNING 或 READ-ONLY) DN 上的服务信息(MQTT 服务、REST 服务)。 + +> V2.0.8-beta 起支持该功能 + +#### 语法: + +```SQL +showServicesStatement + : SHOW SERVICES + ; +``` + +#### 示例: + +```SQL +IoTDB> SHOW SERVICES +IoTDB> SHOW SERVICES ON 1 +``` + +执行结果如下: + +```SQL ++------------+-----------+-------+ +|service_name|datanode_id| state| ++------------+-----------+-------+ +| MQTT| 1|STOPPED| +| REST| 1|RUNNING| ++------------+-----------+-------+ +``` ## 2. 状态设置 diff --git a/src/zh/UserGuide/Master/Tree/User-Manual/Maintenance-statement.md b/src/zh/UserGuide/Master/Tree/User-Manual/Maintenance-statement.md index 93259a49a..8728f5092 100644 --- a/src/zh/UserGuide/Master/Tree/User-Manual/Maintenance-statement.md +++ b/src/zh/UserGuide/Master/Tree/User-Manual/Maintenance-statement.md @@ -248,7 +248,7 @@ IoTDB> SHOW REGIONS **含义**:返回当前集群所有可用的 DataNode 的 RPC 地址和端口。注意:这里对于“可用”的定义为:处于非 REMOVING 状态的 DN 节点。 -> V2.0.8 起支持该功能 +> V2.0.8-beta 起支持该功能 #### 语法: @@ -274,6 +274,38 @@ IoTDB> SHOW AVAILABLE URLS +----------+-------+ ``` +### 1.8 查看服务信息 + +**含义**:返回当前集群所有正常工作(RUNNING 或 READ-ONLY) DN 上的服务信息(MQTT 服务、REST 服务)。 + +> V2.0.8-beta 起支持该功能 + +#### 语法: + +```SQL +showServicesStatement + : SHOW SERVICES + ; +``` + +#### 示例: + +```SQL +IoTDB> SHOW SERVICES +IoTDB> SHOW SERVICES ON 1 +``` + +执行结果如下: + +```SQL ++------------+-----------+-------+ +|service_name|datanode_id| state| ++------------+-----------+-------+ +| MQTT| 1|STOPPED| +| REST| 1|RUNNING| ++------------+-----------+-------+ +``` + ## 2. 状态设置 diff --git a/src/zh/UserGuide/latest-Table/Reference/System-Tables_apache.md b/src/zh/UserGuide/latest-Table/Reference/System-Tables_apache.md index 0b8f5de6b..4fd2ccdcd 100644 --- a/src/zh/UserGuide/latest-Table/Reference/System-Tables_apache.md +++ b/src/zh/UserGuide/latest-Table/Reference/System-Tables_apache.md @@ -57,6 +57,7 @@ IoTDB> show tables from information_schema | queries| INF| |queries_costs_histogram| INF| | regions| INF| +| services| INF| | subscriptions| INF| | tables| INF| | topics| INF| @@ -66,7 +67,7 @@ IoTDB> show tables from information_schema ## 2. 系统表 -* 名称:`DATABASES`, `TABLES`, `REGIONS`, `QUERIES`, `COLUMNS`, `PIPES`, `PIPE_PLUGINS`, `SUBSCRIPTION`, `TOPICS`, `VIEWS`, `MODELS`, `FUNCTIONS`, `CONFIGURATIONS`, `KEYWORDS`, `NODES`, `CONFIG_NODES`, `DATA_NODES`, `CONNECTIONS`, `CURRENT_QUERIES`, `QUERIES_COSTS_HISTOGRAM`(详细介绍见后面小节) +* 名称:`DATABASES`, `TABLES`, `REGIONS`, `QUERIES`, `COLUMNS`, `PIPES`, `PIPE_PLUGINS`, `SUBSCRIPTION`, `TOPICS`, `VIEWS`, `MODELS`, `FUNCTIONS`, `CONFIGURATIONS`, `KEYWORDS`, `NODES`, `CONFIG_NODES`, `DATA_NODES`, `CONNECTIONS`, `CURRENT_QUERIES`, `QUERIES_COSTS_HISTOGRAM`、`SERVICES`(详细介绍见后面小节) * 操作:只读,只支持`SELECT`, `COUNT/SHOW DEVICES`, `DESC`,不支持对于表结构 / 内容的任意修改,如果修改将会报错:`"The database 'information_schema' can only be queried"` * 列名:系统表的列名均默认为小写,且用`_`分隔 @@ -679,6 +680,32 @@ IoTDB> select * from information_schema.queries_costs_histogram limit 10 +------+----+-----------+ ``` +### 2.21 SERVICES 表 + +> 该系统表从 V 2.0.8-beta 版本开始提供 + +* 可展示所有正常工作(RUNNING 或 READ-ONLY) DN 上的服务(MQTT 服务、REST 服务)。 +* 表结构如下表所示: + +| 列名 | 数据类型 | 列类型 | 说明 | +| --------------- | ---------- | ----------- | ------------------------------ | +| service\_name | STRING | TAG | 服务名称 | +| datanode\_id | INT32 | ATTRIBUTE | 所在 DataNode 的 ID | +| state | STRING | ATTRIBUTE | 服务状态: RUNNING / STOPPED | + +* 查询示例: + +```SQL +IoTDB> select * from information_schema.services ++------------+-----------+-------+ +|service_name|datanode_id| state| ++------------+-----------+-------+ +| MQTT| 1|STOPPED| +| REST| 1|RUNNING| ++------------+-----------+-------+ +``` + + ## 3. 权限说明 * 不支持通过`GRANT/REVOKE`语句对 `information_schema` 数据库及其下任何表进行权限操作 diff --git a/src/zh/UserGuide/latest-Table/Reference/System-Tables_timecho.md b/src/zh/UserGuide/latest-Table/Reference/System-Tables_timecho.md index 45b71a510..ba0b3aa96 100644 --- a/src/zh/UserGuide/latest-Table/Reference/System-Tables_timecho.md +++ b/src/zh/UserGuide/latest-Table/Reference/System-Tables_timecho.md @@ -57,6 +57,7 @@ IoTDB> show tables from information_schema | queries| INF| |queries_costs_histogram| INF| | regions| INF| +| services| INF| | subscriptions| INF| | tables| INF| | topics| INF| @@ -66,7 +67,7 @@ IoTDB> show tables from information_schema ## 2. 系统表 -* 名称:`DATABASES`, `TABLES`, `REGIONS`, `QUERIES`, `COLUMNS`, `PIPES`, `PIPE_PLUGINS`, `SUBSCRIPTION`, `TOPICS`, `VIEWS`, `MODELS`, `FUNCTIONS`, `CONFIGURATIONS`, `KEYWORDS`, `NODES`, `CONFIG_NODES`, `DATA_NODES`, `CONNECTIONS`, `CURRENT_QUERIES`, `QUERIES_COSTS_HISTOGRAM`(详细介绍见后面小节) +* 名称:`DATABASES`, `TABLES`, `REGIONS`, `QUERIES`, `COLUMNS`, `PIPES`, `PIPE_PLUGINS`, `SUBSCRIPTION`, `TOPICS`, `VIEWS`, `MODELS`, `FUNCTIONS`, `CONFIGURATIONS`, `KEYWORDS`, `NODES`, `CONFIG_NODES`, `DATA_NODES`, `CONNECTIONS`, `CURRENT_QUERIES`, `QUERIES_COSTS_HISTOGRAM`、`SERVICES`(详细介绍见后面小节) * 操作:只读,只支持`SELECT`, `COUNT/SHOW DEVICES`, `DESC`,不支持对于表结构 / 内容的任意修改,如果修改将会报错:`"The database 'information_schema' can only be queried"` * 列名:系统表的列名均默认为小写,且用`_`分隔 @@ -679,6 +680,31 @@ IoTDB> select * from information_schema.queries_costs_histogram limit 10 +------+----+-----------+ ``` +### 2.21 SERVICES 表 + +> 该系统表从 V 2.0.8-beta 版本开始提供 + +* 可展示所有正常工作(RUNNING 或 READ-ONLY) DN 上的服务(MQTT 服务、REST 服务)。 +* 表结构如下表所示: + +| 列名 | 数据类型 | 列类型 | 说明 | +| --------------- | ---------- | ----------- | ------------------------------ | +| service\_name | STRING | TAG | 服务名称 | +| datanode\_id | INT32 | ATTRIBUTE | 所在 DataNode 的 ID | +| state | STRING | ATTRIBUTE | 服务状态: RUNNING / STOPPED | + +* 查询示例: + +```SQL +IoTDB> select * from information_schema.services ++------------+-----------+-------+ +|service_name|datanode_id| state| ++------------+-----------+-------+ +| MQTT| 1|STOPPED| +| REST| 1|RUNNING| ++------------+-----------+-------+ +``` + ## 3. 权限说明 diff --git a/src/zh/UserGuide/latest-Table/User-Manual/Maintenance-statement_apache.md b/src/zh/UserGuide/latest-Table/User-Manual/Maintenance-statement_apache.md index 15da30a0c..bcb9f7336 100644 --- a/src/zh/UserGuide/latest-Table/User-Manual/Maintenance-statement_apache.md +++ b/src/zh/UserGuide/latest-Table/User-Manual/Maintenance-statement_apache.md @@ -366,6 +366,37 @@ IoTDB> SHOW AVAILABLE URLS +----------+-------+ ``` +### 1.11 查看服务信息 + +**含义**:返回当前集群所有正常工作(RUNNING 或 READ-ONLY) DN 上的服务信息(MQTT 服务、REST 服务)。 + +> V2.0.8-beta 起支持该功能 + +#### 语法: + +```SQL +showServicesStatement + : SHOW SERVICES + ; +``` + +#### 示例: + +```SQL +IoTDB> SHOW SERVICES +IoTDB> SHOW SERVICES ON 1 +``` + +执行结果如下: + +```SQL ++------------+-----------+-------+ +|service_name|datanode_id| state| ++------------+-----------+-------+ +| MQTT| 1|STOPPED| +| REST| 1|RUNNING| ++------------+-----------+-------+ +``` ## 2. 状态设置 diff --git a/src/zh/UserGuide/latest-Table/User-Manual/Maintenance-statement_timecho.md b/src/zh/UserGuide/latest-Table/User-Manual/Maintenance-statement_timecho.md index 41eda769e..c955ea4a9 100644 --- a/src/zh/UserGuide/latest-Table/User-Manual/Maintenance-statement_timecho.md +++ b/src/zh/UserGuide/latest-Table/User-Manual/Maintenance-statement_timecho.md @@ -365,6 +365,37 @@ IoTDB> SHOW AVAILABLE URLS | 0.0.0.0| 6667| +----------+-------+ ``` +### 1.11 查看服务信息 + +**含义**:返回当前集群所有正常工作(RUNNING 或 READ-ONLY) DN 上的服务信息(MQTT 服务、REST 服务)。 + +> V2.0.8-beta 起支持该功能 + +#### 语法: + +```SQL +showServicesStatement + : SHOW SERVICES + ; +``` + +#### 示例: + +```SQL +IoTDB> SHOW SERVICES +IoTDB> SHOW SERVICES ON 1 +``` + +执行结果如下: + +```SQL ++------------+-----------+-------+ +|service_name|datanode_id| state| ++------------+-----------+-------+ +| MQTT| 1|STOPPED| +| REST| 1|RUNNING| ++------------+-----------+-------+ +``` ## 2. 状态设置 diff --git a/src/zh/UserGuide/latest/User-Manual/Maintenance-statement.md b/src/zh/UserGuide/latest/User-Manual/Maintenance-statement.md index 45b37b014..8728f5092 100644 --- a/src/zh/UserGuide/latest/User-Manual/Maintenance-statement.md +++ b/src/zh/UserGuide/latest/User-Manual/Maintenance-statement.md @@ -274,6 +274,38 @@ IoTDB> SHOW AVAILABLE URLS +----------+-------+ ``` +### 1.8 查看服务信息 + +**含义**:返回当前集群所有正常工作(RUNNING 或 READ-ONLY) DN 上的服务信息(MQTT 服务、REST 服务)。 + +> V2.0.8-beta 起支持该功能 + +#### 语法: + +```SQL +showServicesStatement + : SHOW SERVICES + ; +``` + +#### 示例: + +```SQL +IoTDB> SHOW SERVICES +IoTDB> SHOW SERVICES ON 1 +``` + +执行结果如下: + +```SQL ++------------+-----------+-------+ +|service_name|datanode_id| state| ++------------+-----------+-------+ +| MQTT| 1|STOPPED| +| REST| 1|RUNNING| ++------------+-----------+-------+ +``` + ## 2. 状态设置