Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
15bc593
Compatible influxdb protocol
jun0315 Sep 14, 2021
7d42836
Add apache license
jun0315 Sep 14, 2021
d5e0a2e
Autogen antlr4 code
jun0315 Sep 14, 2021
d5ac11e
Format code and Adjust dependent version
jun0315 Sep 15, 2021
b972945
[IOTDB-1689] revise the Chinese notes into English
jun0315 Sep 23, 2021
df8c6db
[IOTDB-1689] spotless apply format code
jun0315 Sep 23, 2021
b41c3ca
[IOTDB-1689] implements influxdb interface
jun0315 Sep 24, 2021
916514f
[IOTDB-1689] modify readme support function
jun0315 Sep 24, 2021
411d874
[IOTDB-1689] use iotdb built-in func
jun0315 Sep 24, 2021
bab4ee0
[IOTDB-1689] add integration test and fix bugs
jun0315 Sep 24, 2021
3da4af9
[IOTDB-1689] add workflow it
jun0315 Sep 24, 2021
94087a3
[IOTDB-1689] add workflow file
jun0315 Sep 24, 2021
2a53d22
Merge branch 'master' into influxdb-connect
jun0315 Sep 24, 2021
9cd8f34
[IOTDB-1689] add licenses
jun0315 Sep 24, 2021
80ac469
[IOTDB-1689] build distribution zip
jun0315 Sep 24, 2021
61919d3
[IOTDB-1689] modify bash
jun0315 Sep 24, 2021
bb5e4a8
[IOTDB-1689] avoid test influxdb
jun0315 Sep 24, 2021
4ed43a9
[IOTDB-1689] modify maven version
jun0315 Sep 24, 2021
1035e7e
[IOTDB-1689] add factory
jun0315 Sep 24, 2021
c211575
[IOTDB-1689] spotless apply
jun0315 Sep 24, 2021
e063be2
[IOTDB-1689] add license
jun0315 Sep 24, 2021
d414314
[IOTDB-1689] spotless apply
jun0315 Sep 25, 2021
4d4c8f4
[IOTDB-1689] fix bugs
jun0315 Sep 26, 2021
7011b1b
[IOTDB-1689] modify IoTDB name
jun0315 Sep 26, 2021
ce0181b
[IOTDB-1689] fix bugs
jun0315 Sep 27, 2021
2a83a44
[IOTDB-1689] remove useless g4
jun0315 Sep 27, 2021
7aaf5cf
[IOTDB-1689] rename file name and remove unless g4
jun0315 Sep 27, 2021
4595a54
[IOTDB-1689] revise the Chinese note into English
jun0315 Sep 28, 2021
849ce28
Update docs/zh/UserGuide/API/IoTDB-InfluxDB.md
SteveYurongSu Sep 29, 2021
26b61e3
[IOTDB-1689] modify image src
jun0315 Sep 29, 2021
92164b4
add iotdb-influxdb as a sub module of iotdb
SteveYurongSu Sep 29, 2021
6d7c1c8
remvoe necessary code
SteveYurongSu Sep 29, 2021
28a62c2
[IOTDB-1689]remove unless readme
jun0315 Sep 30, 2021
dc66521
spotless:apply
SteveYurongSu Oct 4, 2021
cea8f49
Merge branch 'influxdb-connect' of github.com:jun0315/iotdb into infl…
SteveYurongSu Oct 4, 2021
c9173a9
refactor structure
SteveYurongSu Oct 4, 2021
83d64ba
Merge pull request #1 from jun0315/influxdb-connect-steve
jun0315 Oct 6, 2021
d2a947d
modify package name and UserGuide
jun0315 Oct 6, 2021
32a899a
remove unnecessary code
jun0315 Oct 6, 2021
b686b11
remove unnecessary code
jun0315 Oct 6, 2021
5b79a11
Merge branch 'master' into influxdb-frame
jun0315 Oct 6, 2021
3873632
frame code
jun0315 Oct 7, 2021
77e52a8
remove g4
jun0315 Oct 7, 2021
3c4e005
remove notes
jun0315 Oct 7, 2021
6ac5ed3
modify workflow file
jun0315 Oct 7, 2021
62dbaa9
modify workflow file
jun0315 Oct 7, 2021
f34cc5e
add close func
jun0315 Oct 7, 2021
600fe9c
modify workflow yml
jun0315 Oct 7, 2021
3c62451
fix bugs
jun0315 Oct 7, 2021
edc93ef
add ut skip
jun0315 Oct 7, 2021
dba27a0
spotless apply
jun0315 Oct 7, 2021
9f58022
modify exception
jun0315 Oct 7, 2021
d48d42e
Merge branch 'master' into influxdb-frame
jun0315 Oct 7, 2021
e67c646
modify it
jun0315 Oct 7, 2021
54a9724
modify workflow
jun0315 Oct 7, 2021
7b86e99
fix pom.xml
SteveYurongSu Oct 8, 2021
117160b
fix IoTDBInfluxDB
SteveYurongSu Oct 8, 2021
d410fcf
fix codestyle
SteveYurongSu Oct 8, 2021
7974e46
spotless
SteveYurongSu Oct 8, 2021
52ec7ca
fix workflows yml
SteveYurongSu Oct 8, 2021
91ee8c1
fix docs
SteveYurongSu Oct 8, 2021
38a31dc
influx-protocol test
SteveYurongSu Oct 8, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions .github/workflows/influxdb-protocol.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Licensed 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.

name: InfluxDB Protocol Test

on:
push:
branches:
- master
- 'rel/*'
paths-ignore:
- 'docs/**'
pull_request:
branches:
- master
- 'rel/*'
paths-ignore:
- 'docs/**'
# allow manually run the action:
workflow_dispatch:

env:
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3

jobs:
ubuntu:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11

- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2-

- name: Build Distribution Zip
run: ./mvnw.sh -B -DskipTests clean install

- name: Build Docker Image
run: |
docker build . -f docker/src/main/Dockerfile-single -t "iotdb:$GITHUB_SHA"
docker images

- name: IT Test
shell: bash
run: |
cd influxdb-protocol && mvn -B clean compile post-integration-test -Dtest.port.closed=true
3 changes: 2 additions & 1 deletion .github/workflows/main-unix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,5 @@ jobs:
- name: IT/UT Test
shell: bash
# we do not compile client-cpp for saving time, it is tested in client.yml
run: mvn -B clean post-integration-test -Dtest.port.closed=true -P '!testcontainer'
# we can skip influxdb-protocol because it has been tested separately in influxdb-protocol.yml
run: mvn -B clean post-integration-test -Dtest.port.closed=true -P '!testcontainer,!influxdb-protocol'
31 changes: 16 additions & 15 deletions .github/workflows/main-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@ jobs:
fail-fast: false
max-parallel: 20
matrix:
java: [8, 11, 17]
# to reduce the CI time cost; we split the whole CI to 3 parts:
# modules except the server and the cluster:
# -Diotdb.skip.test=true -Dcluster.skip.test=true
# the server module:
# -pl server -am -DskipTests=true -Diotdb.test.only=true
# the cluster module:
# -pl cluster -am -DskipTests=true -Dcluster.test.only=true
# but we just add labels here to make the action name more graceful
it_task: ['others',
'server',
'cluster'
java: [ 8, 11, 17 ]
# to reduce the CI time cost; we split the whole CI to 3 parts:
# modules except the server and the cluster:
# -Diotdb.skip.test=true -Dcluster.skip.test=true
# the server module:
# -pl server -am -DskipTests=true -Diotdb.test.only=true
# the cluster module:
# -pl cluster -am -DskipTests=true -Dcluster.test.only=true
# but we just add labels here to make the action name more graceful
it_task: [ 'others',
'server',
'cluster'
]
runs-on: windows-latest

Expand Down Expand Up @@ -100,13 +100,14 @@ jobs:
- name: Test Server Module with Maven
shell: bash
if: ${{ matrix.it_task == 'server'}}
run: source ~/.bash_profile && mvn -B clean integration-test -Dtest.port.closed=true -pl server -am -DskipTests=true -Diotdb.test.only=true
run: source ~/.bash_profile && mvn -B clean integration-test -Dtest.port.closed=true -pl server -am -DskipTests=true -Diotdb.test.only=true
- name: Test Cluster Module with Maven
shell: bash
if: ${{ matrix.it_task == 'cluster'}}
run: source ~/.bash_profile && mvn -B clean integration-test -Dtest.port.closed=true -pl cluster -am -DskipTests=true -Dcluster.test.only=true
run: source ~/.bash_profile && mvn -B clean integration-test -Dtest.port.closed=true -pl cluster -am -DskipTests=true -Dcluster.test.only=true
- name: Test Other Modules with Maven
shell: bash
if: ${{ matrix.it_task == 'others'}}
run: source ~/.bash_profile && mvn -B clean integration-test -Dtest.port.closed=true -Diotdb.test.skip=true -Dcluster.test.skip=true
# we can skip influxdb-protocol because it has been tested separately in influxdb-protocol.yml
run: source ~/.bash_profile && mvn -B clean integration-test -Dtest.port.closed=true -Diotdb.test.skip=true -Dcluster.test.skip=true -P '!influxdb-protocol'

2 changes: 1 addition & 1 deletion .github/workflows/sonar-coveralls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
restore-keys: ${{ runner.os }}-m2-
- name: IT/UT Test
# we do not compile client-cpp for saving time, it is tested in client.yml
run: mvn -B clean compile post-integration-test -Dtest.port.closed=true -Pcode-coverage -P '!testcontainer'
run: mvn -B clean compile post-integration-test -Dtest.port.closed=true -Pcode-coverage -P '!testcontainer,!influxdb-protocol'
- name: Code Coverage (Coveralls)
if: ${{ success() && (github.event_name == 'pull_request_target' || github.event_name == 'push')}}
run: |
Expand Down
35 changes: 35 additions & 0 deletions docs/zh/UserGuide/API/InfluxDB-Protocol.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!--

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.

-->

# 切换方案

假如您原先接入 InfluxDB 的业务代码如下:

```java
InfluxDB influxDB = InfluxDBFactory.connect(openurl, username, password);
```

您只需要将 InfluxDBFactory 替换为 **IoTDBInfluxDBFactory** 即可实现业务向 IoTDB 的切换:

```java
InfluxDB influxDB = IoTDBInfluxDBFactory.connect(openurl, username, password);
```

135 changes: 135 additions & 0 deletions influxdb-protocol/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
<?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.

-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.iotdb</groupId>
<artifactId>iotdb-parent</artifactId>
<version>0.13.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>influxdb-protocol</artifactId>
<name>InfluxDB Protocol</name>
<description>compatible with the protocol of influxdb.</description>
<properties>
<influxdb.test.skip>false</influxdb.test.skip>
<influxdb.it.skip>${influxdb.test.skip}</influxdb.it.skip>
<influxdb.ut.skip>${influxdb.test.skip}</influxdb.ut.skip>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.iotdb</groupId>
<artifactId>iotdb-session</artifactId>
<version>0.13.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.iotdb</groupId>
<artifactId>iotdb-thrift</artifactId>
<version>0.13.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.influxdb</groupId>
<artifactId>influxdb-java</artifactId>
<version>2.21</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
</dependency>
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr4-runtime</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>${influxdb.ut.skip}</skipTests>
<systemProperties>
<IOTDB_CONF>src/test/resources</IOTDB_CONF>
</systemProperties>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<executions>
<execution>
<id>run-integration-tests</id>
<phase>integration-test</phase>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
<configuration>
<skipTests>${influxdb.test.skip}</skipTests>
<skipITs>${influxdb.it.skip}</skipITs>
</configuration>
</plugin>
<plugin>
<groupId>org.antlr</groupId>
<artifactId>antlr4-maven-plugin</artifactId>
<version>${antlr4.version}</version>
<executions>
<execution>
<configuration>
<listener>false</listener>
<visitor>true</visitor>
</configuration>
<goals>
<goal>antlr4</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${project.build.directory}/generated-sources/antlr4</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Loading