Skip to content
Permalink
Browse files
Merge branch 'master' of https://github.com/apache/incubator-iotdb in…
…to xuekaifeng-spark-connector
  • Loading branch information
SilverNarcissus committed Aug 21, 2019
2 parents 210f10e + 821a3b2 commit e402f379c360a225d5a46ae1f19c2f5f4a588d91
Show file tree
Hide file tree
Showing 132 changed files with 3,705 additions and 747 deletions.
@@ -4,7 +4,6 @@
**/lib/**
**/data/**

tsfile/src/test/resources/perTestInputData
# Eclipse IDE files
**/.classpath
**/.project
@@ -84,4 +83,4 @@ grafana/data/test.csv
tsfile/src/test/resources/*.ts

### Apache release ###
local-snapshots-dir/
local-snapshots-dir/
@@ -210,25 +210,6 @@ conditions of the following licenses.

================================================================

The following classes are modified from Apache Hive, which is under Apache License 2.0:

./server/src/main/java/org/apache/iotdb/db/sql/parse/AstErrorNode.java
./server/src/main/java/org/apache/iotdb/db/sql/parse/AstNode.java
./server/src/main/java/org/apache/iotdb/db/sql/parse/AstNodeOrigin.java
./server/src/main/java/org/apache/iotdb/db/sql/parse/Node.java
./server/src/main/java/org/apache/iotdb/db/sql/parse/ParseDriver.java
./server/src/main/java/org/apache/iotdb/db/sql/parse/ParseError.java
./server/src/main/java/org/apache/iotdb/db/sql/parse/ParseException.java
./server/src/main/java/org/apache/iotdb/db/sql/parse/ParseUtils.java

------------

The following class is modified from Maven Wrapper:

./.mvn/wrapper/MavenWrapperDownloader.java

================================================================

The binary distribution of this product bundles these dependencies under the
following license. See licenses/ for text of these licenses.

6 NOTICE
@@ -1,5 +1,5 @@
Apache IoTDB
Copyright 2018 and onwards The Apache Software Foundation.
Copyright 2019 and onwards The Apache Software Foundation.

This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
@@ -10,7 +10,7 @@ IoTDB project uses 4 Chinese Patents:
* 201711384490X
* 201810111712.9
* 201711322631.5
* 201711319331.1
* 201711319331

According to the Apache 2.0 License. The owner of the patents, Tsinghua University,
grant the users the right to the use of patent under the requirement of Apache 2.0 License.
@@ -20,7 +20,7 @@ grant the users the right to the use of patent under the requirement of Apache 2
This product contains a modified portion of 'Apache Hive'

Apache Hive
Copyright 2008-2018 The Apache Software Foundation
Copyright 2008-2019 The Apache Software Foundation

This product includes software developed by The Apache Software
Foundation (http://www.apache.org/).
@@ -1,5 +1,5 @@
Apache IoTDB
Copyright 2018 and onwards The Apache Software Foundation.
Copyright 2019 and onwards The Apache Software Foundation.

This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
@@ -50,7 +50,8 @@ For the latest information about IoTDB, please visit our [IoTDB official website

# Prerequisites

IoTDB requires Java (>= 1.8), To use IoTDB, JRE should be installed.
IoTDB requires Java (>= 1.8).
To use IoTDB, JRE should be installed. To compile IoTDB, JDK should be installed.

If you want to compile and install IoTDB from source code, JDK and Maven (>= 3.1) are required.
While Maven is not mandatory to be installed standalone, you can use the provided Maven wrapper, `./mvnw.sh` on Linux/OS X or `.\mvnw.cmd` on Windows, to facilitate development.
@@ -85,9 +86,9 @@ incubator-iotdb/ <-- root path
+- pom.xml
```

Let $IOTDB_HOME = /workspace/incubator-iotdb/server/iotdb/
Let `$IOTDB_HOME = /workspace/incubator-iotdb/server/target/iotdb-server-{project.version}`

Let $IOTDB_CLI_HOME = /workspace/incubator-iotdb/client/cli
Let `$IOTDB_CLI_HOME = /workspace/incubator-iotdb/client/target/iotdb-client-{project.version}`

Note:
* if `IOTDB_HOME` is not explicitly assigned,
@@ -132,10 +133,10 @@ If successful, you will see the the following text in the terminal:

Otherwise, you may need to check the error statements and fix the problems.

After build, the IoTDB project will be at the folder "server/iotdb". The folder will include the following contents:
After build, the IoTDB project will be at the folder "server/target/iotdb-server-{project.version}". The folder will include the following contents:

```
server/iotdb/ <-- root path
server/target/iotdb-server-{project.version} <-- root path
|
+- sbin/ <-- script files for starting and stopping the server
|
@@ -146,11 +147,13 @@ server/iotdb/ <-- root path
+- lib/ <-- project dependencies
```

> NOTE: Directories "service-rpc/target/generated-sources/thrift" and "server/target/generated-sources/antlr3" need to be added to sources roots to avoid compilation errors.
## Configure

Before starting to use IoTDB, you need to config the configuration files first. For your convenience, we have already set the default config in the files.

In total, we provide users three kinds of configurations module: environment config module (iotdb-env.bat, iotdb-env.sh), system config module (tsfile-format.properties, iotdb-engine.properties) and log config module (logback.xml). All of these kinds of configuration files are put in iotdb/config folder.
In total, we provide users three kinds of configurations module: environment config module (`iotdb-env.bat`, `iotdb-env.sh`), system config module (`tsfile-format.properties`, `iotdb-engine.properties`) and log config module (`logback.xml`). All of these kinds of configuration files are put in iotdb/config folder.

For more, you are advised to check our documentation [Chapter4: Deployment and Management](https://iotdb.apache.org/#/Documents/0.8.0/chap4/sec1) in detail.

@@ -190,7 +193,11 @@ Now let's trying to read and write some data from IoTDB using our Client. To sta
/workspace/incubator-iotdb
> mvn clean package -pl client -am -Dmaven.test.skip=true
```

After build, the IoTDB client will be at the folder "client/target/iotdb-client-{project.version}".

```
# Unix/OS X
> $IOTDB_CLI_HOME/sbin/start-client.sh -h <IP> -p <PORT> -u <USER_NAME>
@@ -221,47 +228,49 @@ But lets try something slightly more interesting:

```
IoTDB> SET STORAGE GROUP TO root.vehicle
execute successfully.
It costs xxxs
IoTDB> CREATE TIMESERIES root.vehicle.d0.s0 WITH DATATYPE=INT32, ENCODING=RLE
execute successfully.
It costs xxxs
```
Till now, we have already create a table called root.vehicle and add a column called d0.s0 in the table. Let's take a look at what we have done by 'SHOW TIMESERIES' command.

```
IoTDB> SHOW TIMESERIES
=== Timeseries Tree ===
root:{
vehicle:{
d0:{
s0:{
DataType: INT32,
Encoding: RLE,
Compressor: UNCOMPRESSED,
args: {},
StorageGroup: root.vehicle
}
{
"root":{
"vehicle":{
"d0":{
"s0":{
"args":"{}",
"StorageGroup":"root.vehicle",
"DataType":"INT32",
"Compressor":"UNCOMPRESSED",
"Encoding":"RLE"
}
}
}
}
}
}
```
Insert time series data is the basic operation of IoTDB, you can use 'INSERT' command to finish this:

```
IoTDB> insert into root.vehicle.d0(timestamp,s0) values(1,101);
execute successfully.
It costs xxxs
```
The data we've just inserted displays like this:

```
IoTDB> SELECT d0.s0 FROM root.vehicle
+-----------------------+------------------+
| Time|root.vehicle.d0.s0|
+-----------------------+------------------+
|1970-01-01T08:00:00.001| 101|
+-----------------------+------------------+
record number = 1
execute successfully.
+-----------------------------+------------------+
| Time|root.vehicle.d0.s0|
+-----------------------------+------------------+
|1970-01-01T08:00:00.001+08:00| 101|
+-----------------------------+------------------+
Total line number = 1
It costs xxxs
```

If your session looks similar to what's above, congrats, your IoTDB is operational!
@@ -305,4 +314,4 @@ CREATE TIMESERIES root.fit.p.s1 WITH DATATYPE=INT32,ENCODING=RLE;
# Windows
> $IOTDB_CLI_HOME\tools\export-csv.bat -h <ip> -p <port> -u <username> -pw <password> -td <xxx.csv> [-tf <time-format>]
```
```
@@ -31,8 +31,6 @@
<name>IoTDB Client</name>
<description>A Client tool.</description>
<properties>
<common.cli.version>1.3.1</common.cli.version>
<jline.version>2.14.5</jline.version>
<cli.test.skip>false</cli.test.skip>
<cli.it.skip>${cli.test.skip}</cli.it.skip>
<cli.ut.skip>${cli.test.skip}</cli.ut.skip>
@@ -41,68 +39,27 @@
<dependency>
<groupId>org.apache.iotdb</groupId>
<artifactId>iotdb-jdbc</artifactId>
<version>${project.version}</version>
<version>0.9.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<version>${common.cli.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.1</version>
</dependency>
<dependency>
<groupId>me.tongfei</groupId>
<artifactId>progressbar</artifactId>
<version>0.7.3</version>
</dependency>
<dependency>
<groupId>jline</groupId>
<artifactId>jline</artifactId>
<version>${jline.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets>
<fileset>
<directory>${project.basedir}/cli/lib</directory>
<includes>
<include>**/*.jar</include>
</includes>
<followSymlinks>false</followSymlinks>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.basedir}/cli/lib</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<outputDirectory>${project.basedir}/cli/lib</outputDirectory>
</configuration>
</plugin>
<!--using `mvn test` to run UT, `mvn verify` to run ITs
Reference: https://antoniogoncalves.org/2012/12/13/lets-turn-integration-tests-with-maven-to-a-first-class-citizen/-->
<plugin>
@@ -130,6 +87,26 @@
<skipITs>${cli.it.skip}</skipITs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<!-- Package binaries-->
<execution>
<id>client-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>src/assembly/client.xml</descriptor>
</descriptors>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<assembly>
<id>client</id>
<formats>
<format>dir</format>
<format>zip</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<dependencySets>
<dependencySet>
<outputDirectory>lib</outputDirectory>
</dependencySet>
</dependencySets>
<fileSets>
<fileSet>
<directory>src/assembly/resources</directory>
<outputDirectory>/</outputDirectory>
</fileSet>
</fileSets>
</assembly>
File renamed without changes.
@@ -19,10 +19,6 @@
#


echo ---------------------
echo Starting IoTDB Client
echo ---------------------

if [ -z "${IOTDB_CLI_HOME}" ]; then
export IOTDB_CLI_HOME="$(cd "`dirname "$0"`"/..; pwd)"
fi
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit e402f37

Please sign in to comment.