Skip to content

Commit d6b38ee

Browse files
authored
add show activation to maintenance statement (#1080)
1 parent b978bb4 commit d6b38ee

18 files changed

Lines changed: 529 additions & 156 deletions

File tree

src/.vuepress/sidebar_timecho/V1.3.x/en.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ export const enSidebar = {
169169
children: [
170170
{ text: 'Query Performance Analysis', link: 'Query-Performance-Analysis' },
171171
{ text: 'Load Balance', link: 'Load-Balance' },
172-
{ text: 'Maintenance statement', link: 'Maintenance-commands_timecho' },
172+
{ text: 'Maintenance statement', link: 'Maintenance-commands' },
173173
],
174174
},
175175
],

src/.vuepress/sidebar_timecho/V1.3.x/zh.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ export const zhSidebar = {
151151
children: [
152152
{ text: '查询性能分析', link: 'Query-Performance-Analysis' },
153153
{ text: '负载均衡', link: 'Load-Balance' },
154-
{ text: '运维语句', link: 'Maintenance-statement_timecho' },
154+
{ text: '运维语句', link: 'Maintenance-statement' },
155155
],
156156
},
157157
],

src/UserGuide/Master/Table/SQL-Manual/SQL-Maintenance-Statements_timecho.md

Lines changed: 60 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,66 @@ IoTDB> SHOW AVAILABLE URLS
255255
+----------+-------+
256256
```
257257

258+
### 1.10 View Service Information
259+
260+
> Supported since V2.0.8.2
261+
262+
**Syntax**:
263+
264+
```sql
265+
showServicesStatement
266+
: SHOW SERVICES <ON dataNodeId>
267+
;
268+
```
269+
270+
**Example**:
271+
272+
```sql
273+
IoTDB> SHOW SERVICES
274+
IoTDB> SHOW SERVICES ON 1
275+
```
276+
277+
**Result**:
278+
279+
```sql
280+
+--------------+-------------+---------+
281+
| Service Name | DataNode ID | State |
282+
+--------------+-------------+---------+
283+
| MQTT | 1 | STOPPED |
284+
| REST | 1 | RUNNING |
285+
+--------------+-------------+---------+
286+
```
287+
288+
### 1.11 View Cluster Activation Status
289+
290+
**Syntax**:
291+
292+
```SQL
293+
showActivationStatement
294+
: SHOW ACTIVATION
295+
;
296+
```
297+
298+
**Example**:
299+
300+
```SQL
301+
IoTDB> SHOW ACTIVATION
302+
```
303+
304+
**Result**:
305+
306+
```SQL
307+
+---------------+---------+-----------------------------+
308+
| LicenseInfo| Usage| Limit|
309+
+---------------+---------+-----------------------------+
310+
| Status|ACTIVATED| -|
311+
| ExpiredTime| -|2026-04-30T00:00:00.000+08:00|
312+
| DataNodeLimit| 1| Unlimited|
313+
| CpuLimit| 16| Unlimited|
314+
| DeviceLimit| 30| Unlimited|
315+
|TimeSeriesLimit| 72| 1,000,000,000|
316+
+---------------+---------+-----------------------------+
317+
```
258318

259319
## 2. Status Configuration
260320

@@ -373,32 +433,6 @@ localOrClusterMode
373433
IoTDB> FLUSH test_db TRUE ON LOCAL;
374434
```
375435

376-
### 3.2 Clear DataNode Cache
377-
378-
**Syntax:**
379-
380-
```SQL
381-
clearCacheStatement
382-
: CLEAR clearCacheOptions? CACHE localOrClusterMode?
383-
;
384-
385-
clearCacheOptions
386-
: ATTRIBUTE
387-
| QUERY
388-
| ALL
389-
;
390-
391-
localOrClusterMode
392-
: (ON (LOCAL | CLUSTER))
393-
;
394-
```
395-
396-
**Example:**
397-
398-
```SQL
399-
IoTDB> CLEAR ALL CACHE ON LOCAL;
400-
```
401-
402436
## 4. Data Repair
403437

404438
### 4.1 Start Background TsFile Repair

src/UserGuide/Master/Table/User-Manual/Maintenance-commands_timecho.md

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,12 +396,46 @@ Execution result:
396396
+--------------+-------------+---------+
397397
```
398398

399+
### 1.12 View Cluster Activation Status
400+
401+
**Description**:Returns the activation status of the current cluster.
402+
403+
#### Syntax:
404+
405+
```SQL
406+
showActivationStatement
407+
: SHOW ACTIVATION
408+
;
409+
```
410+
411+
#### Examples:
412+
413+
```SQL
414+
IoTDB> SHOW ACTIVATION
415+
```
416+
417+
Execution result:
418+
419+
```SQL
420+
+---------------+---------+-----------------------------+
421+
| LicenseInfo| Usage| Limit|
422+
+---------------+---------+-----------------------------+
423+
| Status|ACTIVATED| -|
424+
| ExpiredTime| -|2026-04-30T00:00:00.000+08:00|
425+
| DataNodeLimit| 1| Unlimited|
426+
| CpuLimit| 16| Unlimited|
427+
| DeviceLimit| 30| Unlimited|
428+
|TimeSeriesLimit| 72| 1,000,000,000|
429+
+---------------+---------+-----------------------------+
430+
```
431+
399432
### 1.13 View Node Configuration
433+
400434
**Description**: By default, returns the effective configuration items from the configuration file of the specified node (identified by `node_id`). If `node_id` is not specified, returns the configuration of the directly connected DataNode.
401435
Adding the `all` parameter returns all configuration items (the `value` of unconfigured items is `null`).
402436
Adding the `with desc` parameter returns configuration items with descriptions.
403437

404-
> Supported since version 2.0.9
438+
> Supported since version 2.0.9.1
405439
406440
#### Syntax:
407441
```SQL
@@ -419,6 +453,7 @@ showConfigurationStatement
419453
| description | string | Configuration description (optional) |
420454

421455
#### Examples:
456+
422457
1. View configuration of the directly connected DataNode
423458
```SQL
424459
SHOW CONFIGURATION;

src/UserGuide/Master/Tree/SQL-Manual/SQL-Manual_timecho.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@ select * into ::(backup_${4}) from root.sg.** align by device;
842842
select s1, s2 into root.sg_copy.d1(t1, t2), aligned root.sg_copy.d2(t1, t2) from root.sg.d1, root.sg.d2 align by device;
843843
```
844844

845-
## 7. Maintennance
845+
## 7. Maintenance
846846
Generate the corresponding query plan:
847847
```sql
848848
explain select s1,s2 from root.sg.d1;
@@ -851,6 +851,9 @@ Execute the corresponding SQL, analyze the execution and output:
851851
```sql
852852
explain analyze select s1,s2 from root.sg.d1 order by s1;
853853
```
854+
855+
For more Maintenance commands, please refer to[Maintenance commands](../User-Manual/Maintenance-commands_timecho.md)
856+
854857
## 8. OPERATOR
855858

856859
For more details, see document [Operator-and-Expression](./Operator-and-Expression.md).

src/UserGuide/Master/Tree/User-Manual/Maintenance-commands_timecho.md

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,12 +302,46 @@ Execution result:
302302
+--------------+-------------+---------+
303303
```
304304

305-
### 1.9 View Disk Space Usage
305+
### 1.9 View Cluster Activation Status
306+
307+
**Description**:Returns the activation status of the current cluster.
308+
309+
#### Syntax:
310+
311+
```SQL
312+
showActivationStatement
313+
: SHOW ACTIVATION
314+
;
315+
```
316+
317+
#### Examples:
318+
319+
```SQL
320+
IoTDB> SHOW ACTIVATION
321+
```
322+
323+
Execution result:
324+
325+
```SQL
326+
+---------------+---------+-----------------------------+
327+
| LicenseInfo| Usage| Limit|
328+
+---------------+---------+-----------------------------+
329+
| Status|ACTIVATED| -|
330+
| ExpiredTime| -|2026-04-30T00:00:00.000+08:00|
331+
| DataNodeLimit| 1| Unlimited|
332+
| CpuLimit| 16| Unlimited|
333+
| DeviceLimit| 30| Unlimited|
334+
|TimeSeriesLimit| 72| 1,000,000,000|
335+
+---------------+---------+-----------------------------+
336+
```
337+
338+
### 1.10 View Disk Space Usage
339+
306340
**Description**: Returns the disk space usage of the specified `pattern`, including the size of ChunkGroups and the size of Metadata.
307341

308342
**Note**: Statistics are based on the actual size of data in TsFiles; therefore, deletions made via `mods` are not considered.
309343

310-
> Supported since version 2.0.9
344+
> Supported since version 2.0.9.1
311345
312346
#### Syntax:
313347
```sql
@@ -325,6 +359,7 @@ pathPattern
325359
**Explanation**: The `pattern` is used to match devices, must start with `ROOT`, and intermediate nodes in the path support `*` or `**`.
326360

327361
#### Result Set
362+
328363
| Column Name | Column Type | Description |
329364
|---------------|-------------|----------------------------------|
330365
| Database | string | Database name |

src/UserGuide/latest-Table/SQL-Manual/SQL-Maintenance-Statements_timecho.md

Lines changed: 60 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,66 @@ IoTDB> SHOW AVAILABLE URLS
255255
+----------+-------+
256256
```
257257

258+
### 1.10 View Service Information
259+
260+
> Supported since V2.0.8.2
261+
262+
**Syntax**:
263+
264+
```sql
265+
showServicesStatement
266+
: SHOW SERVICES <ON dataNodeId>
267+
;
268+
```
269+
270+
**Example**:
271+
272+
```sql
273+
IoTDB> SHOW SERVICES
274+
IoTDB> SHOW SERVICES ON 1
275+
```
276+
277+
**Result**:
278+
279+
```sql
280+
+--------------+-------------+---------+
281+
| Service Name | DataNode ID | State |
282+
+--------------+-------------+---------+
283+
| MQTT | 1 | STOPPED |
284+
| REST | 1 | RUNNING |
285+
+--------------+-------------+---------+
286+
```
287+
288+
### 1.11 View Cluster Activation Status
289+
290+
**Syntax**:
291+
292+
```SQL
293+
showActivationStatement
294+
: SHOW ACTIVATION
295+
;
296+
```
297+
298+
**Example**:
299+
300+
```SQL
301+
IoTDB> SHOW ACTIVATION
302+
```
303+
304+
**Result**:
305+
306+
```SQL
307+
+---------------+---------+-----------------------------+
308+
| LicenseInfo| Usage| Limit|
309+
+---------------+---------+-----------------------------+
310+
| Status|ACTIVATED| -|
311+
| ExpiredTime| -|2026-04-30T00:00:00.000+08:00|
312+
| DataNodeLimit| 1| Unlimited|
313+
| CpuLimit| 16| Unlimited|
314+
| DeviceLimit| 30| Unlimited|
315+
|TimeSeriesLimit| 72| 1,000,000,000|
316+
+---------------+---------+-----------------------------+
317+
```
258318

259319
## 2. Status Configuration
260320

@@ -373,32 +433,6 @@ localOrClusterMode
373433
IoTDB> FLUSH test_db TRUE ON LOCAL;
374434
```
375435

376-
### 3.2 Clear DataNode Cache
377-
378-
**Syntax:**
379-
380-
```SQL
381-
clearCacheStatement
382-
: CLEAR clearCacheOptions? CACHE localOrClusterMode?
383-
;
384-
385-
clearCacheOptions
386-
: ATTRIBUTE
387-
| QUERY
388-
| ALL
389-
;
390-
391-
localOrClusterMode
392-
: (ON (LOCAL | CLUSTER))
393-
;
394-
```
395-
396-
**Example:**
397-
398-
```SQL
399-
IoTDB> CLEAR ALL CACHE ON LOCAL;
400-
```
401-
402436
## 4. Data Repair
403437

404438
### 4.1 Start Background TsFile Repair

src/UserGuide/latest-Table/User-Manual/Maintenance-commands_timecho.md

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,12 +396,45 @@ Execution result:
396396
+--------------+-------------+---------+
397397
```
398398

399+
### 1.12 View Cluster Activation Status
400+
401+
**Description**:Returns the activation status of the current cluster.
402+
403+
#### Syntax:
404+
405+
```SQL
406+
showActivationStatement
407+
: SHOW ACTIVATION
408+
;
409+
```
410+
411+
#### Examples:
412+
413+
```SQL
414+
IoTDB> SHOW ACTIVATION
415+
```
416+
417+
Execution result:
418+
419+
```SQL
420+
+---------------+---------+-----------------------------+
421+
| LicenseInfo| Usage| Limit|
422+
+---------------+---------+-----------------------------+
423+
| Status|ACTIVATED| -|
424+
| ExpiredTime| -|2026-04-30T00:00:00.000+08:00|
425+
| DataNodeLimit| 1| Unlimited|
426+
| CpuLimit| 16| Unlimited|
427+
| DeviceLimit| 30| Unlimited|
428+
|TimeSeriesLimit| 72| 1,000,000,000|
429+
+---------------+---------+-----------------------------+
430+
```
431+
399432
### 1.13 View Node Configuration
400433
**Description**: By default, returns the effective configuration items from the configuration file of the specified node (identified by `node_id`). If `node_id` is not specified, returns the configuration of the directly connected DataNode.
401434
Adding the `all` parameter returns all configuration items (the `value` of unconfigured items is `null`).
402435
Adding the `with desc` parameter returns configuration items with descriptions.
403436

404-
> Supported since version 2.0.9
437+
> Supported since version 2.0.9.1
405438
406439
#### Syntax:
407440
```SQL

0 commit comments

Comments
 (0)