Skip to content

Commit

Permalink
fix some erros in Engilish version and zh (#174)
Browse files Browse the repository at this point in the history
  • Loading branch information
wanghui42 authored Feb 2, 2024
1 parent 3e6e5b5 commit 3c599ba
Show file tree
Hide file tree
Showing 28 changed files with 261 additions and 218 deletions.
16 changes: 3 additions & 13 deletions src/UserGuide/Master/API/RestServiceV2.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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": [
Expand All @@ -535,10 +534,6 @@ curl -H "Content-Type:application/json" -H "Authorization:Basic cm9vdDpyb290" -X
[
"false",
"false"
],
[
"t1",
null
]
]
}
Expand All @@ -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": [
Expand All @@ -572,10 +566,6 @@ curl -H "Content-Type:application/json" -H "Authorization:Basic cm9vdDpyb290" -X
[
"false",
"false"
],
[
"t1",
null
]
]
}
Expand Down
2 changes: 2 additions & 0 deletions src/UserGuide/Master/Reference/Keywords.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ Common Keywords:
- GRANT_USER_PRIVILEGE
- GRANT_USER_ROLE
- GROUP
- HEAD
- HAVING
- INDEX
- INFO
Expand Down Expand Up @@ -192,6 +193,7 @@ Common Keywords:
- STATEFUL
- STOP
- SYSTEM
- TAIL
- TAGS
- TASK
- TEMPLATE
Expand Down
8 changes: 4 additions & 4 deletions src/UserGuide/Master/Tools-System/Import-Export-Tool.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
98 changes: 48 additions & 50 deletions src/UserGuide/Master/User-Manual/Operate-Metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 <templateName> ALIGNED? '(' <measurementId> <attributeClauses> [',' <measurementId> <attributeClauses>]+ ')'
CREATE DEVICE TEMPLATE <templateName> ALIGNED? '(' <measurementId> <attributeClauses> [',' <measurementId> <attributeClauses>]+ ')'
```

**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:
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/UserGuide/V1.2.x/FAQ/Frequently-asked-questions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
4 changes: 2 additions & 2 deletions src/UserGuide/V1.2.x/Tools-System/Import-Export-Tool.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/UserGuide/latest/API/RestServiceV2.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/UserGuide/latest/Reference/Keywords.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ Common Keywords:
- GRANT_USER_PRIVILEGE
- GRANT_USER_ROLE
- GROUP
- HEAD
- HAVING
- INDEX
- INFO
Expand Down Expand Up @@ -192,6 +193,7 @@ Common Keywords:
- STATEFUL
- STOP
- SYSTEM
- TAIL
- TAGS
- TASK
- TEMPLATE
Expand Down
Loading

0 comments on commit 3c599ba

Please sign in to comment.