Skip to content

Commit

Permalink
Merge pull request #953 from SailVR/master
Browse files Browse the repository at this point in the history
modify master docs
  • Loading branch information
Jialin Qiao committed Mar 30, 2020
2 parents dedcd42 + 98ac536 commit c0f23e8
Show file tree
Hide file tree
Showing 28 changed files with 114 additions and 69 deletions.
8 changes: 4 additions & 4 deletions docs/UserGuide/0-Get Started/1-QuickStart.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

<!-- /TOC -->

This short guide will walk you through the basic process of using IoTDB. For a more-complete guide, please visit our website's [User Guide](/document/master/UserGuide/1-Overview/1-What%20is%20IoTDB.html).
This short guide will walk you through the basic process of using IoTDB. For a more-complete guide, please visit our website's [User Guide](../1-Overview/1-What%20is%20IoTDB.html).

## Prerequisites

Expand All @@ -62,7 +62,7 @@ Here in the Quick Start, we give a brief introduction to install IoTDB. For furt
## Download

You can download the binary file from:
[Here](/download/)
[Here](/Download/)

## Configurations

Expand All @@ -72,7 +72,7 @@ configuration files are under "conf" folder
* system config module (`tsfile-format.properties`, `iotdb-engine.properties`)
* log config module (`logback.xml`).

For more, see [Chapter3: Server](/document/master/UserGuide/3-Server/1-Download.html) in detail.
For more, see [Chapter3: Server](../3-Server/1-Download.html) in detail.

## Start

Expand Down Expand Up @@ -230,7 +230,7 @@ or
IoTDB> exit
```

For more on what commands are supported by IoTDB SQL, see [SQL Reference](/document/master/UserGuide/5-Operation%20Manual/4-SQL%20Reference.html).
For more on what commands are supported by IoTDB SQL, see [SQL Reference](../5-Operation%20Manual/4-SQL%20Reference.html).

### Stop IoTDB

Expand Down
43 changes: 43 additions & 0 deletions docs/UserGuide/2-Concept/.~2-Data Type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

# Data Type

IoTDB supports six data types in total:
* BOOLEAN (Boolean)
* INT32 (Integer)
* INT64 (Long Integer)
* FLOAT (Single Precision Floating Point)
* DOUBLE (Double Precision Floating Point)
* TEXT (String).


The time series of **FLOAT** and **DOUBLE** type can specify (MAX\_POINT\_NUMBER, see [this page](../5-Operation%20Manual/4-SQL%20Reference.html) for more information on how to specify), which is the number of digits after the decimal point of the floating point number, if the encoding method is [RLE](../2-Concept/3-Encoding.html) or [TS\_2DIFF](../2-Concept/3-Encoding.html) (Refer to [Create Timeseries Statement](../5-Operation%20Manual/4-SQL%20Reference.html) for more information on how to specify). If MAX\_POINT\_NUMBER is not specified, the system will use [float\_precision](../3-Server/4-Config%20Manual.html) in the configuration file `tsfile-format.properties`.

* For Float data value, The data range is (-Integer.MAX_VALUE, Integer.MAX_VALUE), rather than Float.MAX_VALUE, and the max_point_number is 19, it is because of the limition of function Math.round(float) in Java.
* For Double data value, The data range is (-Long.MAX_VALUE, Long.MAX_VALUE), rather than Double.MAX_VALUE, and the max_point_number is 19, it is because of the limition of function Math.round(double) in Java (Long.MAX_VALUE=9.22E18).

When the data type of data input by the user in the system does not correspond to the data type of the time series, the system will report type errors. As shown below, the second-order difference encoding does not support the Boolean type:

```
IoTDB> create timeseries root.ln.wf02.wt02.status WITH DATATYPE=BOOLEAN, ENCODING=TS_2DIFF
error: encoding TS_2DIFF does not support BOOLEAN
```
4 changes: 2 additions & 2 deletions docs/UserGuide/2-Concept/1-Data Model and Terminology.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@

To make this manual more practical, we will use a specific scenario example to illustrate how to operate IoTDB databases at all stages of use. See [this page](https://github.com/apache/incubator-iotdb/blob/master/docs/Documentation/OtherMaterial-Sample%20Data.txt) for a look. For convenience, we also provide you with a sample data file in real scenario to import into the IoTDB system for trial and operation.

Download file: [SampleData.txt](https://github.com/apache/incubator-iotdb/tree/master/docs/SampleData.txt).
Download file: [IoTDB-SampleData.txt](https://raw.githubusercontent.com/apache/incubator-iotdb/master/docs/Documentation/OtherMaterial-Sample%20Data.txt).

According to the data attribute layers described in the SampleData, we can express it as an attribute hierarchy structure based on the coverage of attributes and the subordinate relationship between them, as shown in Figure 2.1 below. Its hierarchical relationship is: power group layer - power plant layer - device layer - sensor layer. ROOT is the root node, and each node of sensor layer is called a leaf node. In the process of using IoTDB, you can directly connect the attributes on the path from ROOT node to each leaf node with ".", thus forming the name of a timeseries in IoTDB. For example, The left-most path in Figure 2.1 can generate a timeseries named `ROOT.ln.wf01.wt01.status`.
According to the data attribute layers described in [sample data](https://raw.githubusercontent.com/apache/incubator-iotdb/master/docs/Documentation/OtherMaterial-Sample%20Data.txt), we can express it as an attribute hierarchy structure based on the coverage of attributes and the subordinate relationship between them, as shown in Figure 2.1 below. Its hierarchical relationship is: power group layer - power plant layer - device layer - sensor layer. ROOT is the root node, and each node of sensor layer is called a leaf node. In the process of using IoTDB, you can directly connect the attributes on the path from ROOT node to each leaf node with ".", thus forming the name of a timeseries in IoTDB. For example, The left-most path in Figure 2.1 can generate a timeseries named `ROOT.ln.wf01.wt01.status`.

<center><img style="width:100%; max-width:800px; max-height:600px; margin-left:auto; margin-right:auto; display:block;" src="https://user-images.githubusercontent.com/13203019/51577327-7aa50780-1ef4-11e9-9d75-cadabb62444e.jpg"></center>

Expand Down
2 changes: 1 addition & 1 deletion docs/UserGuide/2-Concept/2-Data Type.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ IoTDB supports six data types in total:
* TEXT (String).


The time series of **FLOAT** and **DOUBLE** type can specify (MAX\_POINT\_NUMBER, see [this page](/document/master/UserGuide/5-Operation%20Manual/4-SQL%20Reference.html) for more information on how to specify), which is the number of digits after the decimal point of the floating point number, if the encoding method is [RLE](/document/master/UserGuide/2-Concept/3-Encoding.html) or [TS\_2DIFF](/#/Documents/progress/chap2/sec3) (Refer to [Create Timeseries Statement](/document/master/UserGuide/5-Operation%20Manual/4-SQL%20Reference.html) for more information on how to specify). If MAX\_POINT\_NUMBER is not specified, the system will use [float\_precision](/document/master/UserGuide/3-Server/4-Config%20Manual.html) in the configuration file `tsfile-format.properties`.
The time series of **FLOAT** and **DOUBLE** type can specify (MAX\_POINT\_NUMBER, see [this page](../5-Operation%20Manual/4-SQL%20Reference.html) for more information on how to specify), which is the number of digits after the decimal point of the floating point number, if the encoding method is [RLE](../2-Concept/3-Encoding.html) or [TS\_2DIFF](../2-Concept/3-Encoding.html) (Refer to [Create Timeseries Statement](../5-Operation%20Manual/4-SQL%20Reference.html) for more information on how to specify). If MAX\_POINT\_NUMBER is not specified, the system will use [float\_precision](../3-Server/4-Config%20Manual.html) in the configuration file `tsfile-format.properties`.

* For Float data value, The data range is (-Integer.MAX_VALUE, Integer.MAX_VALUE), rather than Float.MAX_VALUE, and the max_point_number is 19, it is because of the limition of function Math.round(float) in Java.
* For Double data value, The data range is (-Long.MAX_VALUE, Long.MAX_VALUE), rather than Double.MAX_VALUE, and the max_point_number is 19, it is because of the limition of function Math.round(double) in Java (Long.MAX_VALUE=9.22E18).
Expand Down
2 changes: 1 addition & 1 deletion docs/UserGuide/2-Concept/3-Encoding.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Second-order differential encoding is more suitable for encoding monotonically i

Run-length encoding is more suitable for storing sequence with continuous integer values, and is not recommended for sequence data with most of the time different values.

Run-length encoding can also be used to encode floating-point numbers, but it is necessary to specify reserved decimal digits (MAX\_POINT\_NUMBER, see [this page](/document/master/UserGuide/5-Operation%20Manual/4-SQL%20Reference.html) for more information on how to specify) when creating time series. It is more suitable for storing sequence data where floating-point values appear continuously, monotonously increasing or decreasing, and it is not suitable for storing sequence data with high precision requirements after the decimal point or with large fluctuations.
Run-length encoding can also be used to encode floating-point numbers, but it is necessary to specify reserved decimal digits (MAX\_POINT\_NUMBER, see [this page](../5-Operation%20Manual/4-SQL%20Reference.html) for more information on how to specify) when creating time series. It is more suitable for storing sequence data where floating-point values appear continuously, monotonously increasing or decreasing, and it is not suitable for storing sequence data with high precision requirements after the decimal point or with large fluctuations.

* GORILLA

Expand Down
2 changes: 1 addition & 1 deletion docs/UserGuide/2-Concept/4-Compression.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ IoTDB allows you to specify the compression method of the column when creating a

* SNAPPY

The specified syntax for compression is detailed in [Create Timeseries Statement](/document/master/UserGuide/5-Operation%20Manual/4-SQL%20Reference.html).
The specified syntax for compression is detailed in [Create Timeseries Statement](../5-Operation%20Manual/4-SQL%20Reference.html).
6 changes: 3 additions & 3 deletions docs/UserGuide/3-Server/1-Download.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ To use IoTDB, you need to have:
>### Installation from binary files
You can download the binary file from:
[Here](/download/)
[Here](/Download/)

## Installation from source code

You can get the released source code from https://iotdb.apache.org/#/Download, or from the git repository https://github.com/apache/incubator-iotdb/tree/master
You can get the released source code from https://iotdb.apache.org/Download/, or from the git repository https://github.com/apache/incubator-iotdb/tree/master
You can download the source code from:

```
Expand All @@ -71,4 +71,4 @@ After build, the IoTDB server will be at the folder "server/target/iotdb-server-

## Installation by Docker (Dockerfile)

You can build and run a IoTDB docker image by following the guide of [Deployment by Docker](/document/master/UserGuide/3-Server/5-Docker%20Image.html)
You can build and run a IoTDB docker image by following the guide of [Deployment by Docker](../3-Server/5-Docker%20Image.html)
2 changes: 1 addition & 1 deletion docs/UserGuide/4-Client/5-Programming - TsFile API.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ A TsFile can be generated by following three steps and the complete code will be

* type: The data type, now support six types: `BOOLEAN`, `INT32`, `INT64`, `FLOAT`, `DOUBLE`, `TEXT`;

* encoding: The data encoding. See [Chapter 2-3](/document/master/UserGuide/2-Concept/3-Encoding.html).
* encoding: The data encoding. See [Chapter 2-3](../2-Concept/3-Encoding.html).

* compression: The data compression. Now supports `UNCOMPRESSED` and `SNAPPY`.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Msg: org.apache.iotdb.exception.MetadataErrorException: org.apache.iotdb.excepti

## Show Storage Group

After the storage group is created, we can use the [SHOW STORAGE GROUP](/document/master/UserGuide/5-Operation%20Manual/4-SQL%20Reference.html) statement to view all the storage groups. The SQL statement is as follows:
After the storage group is created, we can use the [SHOW STORAGE GROUP](../5-Operation%20Manual/4-SQL%20Reference.html) statement to view all the storage groups. The SQL statement is as follows:

```
IoTDB> show storage group
Expand Down Expand Up @@ -70,7 +70,7 @@ IoTDB> create timeseries root.ln.wf02.wt02.status WITH DATATYPE=BOOLEAN, ENCODIN
error: encoding TS_2DIFF does not support BOOLEAN
```

Please refer to [Encoding](/document/master/UserGuide/2-Concept/3-Encoding.html) for correspondence between data type and encoding.
Please refer to [Encoding](../2-Concept/3-Encoding.html) for correspondence between data type and encoding.

## Show Timeseries

Expand Down

0 comments on commit c0f23e8

Please sign in to comment.