diff --git a/src/UserGuide/Master/API/RestServiceV2.md b/src/UserGuide/Master/API/RestServiceV2.md index 24fe76b6..ea7e7653 100644 --- a/src/UserGuide/Master/API/RestServiceV2.md +++ b/src/UserGuide/Master/API/RestServiceV2.md @@ -32,7 +32,7 @@ RESTful services are disabled by default. * User - Find the `conf/iotdb.rest.properties` file under the IoTDB installation directory and set `enable_rest_service` to `true` to enable the module. + Find the `conf/iotdb-datanode.properties` file under the IoTDB installation directory and set `enable_rest_service` to `true` to enable the module. ```properties enable_rest_service=true @@ -523,8 +523,7 @@ curl -H "Content-Type:application/json" -H "Authorization:Basic cm9vdDpyb290" -X "expressions": null, "column_names": [ "devices", - "isAligned", - "Template" + "isAligned" ], "timestamps": null, "values": [ @@ -535,10 +534,6 @@ curl -H "Content-Type:application/json" -H "Authorization:Basic cm9vdDpyb290" -X [ "false", "false" - ], - [ - "t1", - null ] ] } @@ -556,8 +551,7 @@ curl -H "Content-Type:application/json" -H "Authorization:Basic cm9vdDpyb290" -X "column_names": [ "devices", "database", - "isAligned", - "Template" + "isAligned" ], "timestamps": null, "values": [ @@ -572,10 +566,6 @@ curl -H "Content-Type:application/json" -H "Authorization:Basic cm9vdDpyb290" -X [ "false", "false" - ], - [ - "t1", - null ] ] } diff --git a/src/UserGuide/Master/Reference/Keywords.md b/src/UserGuide/Master/Reference/Keywords.md index 01449ffc..c098b3e9 100644 --- a/src/UserGuide/Master/Reference/Keywords.md +++ b/src/UserGuide/Master/Reference/Keywords.md @@ -107,6 +107,7 @@ Common Keywords: - GRANT_USER_PRIVILEGE - GRANT_USER_ROLE - GROUP +- HEAD - HAVING - INDEX - INFO @@ -192,6 +193,7 @@ Common Keywords: - STATEFUL - STOP - SYSTEM +- TAIL - TAGS - TASK - TEMPLATE diff --git a/src/UserGuide/Master/Tools-System/Import-Export-Tool.md b/src/UserGuide/Master/Tools-System/Import-Export-Tool.md index 2c81f85b..ec133b2a 100644 --- a/src/UserGuide/Master/Tools-System/Import-Export-Tool.md +++ b/src/UserGuide/Master/Tools-System/Import-Export-Tool.md @@ -160,7 +160,7 @@ In addition, if you do not use the `-s` and `-q` parameters, after the export sc # Unix/OS X > tools/export-tsfile.sh -h 127.0.0.1 -p 6667 -u root -pw root -td ./ # or -> tools/export-tsfile.sh -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -q "select * from root.**" +> tools/export-tsfile.sh -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -q "select * from root.** align by device" # Or > tools/export-tsfile.sh -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -s ./sql.txt # Or @@ -171,7 +171,7 @@ In addition, if you do not use the `-s` and `-q` parameters, after the export sc # Windows > tools/export-tsfile.bat -h 127.0.0.1 -p 6667 -u root -pw root -td ./ # Or -> tools/export-tsfile.bat -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -q "select * from root.**" +> tools/export-tsfile.bat -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -q "select * from root.** align by device" # Or > tools/export-tsfile.bat -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -s ./sql.txt # Or @@ -232,7 +232,7 @@ More, if you don't use one of `-s` and `-q`, you need to enter some queries afte # Or > tools/export-csv.sh -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -tf yyyy-MM-dd\ HH:mm:ss # or -> tools/export-csv.sh -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -q "select * from root.**" +> tools/export-csv.sh -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -q "select * from root.** align by device" # Or > tools/export-csv.sh -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -s sql.txt # Or @@ -247,7 +247,7 @@ More, if you don't use one of `-s` and `-q`, you need to enter some queries afte # Or > tools/export-csv.bat -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -tf yyyy-MM-dd\ HH:mm:ss # or -> tools/export-csv.bat -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -q "select * from root.**" +> tools/export-csv.bat -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -q "select * from root.** align by device" # Or > tools/export-csv.bat -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -s sql.txt # Or diff --git a/src/UserGuide/Master/User-Manual/Operate-Metadata.md b/src/UserGuide/Master/User-Manual/Operate-Metadata.md index 4adb8e80..15b078c9 100644 --- a/src/UserGuide/Master/User-Manual/Operate-Metadata.md +++ b/src/UserGuide/Master/User-Manual/Operate-Metadata.md @@ -47,8 +47,6 @@ Msg: 300: root.ln has already been created as database. The LayerName of database can only be characters, numbers, underscores. If you want to set it to pure numbers or contain other characters, you need to enclose the database name with backticks (``). -Time series path supports the creation of hierarchical paths containing "*" for paths other than the database level, e.g. root.db.`*`. - Besides, if deploy on Windows system, the LayerName is case-insensitive, which means it's not allowed to create databases `root.ln` and `root.LN` at the same time. ### Show Databases @@ -313,68 +311,68 @@ IoTDB> show all ttl +----------+-------+ ``` -## Schema Template +## Device Template -IoTDB supports the schema template function, enabling different entities of the same type to share metadata, reduce the memory usage of metadata, and simplify the management of numerous entities and measurements. +IoTDB supports the device template function, enabling different entities of the same type to share metadata, reduce the memory usage of metadata, and simplify the management of numerous entities and measurements. -Note: The `schema` keyword in the following statements can be omitted. +Note: The `device` keyword in the following statements can be omitted. -### Create Schema Template +### Create Device Template The SQL syntax for creating a metadata template is as follows: ```sql -CREATE SCHEMA TEMPLATE ALIGNED? '(' [',' ]+ ')' +CREATE DEVICE TEMPLATE ALIGNED? '(' [',' ]+ ')' ``` **Example 1:** Create a template containing two non-aligned timeseires ```shell -IoTDB> create schema template t1 (temperature FLOAT encoding=RLE, status BOOLEAN encoding=PLAIN compression=SNAPPY) +IoTDB> create device template t1 (temperature FLOAT encoding=RLE, status BOOLEAN encoding=PLAIN compression=SNAPPY) ``` **Example 2:** Create a template containing a group of aligned timeseires ```shell -IoTDB> create schema template t2 aligned (lat FLOAT encoding=Gorilla, lon FLOAT encoding=Gorilla) +IoTDB> create device template t2 aligned (lat FLOAT encoding=Gorilla, lon FLOAT encoding=Gorilla) ``` The` lat` and `lon` measurements are aligned. -### Set Schema Template +### Set Device Template -After a schema template is created, it should be set to specific path before creating related timeseries or insert data. +After a device template is created, it should be set to specific path before creating related timeseries or insert data. **It should be ensured that the related database has been set before setting template.** -**It is recommended to set schema template to database path. It is not suggested to set schema template to some path above database** +**It is recommended to set device template to database path. It is not suggested to set device template to some path above database** -**It is forbidden to create timeseries under a path setting schema template. Schema template shall not be set on a prefix path of an existing timeseries.** +**It is forbidden to create timeseries under a path setting s tedeviceplate. Device template shall not be set on a prefix path of an existing timeseries.** -The SQL Statement for setting schema template is as follow: +The SQL Statement for setting device template is as follow: ```shell -IoTDB> set schema template t1 to root.sg1.d1 +IoTDB> set device template t1 to root.sg1.d1 ``` -### Activate Schema Template +### Activate Device Template -After setting the schema template, with the system enabled to auto create schema, you can insert data into the timeseries. For example, suppose there's a database root.sg1 and t1 has been set to root.sg1.d1, then timeseries like root.sg1.d1.temperature and root.sg1.d1.status are available and data points can be inserted. +After setting the device template, with the system enabled to auto create schema, you can insert data into the timeseries. For example, suppose there's a database root.sg1 and t1 has been set to root.sg1.d1, then timeseries like root.sg1.d1.temperature and root.sg1.d1.status are available and data points can be inserted. -**Attention**: Before inserting data or the system not enabled to auto create schema, timeseries defined by the schema template will not be created. You can use the following SQL statement to create the timeseries or activate the schema template, act before inserting data: +**Attention**: Before inserting data or the system not enabled to auto create schema, timeseries defined by the device template will not be created. You can use the following SQL statement to create the timeseries or activate the templdeviceate, act before inserting data: ```shell -IoTDB> create timeseries using schema template on root.sg1.d1 +IoTDB> create timeseries using device template on root.sg1.d1 ``` **Example:** Execute the following statement ```shell -IoTDB> set schema template t1 to root.sg1.d1 -IoTDB> set schema template t2 to root.sg1.d2 -IoTDB> create timeseries using schema template on root.sg1.d1 -IoTDB> create timeseries using schema template on root.sg1.d2 +IoTDB> set device template t1 to root.sg1.d1 +IoTDB> set device template t2 to root.sg1.d2 +IoTDB> create timeseries using device template on root.sg1.d1 +IoTDB> create timeseries using device template on root.sg1.d2 ``` Show the time series: @@ -409,14 +407,14 @@ show devices root.sg1.** +---------------+---------+ ```` -### Show Schema Template +### Show Device Template -- Show all schema templates +- Show all device templates The SQL statement looks like this: ```shell -IoTDB> show schema templates +IoTDB> show device templates ``` The execution result is as follows: @@ -430,12 +428,12 @@ The execution result is as follows: +-------------+ ``` -- Show nodes under in schema template +- Show nodes under in device template The SQL statement looks like this: ```shell -IoTDB> show nodes in schema template t1 +IoTDB> show nodes in device template t1 ``` The execution result is as follows: @@ -449,10 +447,10 @@ The execution result is as follows: +-----------+--------+--------+-----------+ ``` -- Show the path prefix where a schema template is set +- Show the path prefix where a device template is set ```shell -IoTDB> show paths set schema template t1 +IoTDB> show paths set device template t1 ``` The execution result is as follows: @@ -465,10 +463,10 @@ The execution result is as follows: +-----------+ ``` -- Show the path prefix where a schema template is used (i.e. the time series has been created) +- Show the path prefix where a device template is used (i.e. the time series has been created) ```shell -IoTDB> show paths using schema template t1 +IoTDB> show paths using device template t1 ``` The execution result is as follows: @@ -481,65 +479,65 @@ The execution result is as follows: +-----------+ ``` -### Deactivate Schema Template +### Deactivate device Template -To delete a group of timeseries represented by schema template, namely deactivate the schema template, use the following SQL statement: +To delete a group of timeseries represented by device template, namely deactivate the device template, use the following SQL statement: ```shell -IoTDB> delete timeseries of schema template t1 from root.sg1.d1 +IoTDB> delete timeseries of device template t1 from root.sg1.d1 ``` or ```shell -IoTDB> deactivate schema template t1 from root.sg1.d1 +IoTDB> deactivate device template t1 from root.sg1.d1 ``` The deactivation supports batch process. ```shell -IoTDB> delete timeseries of schema template t1 from root.sg1.*, root.sg2.* +IoTDB> delete timeseries of device template t1 from root.sg1.*, root.sg2.* ``` or ```shell -IoTDB> deactivate schema template t1 from root.sg1.*, root.sg2.* +IoTDB> deactivate device template t1 from root.sg1.*, root.sg2.* ``` If the template name is not provided in sql, all template activation on paths matched by given path pattern will be removed. -### Unset Schema Template +### Unset Device Template -The SQL Statement for unsetting schema template is as follow: +The SQL Statement for unsetting device template is as follow: ```shell -IoTDB> unset schema template t1 from root.sg1.d1 +IoTDB> unset device template t1 from root.sg1.d1 ``` -**Attention**: It should be guaranteed that none of the timeseries represented by the target schema template exists, before unset it. It can be achieved by deactivation operation. +**Attention**: It should be guaranteed that none of the timeseries represented by the target device template exists, before unset it. It can be achieved by deactivation operation. -### Drop Schema Template +### Drop Device Template -The SQL Statement for dropping schema template is as follow: +The SQL Statement for dropping device template is as follow: ```shell -IoTDB> drop schema template t1 +IoTDB> drop device template t1 ``` **Attention**: Dropping an already set template is not supported. -### Alter Schema Template +### Alter Device Template -In a scenario where measurements need to be added, you can modify the schema template to add measurements to all devices using the schema template. +In a scenario where measurements need to be added, you can modify the template to add measurements to all devicesdevice using the device template. -The SQL Statement for altering schema template is as follow: +The SQL Statement for altering device template is as follow: ```shell -IoTDB> alter schema template t1 add (speed FLOAT encoding=RLE, FLOAT TEXT encoding=PLAIN compression=SNAPPY) +IoTDB> alter device template t1 add (speed FLOAT encoding=RLE, FLOAT TEXT encoding=PLAIN compression=SNAPPY) ``` -**When executing data insertion to devices with schema template set on related prefix path and there are measurements not present in this schema template, the measurements will be auto added to this schema template.** +**When executing data insertion to devices with device template set on related prefix path and there are measurements not present in this device template, the measurements will be auto added to this device template.** ## Timeseries Management diff --git a/src/UserGuide/V1.2.x/FAQ/Frequently-asked-questions.md b/src/UserGuide/V1.2.x/FAQ/Frequently-asked-questions.md index 804ed0bc..8503ffee 100644 --- a/src/UserGuide/V1.2.x/FAQ/Frequently-asked-questions.md +++ b/src/UserGuide/V1.2.x/FAQ/Frequently-asked-questions.md @@ -238,4 +238,4 @@ not affect normal operations. We will fix this message in the incoming releases. #### 3. How to decrease the memory usage of ConfigNode/DataNode? -- Adjust the MAX_HEAP_SIZE、MAX_DIRECT_MEMORY_SIZE options in conf/confignode-env.sh and conf/datanode-env.sh. +- Adjust the ON_HEAP_MEMORY、OFF_HEAP_MEMORY options in conf/confignode-env.sh and conf/datanode-env.sh. diff --git a/src/UserGuide/V1.2.x/Tools-System/Import-Export-Tool.md b/src/UserGuide/V1.2.x/Tools-System/Import-Export-Tool.md index 627619fd..381aaf9e 100644 --- a/src/UserGuide/V1.2.x/Tools-System/Import-Export-Tool.md +++ b/src/UserGuide/V1.2.x/Tools-System/Import-Export-Tool.md @@ -232,7 +232,7 @@ More, if you don't use one of `-s` and `-q`, you need to enter some queries afte # Or > tools/export-csv.sh -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -tf yyyy-MM-dd\ HH:mm:ss # or -> tools/export-csv.sh -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -q "select * from root.**" +> tools/export-csv.sh -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -q "select * from root.** align by device" # Or > tools/export-csv.sh -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -s sql.txt # Or @@ -247,7 +247,7 @@ More, if you don't use one of `-s` and `-q`, you need to enter some queries afte # Or > tools/export-csv.bat -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -tf yyyy-MM-dd\ HH:mm:ss # or -> tools/export-csv.bat -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -q "select * from root.**" +> tools/export-csv.bat -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -q "select * from root.** align by device" # Or > tools/export-csv.bat -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -s sql.txt # Or diff --git a/src/UserGuide/latest/API/RestServiceV2.md b/src/UserGuide/latest/API/RestServiceV2.md index 900dfe5c..ea7e7653 100644 --- a/src/UserGuide/latest/API/RestServiceV2.md +++ b/src/UserGuide/latest/API/RestServiceV2.md @@ -32,7 +32,7 @@ RESTful services are disabled by default. * User - Find the `conf/iotdb.rest.properties` file under the IoTDB installation directory and set `enable_rest_service` to `true` to enable the module. + Find the `conf/iotdb-datanode.properties` file under the IoTDB installation directory and set `enable_rest_service` to `true` to enable the module. ```properties enable_rest_service=true diff --git a/src/UserGuide/latest/Reference/Keywords.md b/src/UserGuide/latest/Reference/Keywords.md index 01449ffc..c098b3e9 100644 --- a/src/UserGuide/latest/Reference/Keywords.md +++ b/src/UserGuide/latest/Reference/Keywords.md @@ -107,6 +107,7 @@ Common Keywords: - GRANT_USER_PRIVILEGE - GRANT_USER_ROLE - GROUP +- HEAD - HAVING - INDEX - INFO @@ -192,6 +193,7 @@ Common Keywords: - STATEFUL - STOP - SYSTEM +- TAIL - TAGS - TASK - TEMPLATE diff --git a/src/UserGuide/latest/Tools-System/Import-Export-Tool.md b/src/UserGuide/latest/Tools-System/Import-Export-Tool.md index 2c81f85b..ec133b2a 100644 --- a/src/UserGuide/latest/Tools-System/Import-Export-Tool.md +++ b/src/UserGuide/latest/Tools-System/Import-Export-Tool.md @@ -160,7 +160,7 @@ In addition, if you do not use the `-s` and `-q` parameters, after the export sc # Unix/OS X > tools/export-tsfile.sh -h 127.0.0.1 -p 6667 -u root -pw root -td ./ # or -> tools/export-tsfile.sh -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -q "select * from root.**" +> tools/export-tsfile.sh -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -q "select * from root.** align by device" # Or > tools/export-tsfile.sh -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -s ./sql.txt # Or @@ -171,7 +171,7 @@ In addition, if you do not use the `-s` and `-q` parameters, after the export sc # Windows > tools/export-tsfile.bat -h 127.0.0.1 -p 6667 -u root -pw root -td ./ # Or -> tools/export-tsfile.bat -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -q "select * from root.**" +> tools/export-tsfile.bat -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -q "select * from root.** align by device" # Or > tools/export-tsfile.bat -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -s ./sql.txt # Or @@ -232,7 +232,7 @@ More, if you don't use one of `-s` and `-q`, you need to enter some queries afte # Or > tools/export-csv.sh -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -tf yyyy-MM-dd\ HH:mm:ss # or -> tools/export-csv.sh -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -q "select * from root.**" +> tools/export-csv.sh -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -q "select * from root.** align by device" # Or > tools/export-csv.sh -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -s sql.txt # Or @@ -247,7 +247,7 @@ More, if you don't use one of `-s` and `-q`, you need to enter some queries afte # Or > tools/export-csv.bat -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -tf yyyy-MM-dd\ HH:mm:ss # or -> tools/export-csv.bat -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -q "select * from root.**" +> tools/export-csv.bat -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -q "select * from root.** align by device" # Or > tools/export-csv.bat -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -s sql.txt # Or diff --git a/src/UserGuide/latest/User-Manual/Operate-Metadata.md b/src/UserGuide/latest/User-Manual/Operate-Metadata.md index 1ed3ac0a..15b078c9 100644 --- a/src/UserGuide/latest/User-Manual/Operate-Metadata.md +++ b/src/UserGuide/latest/User-Manual/Operate-Metadata.md @@ -311,68 +311,68 @@ IoTDB> show all ttl +----------+-------+ ``` -## Schema Template +## Device Template -IoTDB supports the schema template function, enabling different entities of the same type to share metadata, reduce the memory usage of metadata, and simplify the management of numerous entities and measurements. +IoTDB supports the device template function, enabling different entities of the same type to share metadata, reduce the memory usage of metadata, and simplify the management of numerous entities and measurements. -Note: The `schema` keyword in the following statements can be omitted. +Note: The `device` keyword in the following statements can be omitted. -### Create Schema Template +### Create Device Template The SQL syntax for creating a metadata template is as follows: ```sql -CREATE SCHEMA TEMPLATE ALIGNED? '(' [',' ]+ ')' +CREATE DEVICE TEMPLATE ALIGNED? '(' [',' ]+ ')' ``` **Example 1:** Create a template containing two non-aligned timeseires ```shell -IoTDB> create schema template t1 (temperature FLOAT encoding=RLE, status BOOLEAN encoding=PLAIN compression=SNAPPY) +IoTDB> create device template t1 (temperature FLOAT encoding=RLE, status BOOLEAN encoding=PLAIN compression=SNAPPY) ``` **Example 2:** Create a template containing a group of aligned timeseires ```shell -IoTDB> create schema template t2 aligned (lat FLOAT encoding=Gorilla, lon FLOAT encoding=Gorilla) +IoTDB> create device template t2 aligned (lat FLOAT encoding=Gorilla, lon FLOAT encoding=Gorilla) ``` The` lat` and `lon` measurements are aligned. -### Set Schema Template +### Set Device Template -After a schema template is created, it should be set to specific path before creating related timeseries or insert data. +After a device template is created, it should be set to specific path before creating related timeseries or insert data. **It should be ensured that the related database has been set before setting template.** -**It is recommended to set schema template to database path. It is not suggested to set schema template to some path above database** +**It is recommended to set device template to database path. It is not suggested to set device template to some path above database** -**It is forbidden to create timeseries under a path setting schema template. Schema template shall not be set on a prefix path of an existing timeseries.** +**It is forbidden to create timeseries under a path setting s tedeviceplate. Device template shall not be set on a prefix path of an existing timeseries.** -The SQL Statement for setting schema template is as follow: +The SQL Statement for setting device template is as follow: ```shell -IoTDB> set schema template t1 to root.sg1.d1 +IoTDB> set device template t1 to root.sg1.d1 ``` -### Activate Schema Template +### Activate Device Template -After setting the schema template, with the system enabled to auto create schema, you can insert data into the timeseries. For example, suppose there's a database root.sg1 and t1 has been set to root.sg1.d1, then timeseries like root.sg1.d1.temperature and root.sg1.d1.status are available and data points can be inserted. +After setting the device template, with the system enabled to auto create schema, you can insert data into the timeseries. For example, suppose there's a database root.sg1 and t1 has been set to root.sg1.d1, then timeseries like root.sg1.d1.temperature and root.sg1.d1.status are available and data points can be inserted. -**Attention**: Before inserting data or the system not enabled to auto create schema, timeseries defined by the schema template will not be created. You can use the following SQL statement to create the timeseries or activate the schema template, act before inserting data: +**Attention**: Before inserting data or the system not enabled to auto create schema, timeseries defined by the device template will not be created. You can use the following SQL statement to create the timeseries or activate the templdeviceate, act before inserting data: ```shell -IoTDB> create timeseries using schema template on root.sg1.d1 +IoTDB> create timeseries using device template on root.sg1.d1 ``` **Example:** Execute the following statement ```shell -IoTDB> set schema template t1 to root.sg1.d1 -IoTDB> set schema template t2 to root.sg1.d2 -IoTDB> create timeseries using schema template on root.sg1.d1 -IoTDB> create timeseries using schema template on root.sg1.d2 +IoTDB> set device template t1 to root.sg1.d1 +IoTDB> set device template t2 to root.sg1.d2 +IoTDB> create timeseries using device template on root.sg1.d1 +IoTDB> create timeseries using device template on root.sg1.d2 ``` Show the time series: @@ -407,14 +407,14 @@ show devices root.sg1.** +---------------+---------+ ```` -### Show Schema Template +### Show Device Template -- Show all schema templates +- Show all device templates The SQL statement looks like this: ```shell -IoTDB> show schema templates +IoTDB> show device templates ``` The execution result is as follows: @@ -428,12 +428,12 @@ The execution result is as follows: +-------------+ ``` -- Show nodes under in schema template +- Show nodes under in device template The SQL statement looks like this: ```shell -IoTDB> show nodes in schema template t1 +IoTDB> show nodes in device template t1 ``` The execution result is as follows: @@ -447,10 +447,10 @@ The execution result is as follows: +-----------+--------+--------+-----------+ ``` -- Show the path prefix where a schema template is set +- Show the path prefix where a device template is set ```shell -IoTDB> show paths set schema template t1 +IoTDB> show paths set device template t1 ``` The execution result is as follows: @@ -463,10 +463,10 @@ The execution result is as follows: +-----------+ ``` -- Show the path prefix where a schema template is used (i.e. the time series has been created) +- Show the path prefix where a device template is used (i.e. the time series has been created) ```shell -IoTDB> show paths using schema template t1 +IoTDB> show paths using device template t1 ``` The execution result is as follows: @@ -479,65 +479,65 @@ The execution result is as follows: +-----------+ ``` -### Deactivate Schema Template +### Deactivate device Template -To delete a group of timeseries represented by schema template, namely deactivate the schema template, use the following SQL statement: +To delete a group of timeseries represented by device template, namely deactivate the device template, use the following SQL statement: ```shell -IoTDB> delete timeseries of schema template t1 from root.sg1.d1 +IoTDB> delete timeseries of device template t1 from root.sg1.d1 ``` or ```shell -IoTDB> deactivate schema template t1 from root.sg1.d1 +IoTDB> deactivate device template t1 from root.sg1.d1 ``` The deactivation supports batch process. ```shell -IoTDB> delete timeseries of schema template t1 from root.sg1.*, root.sg2.* +IoTDB> delete timeseries of device template t1 from root.sg1.*, root.sg2.* ``` or ```shell -IoTDB> deactivate schema template t1 from root.sg1.*, root.sg2.* +IoTDB> deactivate device template t1 from root.sg1.*, root.sg2.* ``` If the template name is not provided in sql, all template activation on paths matched by given path pattern will be removed. -### Unset Schema Template +### Unset Device Template -The SQL Statement for unsetting schema template is as follow: +The SQL Statement for unsetting device template is as follow: ```shell -IoTDB> unset schema template t1 from root.sg1.d1 +IoTDB> unset device template t1 from root.sg1.d1 ``` -**Attention**: It should be guaranteed that none of the timeseries represented by the target schema template exists, before unset it. It can be achieved by deactivation operation. +**Attention**: It should be guaranteed that none of the timeseries represented by the target device template exists, before unset it. It can be achieved by deactivation operation. -### Drop Schema Template +### Drop Device Template -The SQL Statement for dropping schema template is as follow: +The SQL Statement for dropping device template is as follow: ```shell -IoTDB> drop schema template t1 +IoTDB> drop device template t1 ``` **Attention**: Dropping an already set template is not supported. -### Alter Schema Template +### Alter Device Template -In a scenario where measurements need to be added, you can modify the schema template to add measurements to all devices using the schema template. +In a scenario where measurements need to be added, you can modify the template to add measurements to all devicesdevice using the device template. -The SQL Statement for altering schema template is as follow: +The SQL Statement for altering device template is as follow: ```shell -IoTDB> alter schema template t1 add (speed FLOAT encoding=RLE, FLOAT TEXT encoding=PLAIN compression=SNAPPY) +IoTDB> alter device template t1 add (speed FLOAT encoding=RLE, FLOAT TEXT encoding=PLAIN compression=SNAPPY) ``` -**When executing data insertion to devices with schema template set on related prefix path and there are measurements not present in this schema template, the measurements will be auto added to this schema template.** +**When executing data insertion to devices with device template set on related prefix path and there are measurements not present in this device template, the measurements will be auto added to this device template.** ## Timeseries Management diff --git a/src/zh/UserGuide/Master/API/RestServiceV2.md b/src/zh/UserGuide/Master/API/RestServiceV2.md index e174fee3..f675ab32 100644 --- a/src/zh/UserGuide/Master/API/RestServiceV2.md +++ b/src/zh/UserGuide/Master/API/RestServiceV2.md @@ -30,7 +30,7 @@ RESTful 服务默认情况是关闭的 * 使用者 - 找到IoTDB安装目录下面的`conf/iotdb-common.properties`文件,将 `enable_rest_service` 设置为 `true` 以启用该模块。 + 找到IoTDB安装目录下面的`conf/iotdb-datanode.properties`文件,将 `enable_rest_service` 设置为 `true` 以启用该模块。 ```properties enable_rest_service=true @@ -528,8 +528,7 @@ curl -H "Content-Type:application/json" -H "Authorization:Basic cm9vdDpyb290" -X "expressions": null, "column_names": [ "devices", - "isAligned", - "Template" + "isAligned" ], "timestamps": null, "values": [ @@ -540,10 +539,6 @@ curl -H "Content-Type:application/json" -H "Authorization:Basic cm9vdDpyb290" -X [ "false", "false" - ], - [ - "t1", - null ] ] } @@ -562,8 +557,7 @@ curl -H "Content-Type:application/json" -H "Authorization:Basic cm9vdDpyb290" -X "column_names": [ "devices", "database", - "isAligned", - "Template" + "isAligned" ], "timestamps": null, "values": [ @@ -578,10 +572,6 @@ curl -H "Content-Type:application/json" -H "Authorization:Basic cm9vdDpyb290" -X [ "false", "false" - ], - [ - "t1", - null ] ] } diff --git a/src/zh/UserGuide/Master/Deployment-and-Maintenance/Deployment-Guide_timecho.md b/src/zh/UserGuide/Master/Deployment-and-Maintenance/Deployment-Guide_timecho.md index 7c3c50ab..8f03edcd 100644 --- a/src/zh/UserGuide/Master/Deployment-and-Maintenance/Deployment-Guide_timecho.md +++ b/src/zh/UserGuide/Master/Deployment-and-Maintenance/Deployment-Guide_timecho.md @@ -70,8 +70,6 @@ Windows 系统启动命令如下: > sbin\start-standalone.bat ``` -注意:目前,要使用单机模式,你需要保证所有的地址设置为 127.0.0.1,如果需要从非 IoTDB 所在的机器访问此IoTDB,请将配置项 `dn_rpc_address` 修改为 IoTDB 所在的机器 IP。副本数设置为1。并且,推荐使用 SimpleConsensus,因为这会带来额外的效率。这些现在都是默认配置。 - ## 集群版部署(使用集群管理工具) IoTDB 集群管理工具是一款易用的运维工具(企业版工具)。旨在解决 IoTDB 分布式系统多节点的运维难题,主要包括集群部署、集群启停、弹性扩容、配置更新、数据导出等功能,从而实现对复杂数据库集群的一键式指令下发, @@ -1163,7 +1161,7 @@ AINode目前要求系统3.8以上的Python,且带有pip和venv工具 如果是联网的情况,AINode会创建虚拟环境并自动下载运行时的依赖包,不需要额外配置。 -如果是非联网的环境,可以从https://cloud.tsinghua.edu.cn/d/4c1342f6c272439aa96c/中获取安装所需要的依赖包并离线安装。 +如果是非联网的环境,可以从 https://cloud.tsinghua.edu.cn/d/4c1342f6c272439aa96c/ 中获取安装所需要的依赖包并离线安装。 ### 安装步骤 diff --git a/src/zh/UserGuide/Master/FAQ/Frequently-asked-questions.md b/src/zh/UserGuide/Master/FAQ/Frequently-asked-questions.md index 8174c116..4097f7c5 100644 --- a/src/zh/UserGuide/Master/FAQ/Frequently-asked-questions.md +++ b/src/zh/UserGuide/Master/FAQ/Frequently-asked-questions.md @@ -159,6 +159,26 @@ IoTDB 客户端默认显示的时间是人类可读的(比如:```1970-01-01T 这是我们的依赖Ratis 2.4.1的一个内部错误日志,不会对数据写入和读取造成任何影响。 已经报告给Ratis社区,并会在未来的版本中修复。 +### 10. 内存不足报错如何处理? + +报错信息: +``` +301: There is not enough memory to execute current fragment instance, current remaining free memory is 86762854, estimated memory usage for current fragment instance is 270139392 +``` +处理方式: +datanode_memory_proportion参数控制分给查询的内存,chunk_timeseriesmeta_free_memory_proportion参数控制查询执行可用的内存。 +默认情况下分给查询的内存为堆内存*30%,查询执行可用的内存为查询内存的20%。 +报错显示当前剩余查询执行可用内存为86762854B=82.74MB,该查询预估使用执行内存270139392B=257.6MB。 + +一些可能的改进项: + +在不改变默认参数的前提下,调大IoTDB的堆内存大于 4.2G(4.2G * 1024MB=4300MB),4300M*30%*20%=258M>257.6M,可以满足要求。 +或者更改 datanode_memory_proportion 等参数,使查询执行可用内存>257.6MB。 +或者减少导出的时间序列数量。 +或者给查询语句添加 slimit 限制,也是减少查询时间序列的一种方案。 +或者添加 align by device,会按照device顺序进行输出,内存占用会降低至单device级别。 + + ## 分布式部署 FAQ ### 集群启停 diff --git a/src/zh/UserGuide/Master/Reference/Keywords.md b/src/zh/UserGuide/Master/Reference/Keywords.md index 20f6365d..0d681ffb 100644 --- a/src/zh/UserGuide/Master/Reference/Keywords.md +++ b/src/zh/UserGuide/Master/Reference/Keywords.md @@ -108,6 +108,7 @@ - GRANT_USER_ROLE - GROUP - HAVING +- HEAD - INDEX - INFO - INSERT @@ -192,6 +193,7 @@ - STATEFUL - STOP - SYSTEM +- TAIL - TAGS - TASK - TEMPLATE diff --git a/src/zh/UserGuide/Master/SQL-Manual/SQL-Manual.md b/src/zh/UserGuide/Master/SQL-Manual/SQL-Manual.md index c46653fc..4c0fbfd5 100644 --- a/src/zh/UserGuide/Master/SQL-Manual/SQL-Manual.md +++ b/src/zh/UserGuide/Master/SQL-Manual/SQL-Manual.md @@ -263,73 +263,73 @@ Create device root.sg.d1 ![img](https://alioss.timecho.com/docs/img/%E6%A8%A1%E6%9D%BF%E6%B5%81%E7%A8%8B.png) -#### 创建元数据模板 +#### 创建设备模板 ```Go -CREATE SCHEMA TEMPLATE ALIGNED? '(' [',' ]+ ')' +CREATE DEVICE TEMPLATE ALIGNED? '(' [',' ]+ ')' ``` -创建包含两个非对齐序列的元数据模板 +创建包含两个非对齐序列的设备模板 ```sql -IoTDB> create schema template t1 (temperature FLOAT encoding=RLE, status BOOLEAN encoding=PLAIN compression=SNAPPY) +IoTDB> create device template t1 (temperature FLOAT encoding=RLE, status BOOLEAN encoding=PLAIN compression=SNAPPY) ``` -创建包含一组对齐序列的元数据模板 +创建包含一组对齐序列的设备模板 ```sql -IoTDB> create schema template t2 aligned (lat FLOAT encoding=Gorilla, lon FLOAT encoding=Gorilla) +IoTDB> create device template t2 aligned (lat FLOAT encoding=Gorilla, lon FLOAT encoding=Gorilla) ``` -#### 挂载元数据模板 +#### 挂载设备模板 ```sql -IoTDB> set SCHEMA TEMPLATE t1 to root.sg1 +IoTDB> set DEVICE TEMPLATE t1 to root.sg1 ``` -#### 激活元数据模板 +#### 激活设备模板 ```sql -IoTDB> create timeseries using SCHEMA TEMPLATE on root.sg1.d1 +IoTDB> create timeseries using DEVICE TEMPLATE on root.sg1.d1 -IoTDB> set SCHEMA TEMPLATE t1 to root.sg1.d1 +IoTDB> set DEVICE TEMPLATE t1 to root.sg1.d1 -IoTDB> set SCHEMA TEMPLATE t2 to root.sg1.d2 +IoTDB> set DEVICE TEMPLATE t2 to root.sg1.d2 -IoTDB> create timeseries using schema template on root.sg1.d1 +IoTDB> create timeseries using device template on root.sg1.d1 -IoTDB> create timeseries using schema template on root.sg1.d2 +IoTDB> create timeseries using device template on root.sg1.d2 ``` -#### 查看元数据模板 +#### 查看设备模板 ```sql -IoTDB> show schema templates +IoTDB> show device templates ``` -- 查看某个元数据模板下的物理量 +- 查看某个设备模板下的物理量 ```sql -IoTDB> show nodes in schema template t1 +IoTDB> show nodes in device template t1 ``` -- 查看挂载了某个元数据模板的路径 +- 查看挂载了某个设备模板的路径 ```sql -IoTDB> show paths set schema template t1 +IoTDB> show paths set device template t1 ``` -- 查看使用了某个元数据模板的路径(即模板在该路径上已激活,序列已创建) +- 查看使用了某个设备模板的路径(即模板在该路径上已激活,序列已创建) ```sql -IoTDB> show paths using schema template t1 +IoTDB> show paths using device template t1 ``` -#### 解除元数据模板 +#### 解除设备模板 ```sql -IoTDB> delete timeseries of schema template t1 from root.sg1.d1 +IoTDB> delete timeseries of device template t1 from root.sg1.d1 ``` ```sql -IoTDB> deactivate schema template t1 from root.sg1.d1 +IoTDB> deactivate device template t1 from root.sg1.d1 ``` 批量处理 ```sql -IoTDB> delete timeseries of schema template t1 from root.sg1.*, root.sg2.* +IoTDB> delete timeseries of device template t1 from root.sg1.*, root.sg2.* ``` ```sql -IoTDB> deactivate schema template t1 from root.sg1.*, root.sg2.* +IoTDB> deactivate device template t1 from root.sg1.*, root.sg2.* ``` -#### 卸载元数据模板 +#### 卸载设备模板 ```sql -IoTDB> unset schema template t1 from root.sg1.d1 +IoTDB> unset device template t1 from root.sg1.d1 ``` -#### 删除元数据模板 +#### 删除设备模板 ```sql -IoTDB> drop schema template t1 +IoTDB> drop device template t1 ``` ### 5、数据存活时间管理 diff --git a/src/zh/UserGuide/Master/Tools-System/Import-Export-Tool.md b/src/zh/UserGuide/Master/Tools-System/Import-Export-Tool.md index 8e92c1d9..87fd11f6 100644 --- a/src/zh/UserGuide/Master/Tools-System/Import-Export-Tool.md +++ b/src/zh/UserGuide/Master/Tools-System/Import-Export-Tool.md @@ -232,7 +232,7 @@ CSV 是以纯文本形式存储表格数据,您可以在CSV文件中写入多 # Or > tools/export-csv.sh -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -tf yyyy-MM-dd\ HH:mm:ss # or -> tools/export-csv.sh -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -q "select * from root.**" +> tools/export-csv.sh -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -q "select * from root.** align by device" # Or > tools/export-csv.sh -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -s sql.txt # Or @@ -247,7 +247,7 @@ CSV 是以纯文本形式存储表格数据,您可以在CSV文件中写入多 # Or > tools/export-csv.bat -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -tf yyyy-MM-dd\ HH:mm:ss # or -> tools/export-csv.bat -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -q "select * from root.**" +> tools/export-csv.bat -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -q "select * from root.** align by device" # Or > tools/export-csv.bat -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -s sql.txt # Or diff --git a/src/zh/UserGuide/Master/User-Manual/AINode_timecho.md b/src/zh/UserGuide/Master/User-Manual/AINode_timecho.md index f8212429..469adbd6 100644 --- a/src/zh/UserGuide/Master/User-Manual/AINode_timecho.md +++ b/src/zh/UserGuide/Master/User-Manual/AINode_timecho.md @@ -440,7 +440,7 @@ Total line number = 4 | 权限名称 | 权限范围 | 管理员用户(默认ROOT) | 普通用户 | 路径相关 | | --------- | --------------------------------- | ---------------------- | -------- | -------- | -| USE_MODEL | create modelshow modelsdrop model | √ | √ | x | +| USE_MODEL | create model / show models / drop model | √ | √ | x | | | call inference | | | | ## 6. 实际案例 diff --git a/src/zh/UserGuide/Master/User-Manual/Query-Data.md b/src/zh/UserGuide/Master/User-Manual/Query-Data.md index e4820530..354e2882 100644 --- a/src/zh/UserGuide/Master/User-Manual/Query-Data.md +++ b/src/zh/UserGuide/Master/User-Manual/Query-Data.md @@ -280,7 +280,7 @@ It costs 0.016s - 在 SQL 命令行终端中执行查询语句:启动 SQL 命令行终端,直接输入查询语句执行即可,详见 [SQL 命令行终端](../Tools-System/CLI.md)。 - 在 JDBC 中执行查询语句,详见 [JDBC](../API/Programming-JDBC.md) 。 -- + - 在 JAVA / C++ / Python / Go 等编程语言 API 中执行查询语句,详见应用编程接口一章相应文档。接口原型如下: ```java @@ -2901,8 +2901,8 @@ It costs 0.375s 用户必须有下列权限才能正常执行查询写回语句: -* 所有 `SELECT` 子句中源序列的 `READ_TIMESERIES` 权限。 -* 所有 `INTO` 子句中目标序列 `INSERT_TIMESERIES` 权限。 +* 所有 `SELECT` 子句中源序列的 `WRITE_SCHEMA` 权限。 +* 所有 `INTO` 子句中目标序列 `WRITE_DATA` 权限。 更多用户权限相关的内容,请参考[权限管理语句](./Authority-Management.md)。 diff --git a/src/zh/UserGuide/V1.2.x/FAQ/Frequently-asked-questions.md b/src/zh/UserGuide/V1.2.x/FAQ/Frequently-asked-questions.md index 1c5e250c..4097f7c5 100644 --- a/src/zh/UserGuide/V1.2.x/FAQ/Frequently-asked-questions.md +++ b/src/zh/UserGuide/V1.2.x/FAQ/Frequently-asked-questions.md @@ -159,6 +159,26 @@ IoTDB 客户端默认显示的时间是人类可读的(比如:```1970-01-01T 这是我们的依赖Ratis 2.4.1的一个内部错误日志,不会对数据写入和读取造成任何影响。 已经报告给Ratis社区,并会在未来的版本中修复。 +### 10. 内存不足报错如何处理? + +报错信息: +``` +301: There is not enough memory to execute current fragment instance, current remaining free memory is 86762854, estimated memory usage for current fragment instance is 270139392 +``` +处理方式: +datanode_memory_proportion参数控制分给查询的内存,chunk_timeseriesmeta_free_memory_proportion参数控制查询执行可用的内存。 +默认情况下分给查询的内存为堆内存*30%,查询执行可用的内存为查询内存的20%。 +报错显示当前剩余查询执行可用内存为86762854B=82.74MB,该查询预估使用执行内存270139392B=257.6MB。 + +一些可能的改进项: + +在不改变默认参数的前提下,调大IoTDB的堆内存大于 4.2G(4.2G * 1024MB=4300MB),4300M*30%*20%=258M>257.6M,可以满足要求。 +或者更改 datanode_memory_proportion 等参数,使查询执行可用内存>257.6MB。 +或者减少导出的时间序列数量。 +或者给查询语句添加 slimit 限制,也是减少查询时间序列的一种方案。 +或者添加 align by device,会按照device顺序进行输出,内存占用会降低至单device级别。 + + ## 分布式部署 FAQ ### 集群启停 @@ -237,5 +257,5 @@ IoTDB 客户端默认显示的时间是人类可读的(比如:```1970-01-01T #### 3. 如何降低ConfigNode、DataNode使用的内存? -- 在conf/confignode-env.sh、conf/datanode-env.sh文件可通过调整MAX_HEAP_SIZE、MAX_DIRECT_MEMORY_SIZE等选项可以调整ConfigNode、DataNode使用的最大堆内、堆外内存 +- 在conf/confignode-env.sh、conf/datanode-env.sh文件可通过调整ON_HEAP_MEMORY、OFF_HEAP_MEMORY等选项可以调整ConfigNode、DataNode使用的最大堆内、堆外内存 diff --git a/src/zh/UserGuide/V1.2.x/Tools-System/Import-Export-Tool.md b/src/zh/UserGuide/V1.2.x/Tools-System/Import-Export-Tool.md index 6bbb7d2a..0b4d467f 100644 --- a/src/zh/UserGuide/V1.2.x/Tools-System/Import-Export-Tool.md +++ b/src/zh/UserGuide/V1.2.x/Tools-System/Import-Export-Tool.md @@ -161,7 +161,7 @@ TsFile 工具可帮您 通过执行指定sql、命令行sql、sql文件的方式 # Unix/OS X > tools/export-tsfile.sh -h 127.0.0.1 -p 6667 -u root -pw root -td ./ # or -> tools/export-tsfile.sh -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -q "select * from root.**" +> tools/export-tsfile.sh -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -q "select * from root.** align by device" # Or > tools/export-tsfile.sh -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -s ./sql.txt # Or @@ -172,7 +172,7 @@ TsFile 工具可帮您 通过执行指定sql、命令行sql、sql文件的方式 # Windows > tools/export-tsfile.bat -h 127.0.0.1 -p 6667 -u root -pw root -td ./ # Or -> tools/export-tsfile.bat -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -q "select * from root.**" +> tools/export-tsfile.bat -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -q "select * from root.** align by device" # Or > tools/export-tsfile.bat -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -s ./sql.txt # Or diff --git a/src/zh/UserGuide/latest/API/RestServiceV2.md b/src/zh/UserGuide/latest/API/RestServiceV2.md index d88f10ee..f675ab32 100644 --- a/src/zh/UserGuide/latest/API/RestServiceV2.md +++ b/src/zh/UserGuide/latest/API/RestServiceV2.md @@ -30,7 +30,7 @@ RESTful 服务默认情况是关闭的 * 使用者 - 找到IoTDB安装目录下面的`conf/iotdb-common.properties`文件,将 `enable_rest_service` 设置为 `true` 以启用该模块。 + 找到IoTDB安装目录下面的`conf/iotdb-datanode.properties`文件,将 `enable_rest_service` 设置为 `true` 以启用该模块。 ```properties enable_rest_service=true diff --git a/src/zh/UserGuide/latest/Deployment-and-Maintenance/Deployment-Guide_timecho.md b/src/zh/UserGuide/latest/Deployment-and-Maintenance/Deployment-Guide_timecho.md index 2dcc1aab..8f03edcd 100644 --- a/src/zh/UserGuide/latest/Deployment-and-Maintenance/Deployment-Guide_timecho.md +++ b/src/zh/UserGuide/latest/Deployment-and-Maintenance/Deployment-Guide_timecho.md @@ -1161,7 +1161,7 @@ AINode目前要求系统3.8以上的Python,且带有pip和venv工具 如果是联网的情况,AINode会创建虚拟环境并自动下载运行时的依赖包,不需要额外配置。 -如果是非联网的环境,可以从https://cloud.tsinghua.edu.cn/d/4c1342f6c272439aa96c/中获取安装所需要的依赖包并离线安装。 +如果是非联网的环境,可以从 https://cloud.tsinghua.edu.cn/d/4c1342f6c272439aa96c/ 中获取安装所需要的依赖包并离线安装。 ### 安装步骤 diff --git a/src/zh/UserGuide/latest/FAQ/Frequently-asked-questions.md b/src/zh/UserGuide/latest/FAQ/Frequently-asked-questions.md index 8174c116..fbabd8ba 100644 --- a/src/zh/UserGuide/latest/FAQ/Frequently-asked-questions.md +++ b/src/zh/UserGuide/latest/FAQ/Frequently-asked-questions.md @@ -159,6 +159,25 @@ IoTDB 客户端默认显示的时间是人类可读的(比如:```1970-01-01T 这是我们的依赖Ratis 2.4.1的一个内部错误日志,不会对数据写入和读取造成任何影响。 已经报告给Ratis社区,并会在未来的版本中修复。 +### 10. How do I handle an out of memory error? + +Report an error message: +``` +301: There is not enough memory to execute current fragment instance, current remaining free memory is 86762854, estimated memory usage for current fragment instance is 270139392 +``` +Handling: +The datanode_memory_proportion parameter controls the memory divided to the query, and the chunk_timeseriesmeta_free_memory_proportion parameter controls the memory available for query execution. +By default the memory allocated to the query is 30% of the heap memory* and the memory available for query execution is 20% of the query memory. +The error report shows that the current remaining memory available for query execution is 86762854B = 82.74MB, and the query is estimated to use 270139392B = 257.6MB of execution memory. + +Some possible improvement items: + +Without changing the default parameters, crank up the heap memory of IoTDB greater than 4.2G (4.2G * 1024MB = 4300MB), 4300M * 30% * 20% = 258M > 257.6M, which can fulfill the requirement. +Or change parameters such as datanode_memory_proportion so that the available memory for query execution is >257.6MB. +Or reduce the number of exported time series. +Or add slimit limit to the query statement, which is also an option to reduce the query time series. +Or add align by device, which will export in device order, and the memory usage will be reduced to single-device level. + ## 分布式部署 FAQ ### 集群启停 diff --git a/src/zh/UserGuide/latest/Reference/Keywords.md b/src/zh/UserGuide/latest/Reference/Keywords.md index 20f6365d..0d681ffb 100644 --- a/src/zh/UserGuide/latest/Reference/Keywords.md +++ b/src/zh/UserGuide/latest/Reference/Keywords.md @@ -108,6 +108,7 @@ - GRANT_USER_ROLE - GROUP - HAVING +- HEAD - INDEX - INFO - INSERT @@ -192,6 +193,7 @@ - STATEFUL - STOP - SYSTEM +- TAIL - TAGS - TASK - TEMPLATE diff --git a/src/zh/UserGuide/latest/SQL-Manual/SQL-Manual.md b/src/zh/UserGuide/latest/SQL-Manual/SQL-Manual.md index c46653fc..4c0fbfd5 100644 --- a/src/zh/UserGuide/latest/SQL-Manual/SQL-Manual.md +++ b/src/zh/UserGuide/latest/SQL-Manual/SQL-Manual.md @@ -263,73 +263,73 @@ Create device root.sg.d1 ![img](https://alioss.timecho.com/docs/img/%E6%A8%A1%E6%9D%BF%E6%B5%81%E7%A8%8B.png) -#### 创建元数据模板 +#### 创建设备模板 ```Go -CREATE SCHEMA TEMPLATE ALIGNED? '(' [',' ]+ ')' +CREATE DEVICE TEMPLATE ALIGNED? '(' [',' ]+ ')' ``` -创建包含两个非对齐序列的元数据模板 +创建包含两个非对齐序列的设备模板 ```sql -IoTDB> create schema template t1 (temperature FLOAT encoding=RLE, status BOOLEAN encoding=PLAIN compression=SNAPPY) +IoTDB> create device template t1 (temperature FLOAT encoding=RLE, status BOOLEAN encoding=PLAIN compression=SNAPPY) ``` -创建包含一组对齐序列的元数据模板 +创建包含一组对齐序列的设备模板 ```sql -IoTDB> create schema template t2 aligned (lat FLOAT encoding=Gorilla, lon FLOAT encoding=Gorilla) +IoTDB> create device template t2 aligned (lat FLOAT encoding=Gorilla, lon FLOAT encoding=Gorilla) ``` -#### 挂载元数据模板 +#### 挂载设备模板 ```sql -IoTDB> set SCHEMA TEMPLATE t1 to root.sg1 +IoTDB> set DEVICE TEMPLATE t1 to root.sg1 ``` -#### 激活元数据模板 +#### 激活设备模板 ```sql -IoTDB> create timeseries using SCHEMA TEMPLATE on root.sg1.d1 +IoTDB> create timeseries using DEVICE TEMPLATE on root.sg1.d1 -IoTDB> set SCHEMA TEMPLATE t1 to root.sg1.d1 +IoTDB> set DEVICE TEMPLATE t1 to root.sg1.d1 -IoTDB> set SCHEMA TEMPLATE t2 to root.sg1.d2 +IoTDB> set DEVICE TEMPLATE t2 to root.sg1.d2 -IoTDB> create timeseries using schema template on root.sg1.d1 +IoTDB> create timeseries using device template on root.sg1.d1 -IoTDB> create timeseries using schema template on root.sg1.d2 +IoTDB> create timeseries using device template on root.sg1.d2 ``` -#### 查看元数据模板 +#### 查看设备模板 ```sql -IoTDB> show schema templates +IoTDB> show device templates ``` -- 查看某个元数据模板下的物理量 +- 查看某个设备模板下的物理量 ```sql -IoTDB> show nodes in schema template t1 +IoTDB> show nodes in device template t1 ``` -- 查看挂载了某个元数据模板的路径 +- 查看挂载了某个设备模板的路径 ```sql -IoTDB> show paths set schema template t1 +IoTDB> show paths set device template t1 ``` -- 查看使用了某个元数据模板的路径(即模板在该路径上已激活,序列已创建) +- 查看使用了某个设备模板的路径(即模板在该路径上已激活,序列已创建) ```sql -IoTDB> show paths using schema template t1 +IoTDB> show paths using device template t1 ``` -#### 解除元数据模板 +#### 解除设备模板 ```sql -IoTDB> delete timeseries of schema template t1 from root.sg1.d1 +IoTDB> delete timeseries of device template t1 from root.sg1.d1 ``` ```sql -IoTDB> deactivate schema template t1 from root.sg1.d1 +IoTDB> deactivate device template t1 from root.sg1.d1 ``` 批量处理 ```sql -IoTDB> delete timeseries of schema template t1 from root.sg1.*, root.sg2.* +IoTDB> delete timeseries of device template t1 from root.sg1.*, root.sg2.* ``` ```sql -IoTDB> deactivate schema template t1 from root.sg1.*, root.sg2.* +IoTDB> deactivate device template t1 from root.sg1.*, root.sg2.* ``` -#### 卸载元数据模板 +#### 卸载设备模板 ```sql -IoTDB> unset schema template t1 from root.sg1.d1 +IoTDB> unset device template t1 from root.sg1.d1 ``` -#### 删除元数据模板 +#### 删除设备模板 ```sql -IoTDB> drop schema template t1 +IoTDB> drop device template t1 ``` ### 5、数据存活时间管理 diff --git a/src/zh/UserGuide/latest/Tools-System/Import-Export-Tool.md b/src/zh/UserGuide/latest/Tools-System/Import-Export-Tool.md index 8e92c1d9..87fd11f6 100644 --- a/src/zh/UserGuide/latest/Tools-System/Import-Export-Tool.md +++ b/src/zh/UserGuide/latest/Tools-System/Import-Export-Tool.md @@ -232,7 +232,7 @@ CSV 是以纯文本形式存储表格数据,您可以在CSV文件中写入多 # Or > tools/export-csv.sh -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -tf yyyy-MM-dd\ HH:mm:ss # or -> tools/export-csv.sh -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -q "select * from root.**" +> tools/export-csv.sh -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -q "select * from root.** align by device" # Or > tools/export-csv.sh -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -s sql.txt # Or @@ -247,7 +247,7 @@ CSV 是以纯文本形式存储表格数据,您可以在CSV文件中写入多 # Or > tools/export-csv.bat -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -tf yyyy-MM-dd\ HH:mm:ss # or -> tools/export-csv.bat -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -q "select * from root.**" +> tools/export-csv.bat -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -q "select * from root.** align by device" # Or > tools/export-csv.bat -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -s sql.txt # Or diff --git a/src/zh/UserGuide/latest/User-Manual/AINode_timecho.md b/src/zh/UserGuide/latest/User-Manual/AINode_timecho.md index f8212429..469adbd6 100644 --- a/src/zh/UserGuide/latest/User-Manual/AINode_timecho.md +++ b/src/zh/UserGuide/latest/User-Manual/AINode_timecho.md @@ -440,7 +440,7 @@ Total line number = 4 | 权限名称 | 权限范围 | 管理员用户(默认ROOT) | 普通用户 | 路径相关 | | --------- | --------------------------------- | ---------------------- | -------- | -------- | -| USE_MODEL | create modelshow modelsdrop model | √ | √ | x | +| USE_MODEL | create model / show models / drop model | √ | √ | x | | | call inference | | | | ## 6. 实际案例 diff --git a/src/zh/UserGuide/latest/User-Manual/Query-Data.md b/src/zh/UserGuide/latest/User-Manual/Query-Data.md index e4820530..354e2882 100644 --- a/src/zh/UserGuide/latest/User-Manual/Query-Data.md +++ b/src/zh/UserGuide/latest/User-Manual/Query-Data.md @@ -280,7 +280,7 @@ It costs 0.016s - 在 SQL 命令行终端中执行查询语句:启动 SQL 命令行终端,直接输入查询语句执行即可,详见 [SQL 命令行终端](../Tools-System/CLI.md)。 - 在 JDBC 中执行查询语句,详见 [JDBC](../API/Programming-JDBC.md) 。 -- + - 在 JAVA / C++ / Python / Go 等编程语言 API 中执行查询语句,详见应用编程接口一章相应文档。接口原型如下: ```java @@ -2901,8 +2901,8 @@ It costs 0.375s 用户必须有下列权限才能正常执行查询写回语句: -* 所有 `SELECT` 子句中源序列的 `READ_TIMESERIES` 权限。 -* 所有 `INTO` 子句中目标序列 `INSERT_TIMESERIES` 权限。 +* 所有 `SELECT` 子句中源序列的 `WRITE_SCHEMA` 权限。 +* 所有 `INTO` 子句中目标序列 `WRITE_DATA` 权限。 更多用户权限相关的内容,请参考[权限管理语句](./Authority-Management.md)。