• Stars
    star
    3,000
  • Rank 14,397 (Top 0.3 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created over 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Apache IoTDB

English | 中文

IoTDB

Main Mac and Linux Main Win GitHub release License Language grade: Java IoTDB Website Maven Version Gitpod Ready-to-Code Slack Status

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. If you encounter any problems or identify any bugs while using IoTDB, please report an issue in jira.

Outline

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.

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
    

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

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.

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 root path of iotdb:

> 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.

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 . 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
  1. 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.

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

Frequent Questions for Compiling

see 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

see Join the community for more!

More Repositories

1

echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
TypeScript
56,321
star
2

superset

Apache Superset is a Data Visualization and Data Exploration Platform
TypeScript
55,051
star
3

dubbo

The java implementation of Apache Dubbo. An RPC and microservice framework.
Java
39,899
star
4

spark

Apache Spark - A unified analytics engine for large-scale data processing
Scala
36,719
star
5

airflow

Apache Airflow - A platform to programmatically author, schedule, and monitor workflows
Python
33,999
star
6

kafka

Mirror of Apache Kafka
Java
27,068
star
7

incubator-seata

🔥 Seata is an easy-to-use, high-performance, open source distributed transaction solution.
Java
24,602
star
8

skywalking

APM, Application Performance Monitoring System
Java
22,610
star
9

flink

Apache Flink
Java
22,197
star
10

mxnet

Lightweight, Portable, Flexible Distributed/Mobile Deep Learning with Dynamic, Mutation-aware Dataflow Dep Scheduler; for Python, R, Julia, Scala, Go, Javascript and more
C++
20,572
star
11

shardingsphere

Distributed SQL transaction & query engine for data sharding, scaling, encryption, and more - on any database.
Java
19,287
star
12

rocketmq

Apache RocketMQ is a cloud native messaging and streaming platform, making it simple to build event-driven applications.
Java
18,578
star
13

brpc

brpc is an Industrial-grade RPC framework using C++ Language, which is often used in high performance system such as Search, Storage, Machine learning, Advertisement, Recommendation etc. "brpc" means "better RPC".
C++
14,261
star
14

incubator-weex

Apache Weex (Incubating)
C++
13,884
star
15

hadoop

Apache Hadoop
Java
13,855
star
16

arrow

Apache Arrow is a multi-language toolbox for accelerated data interchange and in-memory processing
C++
13,226
star
17

pulsar

Apache Pulsar - distributed pub-sub messaging system
Java
13,062
star
18

druid

Apache Druid: a high performance real-time analytics database.
Java
12,843
star
19

predictionio

PredictionIO, a machine learning server for developers and ML engineers.
Scala
12,556
star
20

zookeeper

Apache ZooKeeper
Java
11,532
star
21

doris

Apache Doris is an easy-to-use, high performance and unified analytics database.
Java
11,180
star
22

apisix

The Cloud-Native API Gateway
Lua
11,031
star
23

incubator-answer

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.
Go
10,948
star
24

thrift

Apache Thrift
C++
9,900
star
25

dolphinscheduler

Apache DolphinScheduler is the modern data workflow orchestration platform with powerful user interface, dedicated to solving complex task dependencies in the data pipeline and providing various types of jobs available `out of the box`
Java
9,619
star
26

cassandra

Mirror of Apache Cassandra
Java
8,187
star
27

shardingsphere-elasticjob

Distributed scheduled job
Java
7,965
star
28

tvm

Open deep learning compiler stack for cpu, gpu and specialized accelerators
Python
7,828
star
29

shenyu

Apache ShenYu is a Java native API Gateway for service proxy, protocol conversion and API governance.
Java
7,541
star
30

beam

Apache Beam is a unified programming model for Batch and Streaming data processing.
Java
7,410
star
31

jmeter

Apache JMeter open-source load testing tool for analyzing and measuring the performance of a variety of services
Java
7,335
star
32

tomcat

Apache Tomcat
Java
6,926
star
33

storm

Apache Storm
Java
6,480
star
34

zeppelin

Web-based notebook that enables data-driven, interactive data analytics and collaborative documents with SQL, Scala and more.
Java
6,162
star
35

openwhisk

Apache OpenWhisk is an open source serverless cloud platform
Scala
6,130
star
36

couchdb

Seamless multi-master syncing database with an intuitive HTTP/JSON API, designed for reliability
Erlang
5,810
star
37

incubator-kie-drools

Drools is a rule engine, DMN engine and complex event processing (CEP) engine for Java.
Java
5,542
star
38

iceberg

Apache Iceberg
Java
5,504
star
39

dubbo-spring-boot-project

Spring Boot Project for Apache Dubbo
Java
5,355
star
40

mesos

Apache Mesos
Java
5,111
star
41

hive

Apache Hive
Java
5,053
star
42

camel

Apache Camel is an open source integration framework that empowers you to quickly and easily integrate various systems consuming or producing data.
Java
5,042
star
43

groovy

Apache Groovy: A powerful multi-faceted programming language for the JVM platform
Java
4,977
star
44

hbase

Apache HBase
Java
4,971
star
45

incubator-weex-ui

🏄 A rich interaction, lightweight, high performance UI library based on Weex.
Vue
4,788
star
46

pinot

Apache Pinot - A realtime distributed OLAP datastore
Java
4,766
star
47

ignite

Apache Ignite
Java
4,548
star
48

rocketmq-externals

Mirror of Apache RocketMQ (Incubating)
Java
4,474
star
49

seatunnel

SeaTunnel is a distributed, high-performance data integration platform for the synchronization and transformation of massive data (offline & real-time).
Java
4,459
star
50

incubator-pagespeed-ngx

Automatic PageSpeed optimization module for Nginx
C++
4,381
star
51

lucene-solr

Apache Lucene and Solr open-source search software
4,349
star
52

dubbo-go

Go Implementation For Apache Dubbo
Go
4,315
star
53

shiro

Apache Shiro
Java
4,164
star
54

calcite

Apache Calcite
Java
4,028
star
55

nifi

Apache NiFi
Java
4,006
star
56

maven

Apache Maven core
Java
3,836
star
57

hudi

Upserts, Deletes And Incremental Processing on Big Data.
Java
3,804
star
58

dubbo-admin

The ops and reference implementation for Apache Dubbo
Java
3,707
star
59

incubator-heron

Apache Heron (Incubating) is a realtime, distributed, fault-tolerant stream processing engine from Twitter
Java
3,646
star
60

cordova-android

Apache Cordova Android
JavaScript
3,539
star
61

kylin

Apache Kylin
Java
3,526
star
62

httpd

Mirror of Apache HTTP Server. Issues: http://issues.apache.org
C
3,376
star
63

linkis

Apache Linkis builds a computation middleware layer to facilitate connection, governance and orchestration between the upper applications and the underlying data engines.
Java
3,224
star
64

incubator-kie-optaplanner

AI constraint solver in Java to optimize the vehicle routing problem, employee rostering, task assignment, maintenance scheduling, conference scheduling and other planning problems.
Java
3,152
star
65

logging-log4j2

Apache Log4j 2 is a versatile, feature-rich, efficient logging API and backend for Java.
Java
3,151
star
66

arrow-datafusion

Apache Arrow DataFusion SQL Query Engine
Rust
2,998
star
67

curator

Apache Curator
Java
2,997
star
68

singa

a distributed deep learning platform
C++
2,968
star
69

incubator-streampark

StreamPark, Make stream processing easier! easy-to-use streaming application development framework and operation platform
Scala
2,820
star
70

nutch

Apache Nutch is an extensible and scalable web crawler
Java
2,653
star
71

guacamole-server

Mirror of Apache Guacamole Server
C
2,601
star
72

avro

Apache Avro is a data serialization system.
Java
2,571
star
73

incubator-fury

A blazingly fast multi-language serialization framework powered by JIT and zero-copy.
Java
2,570
star
74

commons-lang

Apache Commons Lang
Java
2,539
star
75

netbeans

Apache NetBeans
Java
2,532
star
76

flume

Mirror of Apache Flume
Java
2,458
star
77

incubator-devlake

Apache DevLake is an open-source dev data platform to ingest, analyze, and visualize the fragmented data from DevOps tools, extracting insights for engineering excellence, developer experience, and community growth.
Go
2,424
star
78

geode

Apache Geode
Java
2,244
star
79

incubator-seata-samples

seata-samples
Java
2,196
star
80

maven-mvnd

Apache Maven Daemon
Java
2,191
star
81

activemq

Mirror of Apache ActiveMQ
Java
2,184
star
82

gobblin

A distributed data integration framework that simplifies common aspects of big data integration such as data ingestion, replication, organization and lifecycle management for both streaming and batch data ecosystems.
Java
2,183
star
83

incubator-hugegraph

A graph database that supports more than 100+ billion data, high performance and scalability (Include OLTP Engine & REST-API & Backends)
Java
2,156
star
84

parquet-mr

Apache Parquet
Java
2,153
star
85

incubator-kvrocks

Kvrocks is a distributed key value NoSQL database that uses RocksDB as storage engine and is compatible with Redis protocol.
C++
2,147
star
86

pdfbox

Mirror of Apache PDFBox
Java
2,131
star
87

cordova-ios

Apache Cordova iOS
JavaScript
2,130
star
88

mahout

Mirror of Apache Mahout
Java
2,095
star
89

lucenenet

Apache Lucene.NET
C#
2,031
star
90

ambari

Apache Ambari simplifies provisioning, managing, and monitoring of Apache Hadoop clusters.
Java
1,990
star
91

libcloud

Apache Libcloud is a Python library which hides differences between different cloud provider APIs and allows you to manage different cloud resources through a unified and easy to use API.
Python
1,956
star
92

incubator-pegasus

Apache Pegasus - A horizontally scalable, strongly consistent and high-performance key-value store
C++
1,943
star
93

tika

The Apache Tika toolkit detects and extracts metadata and text from over a thousand different file types (such as PPT, XLS, and PDF).
Java
1,860
star
94

drill

Apache Drill is a distributed MPP query layer for self describing data
Java
1,841
star
95

dubbo-samples

samples for Apache Dubbo
Java
1,839
star
96

servicecomb-java-chassis

ServiceComb Java Chassis is a Software Development Kit (SDK) for rapid development of microservices in Java, providing service registration, service discovery, dynamic routing, and service management features
Java
1,829
star
97

tinkerpop

Apache TinkerPop - a graph computing framework
Java
1,825
star
98

bookkeeper

Apache BookKeeper - a scalable, fault tolerant and low latency storage service optimized for append-only workloads
Java
1,785
star
99

rocketmq-spring

Apache RocketMQ Spring Integration
Java
1,775
star
100

kudu

Mirror of Apache Kudu
C++
1,743
star