Author: haonan Date: Mon Jan 1 15:02:56 2024 New Revision: 66378 Log: update 1.3.0
Added: release/iotdb/1.3.0/ release/iotdb/1.3.0/README.md release/iotdb/1.3.0/README_ZH.md release/iotdb/1.3.0/RELEASE_NOTES.md release/iotdb/1.3.0/apache-iotdb-1.3.0-all-bin.zip (with props) release/iotdb/1.3.0/apache-iotdb-1.3.0-all-bin.zip.asc release/iotdb/1.3.0/apache-iotdb-1.3.0-all-bin.zip.sha512 release/iotdb/1.3.0/apache-iotdb-1.3.0-cli-bin.zip (with props) release/iotdb/1.3.0/apache-iotdb-1.3.0-cli-bin.zip.asc release/iotdb/1.3.0/apache-iotdb-1.3.0-cli-bin.zip.sha512 release/iotdb/1.3.0/apache-iotdb-1.3.0-confignode-bin.zip (with props) release/iotdb/1.3.0/apache-iotdb-1.3.0-confignode-bin.zip.asc release/iotdb/1.3.0/apache-iotdb-1.3.0-confignode-bin.zip.sha512 release/iotdb/1.3.0/apache-iotdb-1.3.0-datanode-bin.zip (with props) release/iotdb/1.3.0/apache-iotdb-1.3.0-datanode-bin.zip.asc release/iotdb/1.3.0/apache-iotdb-1.3.0-datanode-bin.zip.sha512 release/iotdb/1.3.0/apache-iotdb-1.3.0-flink-sql-connector-bin.zip (with props) release/iotdb/1.3.0/apache-iotdb-1.3.0-flink-sql-connector-bin.zip.asc release/iotdb/1.3.0/apache-iotdb-1.3.0-flink-sql-connector-bin.zip.sha512 release/iotdb/1.3.0/apache-iotdb-1.3.0-library-udf-bin.zip (with props) release/iotdb/1.3.0/apache-iotdb-1.3.0-library-udf-bin.zip.asc release/iotdb/1.3.0/apache-iotdb-1.3.0-library-udf-bin.zip.sha512 release/iotdb/1.3.0/apache-iotdb-1.3.0-source-release.zip (with props) release/iotdb/1.3.0/apache-iotdb-1.3.0-source-release.zip.asc release/iotdb/1.3.0/apache-iotdb-1.3.0-source-release.zip.sha512 release/iotdb/1.3.0/apache-iotdb-1.3.0-spark-connector-bin.zip (with props) release/iotdb/1.3.0/apache-iotdb-1.3.0-spark-connector-bin.zip.asc release/iotdb/1.3.0/apache-iotdb-1.3.0-spark-connector-bin.zip.sha512 Added: release/iotdb/1.3.0/README.md ============================================================================== --- release/iotdb/1.3.0/README.md (added) +++ release/iotdb/1.3.0/README.md Mon Jan 1 15:02:56 2024 @@ -0,0 +1,515 @@ +<!-- + + 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. + +--> +[English](./README.md) | [䏿](./README_ZH.md) + +# IoTDB +[](https://github.com/apache/iotdb/actions/workflows/unit-test.yml) +[](https://codecov.io/github/apache/iotdb) +[](https://github.com/apache/iotdb/releases) +[](https://www.apache.org/licenses/LICENSE-2.0.html) + + + + +[](https://iotdb.apache.org/) +[](http://search.maven.org/#search|gav|1|g:"org.apache.iotdb") +[](https://gitpod.io/#https://github.com/apache/iotdb) +[](https://join.slack.com/t/apacheiotdb/shared_invite/zt-qvso1nj8-7715TpySZtZqmyG5qXQwpg) + +# Overview + +IoTDB (Internet of Things Database) is a data management system for time series data, which provides users with specific services including data collection, storage and analysis. Due to its light weight structure, high performance and usable features, together with its seamless integration with the Hadoop and Spark ecology, IoTDB meets the requirements of massive dataset storage, high throughput data input, and complex data analysis in the industrial IoT field. + +# Main Features + +Main features of IoTDB are as follows: + +1. Flexible deployment strategy. IoTDB provides users a one-click installation tool on either the cloud platform or the terminal devices, and a data synchronization tool bridging the data on cloud platform and terminals. +2. Low cost on hardware. IoTDB can reach a high compression ratio of disk storage. +3. Efficient directory structure. IoTDB supports efficient organization for complex time series data structures from intelligent networking devices, organization for time series data from devices of the same type, and fuzzy searching strategy for massive and complex directory of time series data. +4. High-throughput read and write. IoTDB supports millions of low-power devices' strong connection data access, high-speed data read and write for intelligent networking devices and mixed devices mentioned above. +5. Rich query semantics. IoTDB supports time alignment for time series data across devices and measurements, computation in time series field (frequency domain transformation) and rich aggregation function support in time dimension. +6. Easy to get started. IoTDB supports SQL-Like language, JDBC standard API and import/export tools which is easy to use. +7. Seamless integration with state-of-the-practice Open Source Ecosystem. IoTDB supports analysis ecosystems such as, Hadoop, Spark, and visualization tool, such as, Grafana. + +For the latest information about IoTDB, please visit [IoTDB official website](https://iotdb.apache.org/). If you encounter any problems or identify any bugs while using IoTDB, please report an issue in [jira](https://issues.apache.org/jira/projects/IOTDB/issues). + +<!-- TOC --> + +## Outline + +- [IoTDB](#iotdb) +- [Overview](#overview) +- [Main Features](#main-features) + - [Outline](#outline) +- [Quick Start](#quick-start) + - [Prerequisites](#prerequisites) + - [Installation](#installation) + - [Build from source](#build-from-source) + - [Configurations](#configurations) + - [Start](#start) + - [Start IoTDB](#start-iotdb) + - [Use IoTDB](#use-iotdb) + - [Use Cli](#use-cli) + - [Basic commands for IoTDB](#basic-commands-for-iotdb) + - [Stop IoTDB](#stop-iotdb) + - [Only build server](#only-build-server) + - [Only build cli](#only-build-cli) + - [Usage of CSV Import and Export Tool](#usage-of-csv-import-and-export-tool) + +<!-- /TOC --> + +# Quick Start + +This short guide will walk you through the basic process of using IoTDB. For a more detailed introduction, please visit our website's [User Guide](https://iotdb.apache.org/UserGuide/Master/QuickStart/QuickStart.html). + +## Prerequisites + +To use IoTDB, you need to have: + +1. Java >= 1.8 (1.8, 11 to 17 are verified. Please make sure the environment path has been set accordingly). +2. Maven >= 3.6 (If you want to compile and install IoTDB from source code). +3. Set the max open files num as 65535 to avoid "too many open files" error. +4. (Optional) Set the somaxconn as 65535 to avoid "connection reset" error when the system is under high load. + ``` + # Linux + > sudo sysctl -w net.core.somaxconn=65535 + + # FreeBSD or Darwin + > sudo sysctl -w kern.ipc.somaxconn=65535 + ``` +### Linux + +(This guide is based on an installation of Ubuntu 22.04) + +#### Git + +Make sure `Git` is installed, if it's missing, simply install it via: + + sudo apt install git + +#### Java + +Make sure `Java` is installed, if it's missing, simply install it via: + + sudo apt install default-jdk + +#### Flex + + sudo apt install flex + +#### Bison + + sudo apt install bison + +#### Boost + + sudo apt install libboost-all-dev + +#### OpenSSL header files + +Usually OpenSSL is already installed, however it's missing the header files we need to compile. +So ensure these are installed: + + sudo apt install libssl-dev + +### Mac OS + +#### Git + +First ensure `git` works. + +Usually on a new Mac, as soon as you simply type `git` in a `Terminal` window, a popup will come and ask if you want to finish installing the Mac developer tools. +Just say yes. +As soon as this is finished, you are free to use `git`. + +#### Homebrew + +Then install `Homebrew` - If this hasn't been installed yet, as we are going to be installing everything using `Homebrew`. + + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + +#### Java + +As soon as that's done install `Java`, if this hasn't been installed yet: + + brew install java + +Depending on your version of Homebrew, it will tell you to do one of the following (Depending on the type of processor in your device). + +Mainly on the Intel-based models: + + sudo ln -sfn /usr/local/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk + +Mainly on the ARM-based models: + + sudo ln -sfn /opt/homebrew/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk + +#### CPP Prerequisites + +Building `Thrift` requires us to add two more dependencies to the picture. + +This however is only needed when enabling the `compile-cpp` profile: + + brew install boost + brew install bison + brew install openssl + +### Windows + +#### Chocolatey + +Then install `Chocolatey` - If this hasn't been installed yet, as we are going to be installing everything using `Chocolatey`. + +https://chocolatey.org/install + +#### Git + + choco install git.install + +#### Java + + choco install openjdk + +#### Visual Studio 19 2022 + + choco install visualstudio2022community + choco install visualstudio2022buildtools + choco install visualstudio2022-workload-nativedesktop + +#### FLex / Bison + + choco install winflexbison + +#### Boost + + choco install boost-msvc-14.2 + +#### OpenSSL + + choco install openssl + +## Installation + +IoTDB provides three installation methods, you can refer to the following suggestions, choose the one fits you best: + +* Installation from source code. If you need to modify the code yourself, you can use this method. +* Installation from binary files. Download the binary files from the official website. This is the recommended method, in which you will get a binary released package which is out-of-the-box. +* Using Dockerï¼The path to the dockerfile is [here](https://github.com/apache/iotdb/tree/master/docker/src/main) + + +Here in the Quick Start, we give a brief introduction of using source code to install IoTDB. For further information, please refer to [User Guide](https://iotdb.apache.org/UserGuide/Master/QuickStart/QuickStart.html). + +## Build from source + +### Prepare Thrift compiler + +Skip this chapter if you are using Windows. + +As we use Thrift for our RPC module (communication and +protocol definition), we involve Thrift during the compilation, so Thrift compiler 0.13.0 (or +higher) is required to generate Thrift Java code. Thrift officially provides binary compiler for +Windows, but unfortunately, they do not provide that for Unix OSs. + +If you have permission to install new softwares, use `apt install` or `yum install` or `brew install` +to install the Thrift compiler (If you already have installed the thrift compiler, skip this step). +Then, you may add the following parameter +when running Maven: `-Dthrift.download-url=http://apache.org/licenses/LICENSE-2.0.txt -Dthrift.exec.absolute.path=<YOUR LOCAL THRIFT BINARY FILE>`. + +If not, then you have to compile the thrift compiler, and it requires you install a boost library first. +Therefore, we compiled a Unix compiler ourselves and put it onto GitHub, and with the help of a +maven plugin, it will be downloaded automatically during compilation. +This compiler works fine with gcc8 or later, Ubuntu MacOS, and CentOS, but previous versions +and other OSs are not guaranteed. + +If you can not download the thrift compiler automatically because of network problem, you can download +it yourself, and then either: +rename your thrift file to `{project_root}\thrift\target\tools\thrift_0.12.0_0.13.0_linux.exe`; +or, add Maven commands: +`-Dthrift.download-url=http://apache.org/licenses/LICENSE-2.0.txt -Dthrift.exec.absolute.path=<YOUR LOCAL THRIFT BINARY FILE>`. + +### Compile IoTDB + +You can download the source code from: + +``` +git clone https://github.com/apache/iotdb.git +``` + +The default dev branch is the master branch, If you want to use a released version x.x.x: + +``` +git checkout vx.x.x +``` + +Or checkout to the branch of a big version, e.g., the branch of 1.0 is rel/1.0 + +``` +git checkout rel/x.x +``` + +### Build IoTDB from source + +Under the root path of iotdb: + +``` +> mvn clean package -pl distribution -am -DskipTests +``` + +After being built, the IoTDB distribution is located at the folder: "distribution/target". + + +### Only build cli + +Under the iotdb/iotdb-client path: + +``` +> mvn clean package -pl cli -am -DskipTests +``` + +After being built, the IoTDB cli is located at the folder "cli/target". + +### Build Others + +Using `-P compile-cpp` for compiling cpp client (For more details, read client-cpp's Readme file.) + +**NOTE: Directories "`thrift/target/generated-sources/thrift`", "`thrift-sync/target/generated-sources/thrift`", +"`thrift-cluster/target/generated-sources/thrift`", "`thrift-influxdb/target/generated-sources/thrift`" +and "`antlr/target/generated-sources/antlr4`" need to be added to sources roots to avoid compilation errors in the IDE.** + +**In IDEA, you just need to right click on the root project name and choose "`Maven->Reload Project`" after +you run `mvn package` successfully.** + +### Configurations + +configuration files are under "conf" folder + + * environment config module (`datanode-env.bat`, `datanode-env.sh`), + * system config module (`iotdb-datanode.properties`) + * log config module (`logback.xml`). + +For more information, please see [Config Manual](https://iotdb.apache.org/UserGuide/Master/Reference/DataNode-Config-Manual.html). + +## Start + +You can go through the following steps to test the installation. If there is no error returned after execution, the installation is completed. + +### Start IoTDB + +Users can start 1C1D IoTDB by the start-standalone script under the sbin folder. + +``` +# Unix/OS X +> sbin/start-standalone.sh + +# Windows +> sbin\start-standalone.bat +``` + +### Use IoTDB + +#### Use Cli + +IoTDB offers different ways to interact with server, here we introduce the basic steps of using Cli tool to insert and query data. + +After installing IoTDB, there is a default user 'root', its default password is also 'root'. Users can use this +default user to login Cli to use IoTDB. The startup script of Cli is the start-cli script in the folder sbin. When executing the script, user should assign +IP, PORT, USER_NAME and PASSWORD. The default parameters are "-h 127.0.0.1 -p 6667 -u root -pw -root". + +Here is the command for starting the Cli: + +``` +# Unix/OS X +> sbin/start-cli.sh -h 127.0.0.1 -p 6667 -u root -pw root + +# Windows +> sbin\start-cli.bat -h 127.0.0.1 -p 6667 -u root -pw root +``` + +The command line cli is interactive, so you should see the welcome logo and statements if everything is ready: + +``` + _____ _________ ______ ______ +|_ _| | _ _ ||_ _ `.|_ _ \ + | | .--.|_/ | | \_| | | `. \ | |_) | + | | / .'`\ \ | | | | | | | __'. + _| |_| \__. | _| |_ _| |_.' /_| |__) | +|_____|'.__.' |_____| |______.'|_______/ version x.x.x + + +IoTDB> login successfully +IoTDB> +``` + +#### Basic commands for IoTDB + +Now, let us introduce the way of creating timeseries, inserting data and querying data. + +The data in IoTDB is organized as timeseries. Each timeseries includes multiple data-time pairs, and is owned by a database. Before defining a timeseries, we should define a database using CREATE DATABASE first, and here is an example: + +``` +IoTDB> CREATE DATABASE root.ln +``` + +We can also use SHOW DATABASES to check the database being created: + +``` +IoTDB> SHOW DATABASES ++-------------+ +| Database| ++-------------+ +| root.ln| ++-------------+ +Total line number = 1 +``` + +After the database is set, we can use CREATE TIMESERIES to create a new timeseries. When creating a timeseries, we should define its data type and the encoding scheme. Here we create two timeseries: + +``` +IoTDB> CREATE TIMESERIES root.ln.wf01.wt01.status WITH DATATYPE=BOOLEAN, ENCODING=PLAIN +IoTDB> CREATE TIMESERIES root.ln.wf01.wt01.temperature WITH DATATYPE=FLOAT, ENCODING=RLE +``` + +In order to query the specific timeseries, we can use SHOW TIMESERIES <Path>. <Path> represent the location of the timeseries. The default value is "null", which queries all the timeseries in the system(the same as using "SHOW TIMESERIES root"). Here are some examples: + +1. Querying all timeseries in the system: + +``` +IoTDB> SHOW TIMESERIES ++-----------------------------+-----+-------------+--------+--------+-----------+----+----------+ +| Timeseries|Alias|Database|DataType|Encoding|Compression|Tags|Attributes| ++-----------------------------+-----+-------------+--------+--------+-----------+----+----------+ +|root.ln.wf01.wt01.temperature| null| root.ln| FLOAT| RLE| SNAPPY|null| null| +| root.ln.wf01.wt01.status| null| root.ln| BOOLEAN| PLAIN| SNAPPY|null| null| ++-----------------------------+-----+-------------+--------+--------+-----------+----+----------+ +Total line number = 2 +``` + +2. Querying a specific timeseries(root.ln.wf01.wt01.status): + +``` +IoTDB> SHOW TIMESERIES root.ln.wf01.wt01.status ++------------------------+-----+-------------+--------+--------+-----------+----+----------+ +| timeseries|alias|database|dataType|encoding|compression|tags|attributes| ++------------------------+-----+-------------+--------+--------+-----------+----+----------+ +|root.ln.wf01.wt01.status| null| root.ln| BOOLEAN| PLAIN| SNAPPY|null| null| ++------------------------+-----+-------------+--------+--------+-----------+----+----------+ +Total line number = 1 +``` + +Insert timeseries data is a basic operation of IoTDB, you can use âINSERTâ command to finish this. Before insertion, you should assign the timestamp and the suffix path name: + +``` +IoTDB> INSERT INTO root.ln.wf01.wt01(timestamp,status) values(100,true); +IoTDB> INSERT INTO root.ln.wf01.wt01(timestamp,status,temperature) values(200,false,20.71) +``` + +The data that you have just inserted will display as follows: + +``` +IoTDB> SELECT status FROM root.ln.wf01.wt01 ++------------------------+------------------------+ +| Time|root.ln.wf01.wt01.status| ++------------------------+------------------------+ +|1970-01-01T00:00:00.100Z| true| +|1970-01-01T00:00:00.200Z| false| ++------------------------+------------------------+ +Total line number = 2 +``` + +You can also query several timeseries data using one SQL statement: + +``` +IoTDB> SELECT * FROM root.ln.wf01.wt01 ++------------------------+-----------------------------+------------------------+ +| Time|root.ln.wf01.wt01.temperature|root.ln.wf01.wt01.status| ++------------------------+-----------------------------+------------------------+ +|1970-01-01T00:00:00.100Z| null| true| +|1970-01-01T00:00:00.200Z| 20.71| false| ++------------------------+-----------------------------+------------------------+ +Total line number = 2 +``` + +To change the time zone in Cli, you can use the following SQL: + +``` +IoTDB> SET time_zone=+08:00 +Time zone has set to +08:00 +IoTDB> SHOW time_zone +Current time zone: Asia/Shanghai +``` + +Add then the query result will show using the new time zone. + +``` +IoTDB> SELECT * FROM root.ln.wf01.wt01 ++-----------------------------+-----------------------------+------------------------+ +| Time|root.ln.wf01.wt01.temperature|root.ln.wf01.wt01.status| ++-----------------------------+-----------------------------+------------------------+ +|1970-01-01T08:00:00.100+08:00| null| true| +|1970-01-01T08:00:00.200+08:00| 20.71| false| ++-----------------------------+-----------------------------+------------------------+ +Total line number = 2 +``` + +The commands to exit the Cli are: + +``` +IoTDB> quit +or +IoTDB> exit +``` + +For more information about the commands supported by IoTDB SQL, please see [User Guide](https://iotdb.apache.org/UserGuide/Master/QuickStart/QuickStart.html). + +### Stop IoTDB + +The server can be stopped with "ctrl-C" or the following script: + +``` +# Unix/OS X +> sbin/stop-standalone.sh + +# Windows +> sbin\stop-standalone.bat +``` + +# Usage of CSV Import and Export Tool + +see [Usage of CSV Import and Export Tool](https://iotdb.apache.org/UserGuide/Master/Maintenance-Tools/CSV-Tool.html) + +# Frequent Questions for Compiling +see [Frequent Questions when Compiling the Source Code](https://iotdb.apache.org/Development/ContributeGuide.html#_Frequent-Questions-when-Compiling-the-Source-Code) + +# Contact Us +### QQ Group + +* Apache IoTDB User Group: 659990460 + +### Wechat Group + +* Add friend: `tietouqiao` or `liutaohua001`, and then we'll invite you to the group. + +### Slack + +* [Slack channel](https://join.slack.com/t/apacheiotdb/shared_invite/zt-qvso1nj8-7715TpySZtZqmyG5qXQwpg) + +see [Join the community](https://github.com/apache/iotdb/issues/1995) for more! Added: release/iotdb/1.3.0/README_ZH.md ============================================================================== --- release/iotdb/1.3.0/README_ZH.md (added) +++ release/iotdb/1.3.0/README_ZH.md Mon Jan 1 15:02:56 2024 @@ -0,0 +1,398 @@ +<!-- + + 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. + +--> +[English](./README.md) | [䏿](./README_ZH.md) + +# IoTDB +[](https://github.com/apache/iotdb/actions/workflows/main-unix.yml) +[](https://github.com/apache/iotdb/actions/workflows/main-win.yml)<!--[](https://coveralls.io/repos/github/apache/iotdb/badge.svg?branch=master)--> +[](https://github.com/apache/iotdb/releases) +[](https://www.apache.org/licenses/LICENSE-2.0.html) + + + + +[](https://lgtm.com/projects/g/apache/iotdb/context:java) +[](https://iotdb.apache.org/) +[](http://search.maven.org/#search|gav|1|g:"org.apache.iotdb") +[](https://join.slack.com/t/apacheiotdb/shared_invite/zt-qvso1nj8-7715TpySZtZqmyG5qXQwpg) + +# ç®ä» +IoTDB (Internet of Things Database) æ¯ä¸æ¬¾æ¶åºæ°æ®åºç®¡çç³»ç»ï¼å¯ä»¥ä¸ºç¨æ·æä¾æ°æ®æ¶éãåå¨ååæçæå¡ãIoTDBç±äºå ¶è½»éçº§æ¶æã髿§è½åé«å¯ç¨çç¹æ§ï¼ä»¥åä¸ Hadoop å Spark çæçæ ç¼éæï¼æ»¡è¶³äºå·¥ä¸ IoT é¢å䏿µ·éæ°æ®åå¨ãé«ååéæ°æ®åå ¥åå¤ææ°æ®æ¥è¯¢åæçéæ±ã + +# 主è¦ç¹ç¹ + +IoTDBç主è¦ç¹ç¹å¦ä¸: + +1. çµæ´»çé¨ç½²çç¥ãIoTDBä¸ºç¨æ·æä¾äºä¸ä¸ªå¨äºå¹³å°æç»ç«¯è®¾å¤ä¸çä¸é®å®è£ å·¥å ·ï¼ä»¥åä¸ä¸ªè¿æ¥äºå¹³å°åç»ç«¯ä¸çæ°æ®çæ°æ®åæ¥å·¥å ·ã +2. ç¡¬ä»¶ææ¬ä½ãIoTDBå¯ä»¥è¾¾å°å¾é«çç£çåå¨å缩æ¯ã +3. 髿çç®å½ç»æãIoTDBæ¯ææºè½ç½ç»è®¾å¤å¯¹å¤ææ¶é´åºåæ°æ®ç»æç髿ç»ç»ï¼å类设å¤å¯¹æ¶é´åºåæ°æ®çç»ç»ï¼æµ·é夿æ¶é´åºåæ°æ®ç®å½çæ¨¡ç³æç´¢çç¥ã +4. é«ååé读åãIoTDBæ¯ææ°ä»¥ç¾ä¸è®¡çä½åè设å¤çå¼ºè¿æ¥æ°æ®è®¿é®ãé«éæ°æ®è¯»åï¼éç¨äºä¸è¿°æºè½ç½ç»è®¾å¤åæ··å设å¤ã +5. 丰å¯çæ¥è¯¢è¯ä¹ãIoTDBæ¯æè·¨è®¾å¤åæµéçæ¶é´åºåæ°æ®çæ¶é´å¯¹é½ãæ¶é´åºååæ®µç计ç®(é¢å转æ¢)åæ¶é´ç»´åº¦ç丰å¯èå彿°æ¯æã +6. å¦ä¹ ææ¬é常ä½ãIoTDBæ¯æç±»ä¼¼sqlçè¯è¨ãJDBCæ åAPIåæäºä½¿ç¨çå¯¼å ¥/导åºå·¥å ·ã +7. ä¸å è¿ç弿¾æºç çæç³»ç»çæ ç¼éæãIoTDBæ¯æåæçæç³»ç»ï¼å¦HadoopãSparkåå¯è§åå·¥å ·(å¦Grafana)ã + +æå ³IoTDBçææ°ä¿¡æ¯ï¼è¯·è®¿é®[IoTDB宿¹ç½ç«](https://iotdb.apache.org/)ã妿æ¨å¨ä½¿ç¨IoTDBæ¶éå°ä»»ä½é®é¢æåç°ä»»ä½bugï¼è¯·å¨[jira]ä¸æäº¤(https://issues.apache.org/jira/projects/IOTDB/issues)ã + +<!-- TOC --> + +## ç®å½ + +- [IoTDB](#iotdb) +- [ç®ä»](#ç®ä») +- [主è¦ç¹ç¹](#主è¦ç¹ç¹) + - [ç®å½](#ç®å½) +- [å¿«éå¼å§](#å¿«éå¼å§) + - [ç¯å¢åå¤](#ç¯å¢åå¤) + - [å®è£ ](#å®è£ ) + - [仿ºç æå»º](#仿ºç æå»º) + - [é ç½®](#é ç½®) + - [å¼å§](#å¼å§) + - [å¯å¨ IoTDB](#å¯å¨-iotdb) + - [ä½¿ç¨ IoTDB](#使ç¨-iotdb) + - [ä½¿ç¨ Cli å½ä»¤è¡](#使ç¨-cli-å½ä»¤è¡) + - [åºæ¬ç IoTDB å½ä»¤](#åºæ¬ç-iotdb-å½ä»¤) + - [忢 IoTDB](#忢-iotdb) + - [åªç¼è¯ server](#åªç¼è¯-server) + - [åªç¼è¯ cli](#åªç¼è¯-cli) + - [å¯¼å ¥å¯¼åºCSVå·¥å ·](#å¯¼å ¥å¯¼åºCSVå·¥å ·) + +<!-- /TOC --> + +# å¿«éå¼å§ + +è¿ç¯ç®ççæåå°å¸¦æ¨äºè§£ä½¿ç¨IoTDBçåºæ¬è¿ç¨ãå¦éæ´è¯¦ç»çä»ç»ï¼è¯·è®¿é®æä»¬çç½ç«[ç¨æ·æå](https://iotdb.apache.org/zh/UserGuide/Master/QuickStart/QuickStart.html)ã + +## ç¯å¢åå¤ + +è¦ä½¿ç¨IoTDBï¼æ¨éè¦: +1. Java >= 1.8 (ç®å 1.8ã11 å° 17 å·²ç»è¢«éªè¯å¯ç¨ã请确ä¿ç¯åéå¢è·¯å¾å·²æ£ç¡®è®¾ç½®)ã +2. Maven >= 3.6 (妿叿仿ºä»£ç ç¼è¯åå®è£ IoTDB)ã +3. 设置 max open files 为 65535ï¼ä»¥é¿å "too many open files"é误ã +4. ï¼å¯éï¼ å° somaxconn 设置为 65535 以é¿å ç³»ç»å¨é«è´è½½æ¶åºç° "connection reset" é误ã + ``` + # Linux + > sudo sysctl -w net.core.somaxconn=65535 + + # FreeBSD or Darwin + > sudo sysctl -w kern.ipc.somaxconn=65535 + ``` + +## å®è£ + +IoTDBæä¾äºä¸ç§å®è£ æ¹æ³ï¼æ¨å¯ä»¥åè以ä¸å»ºè®®ï¼éæ©æé忍çä¸ç§: + +* 仿ºä»£ç å®è£ ã妿éè¦èªå·±ä¿®æ¹ä»£ç ï¼å¯ä»¥ä½¿ç¨æ¤æ¹æ³ã + +* ä»äºè¿å¶æä»¶å®è£ ãæ¨èçæ¹æ³æ¯ä»å®æ¹ç½ç«ä¸è½½äºè¿å¶æä»¶ï¼æ¨å°è·å¾ä¸ä¸ªå¼ç®±å³ç¨çäºè¿å¶åå¸å ã + +* 使ç¨Docker: dockerfileçè·¯å¾æ¯https://github.com/apache/iotdb/tree/master/docker/src/main + +å¨è¿ç¯ãå¿«éå ¥é¨ãä¸ï¼æä»¬ç®è¦ä»ç»å¦ä½ä½¿ç¨æºä»£ç å®è£ IoTDBãå¦éè¿ä¸æ¥èµæï¼è¯·åé å®ç½[ç¨æ·æå](https://iotdb.apache.org/zh/UserGuide/Master/QuickStart/QuickStart.html)ã + +## 仿ºç æå»º + +### å ³äºåå¤Thriftç¼è¯å¨ + +妿æ¨ä½¿ç¨Windowsï¼è¯·è·³è¿æ¤æ®µã + +æä»¬ä½¿ç¨Thriftä½ä¸ºRPCæ¨¡åæ¥æä¾å®¢æ·ç«¯-æå¡å¨é´çéä¿¡ååè®®æ¯æï¼å æ¤å¨ç¼è¯é¶æ®µæä»¬éè¦ä½¿ç¨Thrift 0.13.0 +ï¼ææ´é«ï¼ç¼è¯å¨çæå¯¹åºçJava代ç ã Thriftåªæä¾äºWindowsä¸çäºè¿å¶ç¼è¯å¨ï¼Unixä¸éè¦éè¿æºç èªè¡ç¼è¯ã + +å¦æä½ æå®è£ æéï¼å¯ä»¥éè¿`apt install`, `yum install`, `brew install`æ¥å®è£ thriftç¼è¯å¨ï¼ç¶åå¨ä¸é¢çç¼è¯å½ä»¤ä¸ +齿·»å å¦ä¸åæ°å³å¯ï¼`-Dthrift.download-url=http://apache.org/licenses/LICENSE-2.0.txt -Dthrift.exec.absolute.path=<ä½ çthrift坿§è¡æä»¶è·¯å¾>`ã + + +åæ¶æä»¬é¢å ç¼è¯äºä¸ä¸ªThriftç¼è¯å¨ï¼å¹¶å°å ¶ä¸ä¼ å°äºGitHub ï¼åå©ä¸ä¸ªMavenæä»¶ï¼å¨ç¼è¯æ¶å¯ä»¥èªå¨å°å ¶ä¸è½½ã +该é¢ç¼è¯çThriftç¼è¯å¨å¨gcc8ï¼Ubuntu, CentOS, MacOSä¸å¯ä»¥å·¥ä½ï¼ä½æ¯å¨æ´ä½çgcc +çæ¬ä»¥åå ¶ä»æä½ç³»ç»ä¸å°æªç¡®è®¤ã +妿æ¨åç°å 为ç½ç»é®é¢æ»æ¯æç¤ºä¸è½½ä¸å°thriftæä»¶ï¼é£ä¹æ¨éè¦æå¨ä¸è½½ï¼å¹¶å°ç¼è¯å¨æ¾ç½®å°ç®å½`{project_root}\thrift\target\tools\thrift_0.12.0_0.13.0_linux.exe`ã +å¦ææ¨æ¾å°å ¶ä»å°æ¹ï¼å°±éè¦å¨è¿è¡mavençå½ä»¤ä¸æ·»å ï¼`-Dthrift.download-url=http://apache.org/licenses/LICENSE-2.0.txt -Dthrift.exec.absolute.path=<ä½ çthrift坿§è¡æä»¶è·¯å¾>`ã + +妿æ¨å¯¹Mavenè¶³å¤çæï¼æ¨ä¹å¯ä»¥ç´æ¥ä¿®æ¹æä»¬çæ ¹pomæä»¶æ¥é¿å æ¯æ¬¡ç¼è¯é½ä½¿ç¨ä¸è¿°åæ°ã +Thrift宿¹ç½å为ï¼https://thrift.apache.org/ + +ä» git å éæºä»£ç : + +``` +git clone https://github.com/apache/iotdb.git +``` + +é»è®¤ç䏻忝æ¯master忝ï¼å¦æä½ æ³ä½¿ç¨æä¸ªåå¸çæ¬x.x.xï¼è¯·åæ¢ tag: + +``` +git checkout vx.x.x +``` + +æè åæ¢å¤§çæ¬æå¨åæ¯ï¼å¦ 1.0 çæ¬çåæ¯ä¸º rel/1.0 + +``` +git checkout rel/x.x +``` + +### æºç ç¼è¯ IoTDB + +å¨ iotdb æ ¹ç®å½ä¸æ§è¡: + +``` +> mvn clean package -pl distribution -am -DskipTests +``` + +ç¼è¯å®æå, IoTDB äºè¿å¶å å°çæå¨: "distribution/target". + +### åªç¼è¯ cli + +å¨ iotdb/iotdb-client ç®å½ä¸æ§è¡: + +``` +> mvn clean package -pl cli -am -DskipTests +``` + +ç¼è¯å®æå, IoTDB cli å°çæå¨ "cli/target". + +### ç¼è¯å ¶ä»æ¨¡å + +éè¿æ·»å `-P compile-cpp` å¯ä»¥è¿è¡c++客æ·ç«¯APIçç¼è¯ã + +**注æï¼"`thrift/target/generated-sources/thrift`"ï¼ "`thrift-sync/target/generated-sources/thrift`"ï¼"`thrift-cluster/target/generated-sources/thrift`"ï¼"`thrift-influxdb/target/generated-sources/thrift`" å "`antlr/target/generated-sources/antlr4`" ç®å½éè¦æ·»å å°æºä»£ç æ ¹ä¸ï¼ä»¥å å¨ IDE ä¸äº§çç¼è¯é误ã** + +**IDEAçæä½æ¹æ³ï¼å¨ä¸è¿°mavenå½ä»¤ç¼è¯å¥½åï¼å³é®é¡¹ç®åç§°ï¼éæ©"`Maven->Reload project`"ï¼å³å¯ã** + +### é ç½® + +é ç½®æä»¶å¨"conf"æä»¶å¤¹ä¸ +* ç¯å¢é 置模å(`datanode-env.bat`, `datanode-env.sh`), +* ç³»ç»é 置模å(`iotdb-datanode.properties`) +* æ¥å¿é 置模å(`logback.xml`)ã + +æå ³è¯¦ç»ä¿¡æ¯ï¼è¯·åè§[é ç½®åæ°](https://iotdb.apache.org/zh/UserGuide/Master/Reference/DataNode-Config-Manual.html)ã + +## å¼å§ + +æ¨å¯ä»¥éè¿ä»¥ä¸æ¥éª¤æ¥æµè¯å®è£ ï¼å¦ææ§è¡å没æè¿åé误ï¼å®è£ 就宿äºã + +### å¯å¨ IoTDB + +å¯ä»¥éè¿è¿è¡ sbin æä»¶å¤¹ä¸ç start-standalone èæ¬å¯å¨ 1C1D IoTDBã + +``` +# Unix/OS X +> sbin/start-standalone.sh + +# Windows +> sbin\start-standalone.bat +``` + +### ä½¿ç¨ IoTDB + +#### ä½¿ç¨ Cli å½ä»¤è¡ + +IoTDBæä¾äºä¸æå¡å¨äº¤äºçä¸åæ¹å¼ï¼è¿éæä»¬å°ä»ç»ä½¿ç¨ Cli å·¥å ·æå ¥åæ¥è¯¢æ°æ®çåºæ¬æ¥éª¤ã + +å®è£ IoTDB åï¼æä¸ä¸ªé»è®¤çç¨æ·`root`ï¼å®çé»è®¤å¯ç 乿¯`root`ãç¨æ·å¯ä»¥ä½¿ç¨è¿ä¸ª +é»è®¤ç¨æ·ç»å½ Cli å¹¶ä½¿ç¨ IoTDBãCli çå¯å¨èæ¬æ¯ sbin æä»¶å¤¹ä¸ç start-cli èæ¬ã +卿§è¡èæ¬æ¶ï¼ç¨æ·åºè¯¥æå® IPï¼ç«¯å£ï¼USER_NAME å å¯ç ãé»è®¤åæ°ä¸º`-h 127.0.0.1 -p 6667 -u root -pw root`ã + + +ä¸é¢æ¯å¯å¨ Cli çå½ä»¤: + +``` +# Unix/OS X +> sbin/start-cli.sh -h 127.0.0.1 -p 6667 -u root -pw root + +# Windows +> sbin\start-cli.bat -h 127.0.0.1 -p 6667 -u root -pw root +``` + +å½ä»¤è¡å®¢æ·ç«¯æ¯äº¤äºå¼çï¼æä»¥å¦æä¸åå°±ç»ªï¼æ¨åºè¯¥çå°æ¬¢è¿æ å¿å声æ: + +``` + _____ _________ ______ ______ +|_ _| | _ _ ||_ _ `.|_ _ \ + | | .--.|_/ | | \_| | | `. \ | |_) | + | | / .'`\ \ | | | | | | | __'. + _| |_| \__. | _| |_ _| |_.' /_| |__) | +|_____|'.__.' |_____| |______.'|_______/ version x.x.x + + +IoTDB> login successfully +IoTDB> +``` + +#### åºæ¬ç IoTDB å½ä»¤ + +ç°å¨ï¼è®©æä»¬ä»ç»å建 timeseriesãæå ¥æ°æ®åæ¥è¯¢æ°æ®çæ¹æ³ã + + +IoTDBä¸çæ°æ®ç»ç»ä¸º timeseriesãæ¯ä¸ª timeseries å å«å¤ä¸ª`æ°æ®-æ¶é´`对ï¼ç±ä¸ä¸ª database æ¥æã +å¨å®ä¹ timeseries ä¹åï¼æä»¬åºè¯¥å ä½¿ç¨ CREATE DATABASE æ¥å建ä¸ä¸ªæ°æ®åºï¼ä¸é¢æ¯ä¸ä¸ªä¾å: + +``` +IoTDB> CREATE DATABASE root.ln +``` + +æä»¬ä¹å¯ä»¥ä½¿ç¨`SHOW DATABASES`æ¥æ£æ¥å·²åå»ºçæ°æ®åº: + +``` +IoTDB> SHOW DATABASES ++--------+ +|Database| ++--------+ +| root.ln| ++--------+ +Total line number = 1 +``` + +å¨è®¾ç½® database ä¹åï¼æä»¬å¯ä»¥ä½¿ç¨CREATE TIMESERIESæ¥å建ä¸ä¸ªæ°çTIMESERIESã +å¨å建 timeseries æ¶ï¼æä»¬åºè¯¥å®ä¹å®çæ°æ®ç±»ååç¼ç æ¹æ¡ãè¿éæä»¬å建两个 timeseries: + + +``` +IoTDB> CREATE TIMESERIES root.ln.wf01.wt01.status WITH DATATYPE=BOOLEAN, ENCODING=PLAIN +IoTDB> CREATE TIMESERIES root.ln.wf01.wt01.temperature WITH DATATYPE=FLOAT, ENCODING=RLE +``` + +ä¸ºäºæ¥è¯¢ç¹å®çtimeseriesï¼æä»¬å¯ä»¥ä½¿ç¨ `SHOW TIMESERIES <Path>`. <Path> 表示被æ¥è¯¢ç timeseries çè·¯å¾. é»è®¤å¼æ¯`null`, 表示æ¥è¯¢ç³»ç»ä¸ææç timeseries (å`SHOW TIMESERIES root`). +以䏿¯ä¸äºç¤ºä¾: + +1. æ¥è¯¢ç³»ç»ä¸ææ timeseries: + +``` +IoTDB> SHOW TIMESERIES ++-----------------------------+-----+-------------+--------+--------+-----------+----+----------+ +| timeseries|alias|database|dataType|encoding|compression|tags|attributes| ++-----------------------------+-----+-------------+--------+--------+-----------+----+----------+ +|root.ln.wf01.wt01.temperature| null| root.ln| FLOAT| RLE| SNAPPY|null| null| +| root.ln.wf01.wt01.status| null| root.ln| BOOLEAN| PLAIN| SNAPPY|null| null| ++-----------------------------+-----+-------------+--------+--------+-----------+----+----------+ +Total line number = 2 +``` + +2. æ¥è¯¢æå®ç timeseries(root.ln.wf01.wt01.status): + +``` +IoTDB> SHOW TIMESERIES root.ln.wf01.wt01.status ++------------------------+-----+-------------+--------+--------+-----------+----+----------+ +| timeseries|alias|database|dataType|encoding|compression|tags|attributes| ++------------------------+-----+-------------+--------+--------+-----------+----+----------+ +|root.ln.wf01.wt01.status| null| root.ln| BOOLEAN| PLAIN| SNAPPY|null| null| ++------------------------+-----+-------------+--------+--------+-----------+----+----------+ +Total line number = 1 +``` + +æå ¥ timeseries æ°æ®æ¯IoTDBçä¸ä¸ªåºæ¬æä½ï¼ä½ å¯ä»¥ä½¿ç¨`INSERT` å½ä»¤æ¥å®æè¿ä¸ªæä½ã +å¨æå ¥ä¹åï¼æ¨åºè¯¥æå®æ¶é´æ³ååç¼è·¯å¾å: + +``` +IoTDB> INSERT INTO root.ln.wf01.wt01(timestamp,status) values(100,true); +IoTDB> INSERT INTO root.ln.wf01.wt01(timestamp,status,temperature) values(200,false,20.71) +``` + +ä½ åææå ¥çæ°æ®ä¼æ¾ç¤ºå¦ä¸: + +``` +IoTDB> SELECT status FROM root.ln.wf01.wt01 ++-----------------------------+------------------------+ +| Time|root.ln.wf01.wt01.status| ++-----------------------------+------------------------+ +|1970-01-01T08:00:00.100+08:00| true| +|1970-01-01T08:00:00.200+08:00| false| ++-----------------------------+------------------------+ +Total line number = 2 +``` + +æ¨è¿å¯ä»¥ä½¿ç¨ä¸æ¡SQLè¯å¥æ¥è¯¢å¤ä¸ª timeseries æ°æ®: + +``` +IoTDB> SELECT * FROM root.ln.wf01.wt01 ++-----------------------------+-----------------------------+------------------------+ +| Time|root.ln.wf01.wt01.temperature|root.ln.wf01.wt01.status| ++-----------------------------+-----------------------------+------------------------+ +|1970-01-01T08:00:00.100+08:00| null| true| +|1970-01-01T08:00:00.200+08:00| 20.71| false| ++-----------------------------+-----------------------------+------------------------+ +Total line number = 2 +``` + +妿éè¦ä¿®æ¹ Cli ä¸çæ¶åºï¼æ¨å¯ä»¥ä½¿ç¨ä»¥ä¸è¯å¥: + +``` +IoTDB> SET time_zone=+00:00 +Time zone has set to +00:00 +IoTDB> SHOW time_zone +Current time zone: Z +``` + +ä¹åæ¥è¯¢ç»æå°ä¼ä»¥æ´æ°åçæ°æ¶åºæ¾ç¤º: + +``` +IoTDB> SELECT * FROM root.ln.wf01.wt01 ++------------------------+-----------------------------+------------------------+ +| Time|root.ln.wf01.wt01.temperature|root.ln.wf01.wt01.status| ++------------------------+-----------------------------+------------------------+ +|1970-01-01T00:00:00.100Z| null| true| +|1970-01-01T00:00:00.200Z| 20.71| false| ++------------------------+-----------------------------+------------------------+ +Total line number = 2 +``` + +ä½ å¯ä»¥ä½¿ç¨å¦ä¸å½ä»¤éåº: + +``` +IoTDB> quit +or +IoTDB> exit +``` + +æå ³IoTDB SQLæ¯æçå½ä»¤çæ´å¤ä¿¡æ¯ï¼è¯·åè§[ç¨æ·æå](https://iotdb.apache.org/zh/UserGuide/Master/QuickStart/QuickStart.html)ã + +### 忢 IoTDB + +server å¯ä»¥ä½¿ç¨ "ctrl-C" æè æ§è¡ä¸é¢çèæ¬: + +``` +# Unix/OS X +> sbin/stop-standalone.sh + +# Windows +> sbin\stop-standalone.bat +``` + +# å¯¼å ¥å¯¼åºCSVå·¥å · + +æ¥ç [å¯¼å ¥å¯¼åºCSVå·¥å ·](https://iotdb.apache.org/zh/UserGuide/Master/Maintenance-Tools/CSV-Tool.html) + +# 常è§ç¼è¯é误 +æ¥ç [常è§ç¼è¯é误](https://iotdb.apache.org/zh/Development/ContributeGuide.html#%E5%B8%B8%E8%A7%81%E7%BC%96%E8%AF%91%E9%94%99%E8%AF%AF) + +# èç³»æä»¬ +### QQ群 + +* Apache IoTDB 交æµç¾¤ï¼659990460 + +### Wechat Group + +* æ·»å 好å `tietouqiao` æè `liutaohua001`ï¼æä»¬ä¼é请æ¨è¿ç¾¤ + +### Slack + +* https://join.slack.com/t/apacheiotdb/shared_invite/zt-qvso1nj8-7715TpySZtZqmyG5qXQwpg + +è·åæ´å¤å 容ï¼è¯·æ¥ç [å å ¥ç¤¾åº](https://github.com/apache/iotdb/issues/1995)