github URL: https://github.com/apache/incubator-iotdb
Clone project
git clone https://github.com/apache/incubator-iotdb.git
or
git clone [email protected]:apache/incubator-iotdb.git
idea open the project
open -> select the project root directory
If the maven project is not recognized, import the maven project and add the pom
Choose pom
Project packaging
If you have installed maven 3.1 or higher, you can package it directly with the command:
mvn clean package -Dmaven.test.skip=true
If maven is not installed, you can also use the script we provide to package:
./mvnw clean package -Dmaven.test.skip=true
The compiled binary package is in distribution/target/apache-iotdb-xxx-SNAPSHOT-incubating-bin.zip, which can be decompressed and used
Note that this is only a binary package, decompression is a database.
If this problem occurs during compilation:
You can change the version of maven-download-plugin in the pom of the root directory to 1.3.0
Client development
Our client has two modules, jdbc and session, among which session is the nosql interface, which has relatively high performance. There is a folder called example in the root directory, which contains various sample codes for reference.
The released version of the maven library is available online and can be downloaded directly through the pom dependency.
<dependency>
<groupId>org.apache.iotdb</groupId>
<artifactId>iotdb-jdbc</artifactId>
<version>0.8.0</version>
</dependency>
If it is an unreleased version, you need to install the maven library locally. The following command will install various maven libraries of iotdb locally.
mvn clean install -DskipTests
Then you can rely on it in the program. Note that the installed version must be consistent with the one written here. Generally speaking, the SNAPSHOT version is not released. You can check the pom in each module.
<dependency>
<groupId>org.apache.iotdb</groupId>
<artifactId>iotdb-session</artifactId>
<version>0.9.0-SNAPSHOT</version>
</dependency>
Run and debug
The project is packaged as a runnable jar package. If you want to run and debug in the idea, you also need to configure it (0.10 and previous versions):
In the service-rpc / target / generated- sources / thrift and server / target / generated-sources / antlr4 two directories right, Mark Directory as -> Sources Root
(Version 0.11 and later)
in thrift / target / generated-sources / thrift and antlr / target / generated-sources / antlr4 two directories, right, Mark Directory as -> Sources Root
Server main class: org.apache.iotdb.db.service.IoTDB
client main class: org.apache.iotdb.client.Client (linux), org.apache.iotdb.client.WinClient (windows)
Run test cases
Then you can run the test. Take the tsfile module as an example, right click on src/test/java, and Run All Tests
The tsfile module is the basic module