Skip to content

Commit 4785b88

Browse files
authored
IoTDB Table Spark Connector
1 parent 2d9a3f1 commit 4785b88

37 files changed

Lines changed: 2102 additions & 0 deletions

File tree

connectors/hive-connector/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
<groupId>org.apache.tsfile</groupId>
4343
<artifactId>common</artifactId>
4444
<version>${tsfile.version}</version>
45+
<scope>test</scope>
4546
</dependency>
4647
<dependency>
4748
<groupId>org.apache.tsfile</groupId>

connectors/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
<module>hadoop</module>
3838
<module>hive-connector</module>
3939
<module>spark-iotdb-connector</module>
40+
<module>spark-iotdb-table-connector</module>
4041
<module>spark-tsfile</module>
4142
<module>zeppelin-interpreter</module>
4243
</modules>
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
4+
Licensed to the Apache Software Foundation (ASF) under one
5+
or more contributor license agreements. See the NOTICE file
6+
distributed with this work for additional information
7+
regarding copyright ownership. The ASF licenses this file
8+
to you under the Apache License, Version 2.0 (the
9+
"License"); you may not use this file except in compliance
10+
with the License. You may obtain a copy of the License at
11+
12+
http://www.apache.org/licenses/LICENSE-2.0
13+
14+
Unless required by applicable law or agreed to in writing,
15+
software distributed under the License is distributed on an
16+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17+
KIND, either express or implied. See the License for the
18+
specific language governing permissions and limitations
19+
under the License.
20+
21+
-->
22+
<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">
23+
<modelVersion>4.0.0</modelVersion>
24+
<parent>
25+
<groupId>org.apache.iotdb</groupId>
26+
<artifactId>spark-iotdb-table-connector</artifactId>
27+
<version>2.0.2-SNAPSHOT</version>
28+
</parent>
29+
<artifactId>spark-iotdb-table-connector-3.3</artifactId>
30+
<name>IoTDB: Table Connector: Apache Spark3.3 (Scala 2.12)</name>
31+
<properties>
32+
<spark.version>3.3.0</spark.version>
33+
</properties>
34+
<dependencies>
35+
<dependency>
36+
<groupId>org.scala-lang</groupId>
37+
<artifactId>scala-library</artifactId>
38+
<scope>provided</scope>
39+
</dependency>
40+
<dependency>
41+
<groupId>org.apache.iotdb</groupId>
42+
<artifactId>spark-iotdb-table-common</artifactId>
43+
<version>${project.version}</version>
44+
</dependency>
45+
<dependency>
46+
<groupId>org.apache.spark</groupId>
47+
<artifactId>spark-sql_${scala.version}</artifactId>
48+
<version>${spark.version}</version>
49+
<scope>provided</scope>
50+
</dependency>
51+
</dependencies>
52+
<build>
53+
<plugins>
54+
<plugin>
55+
<groupId>org.scala-tools</groupId>
56+
<artifactId>maven-scala-plugin</artifactId>
57+
<executions>
58+
<execution>
59+
<goals>
60+
<goal>compile</goal>
61+
<goal>testCompile</goal>
62+
</goals>
63+
</execution>
64+
</executions>
65+
</plugin>
66+
<plugin>
67+
<groupId>org.apache.maven.plugins</groupId>
68+
<artifactId>maven-jar-plugin</artifactId>
69+
</plugin>
70+
<plugin>
71+
<groupId>org.apache.maven.plugins</groupId>
72+
<artifactId>maven-shade-plugin</artifactId>
73+
</plugin>
74+
</plugins>
75+
</build>
76+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
org.apache.iotdb.spark.table.db.IoTDBTableProvider
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
package org.apache.iotdb.spark.table.db
21+
22+
import org.apache.spark.sql.sources.DataSourceRegister
23+
24+
25+
class IoTDBTableProvider extends AbstractIoTDBTableProvider with DataSourceRegister {
26+
27+
override def shortName(): String = "iotdb"
28+
}
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
4+
Licensed to the Apache Software Foundation (ASF) under one
5+
or more contributor license agreements. See the NOTICE file
6+
distributed with this work for additional information
7+
regarding copyright ownership. The ASF licenses this file
8+
to you under the Apache License, Version 2.0 (the
9+
"License"); you may not use this file except in compliance
10+
with the License. You may obtain a copy of the License at
11+
12+
http://www.apache.org/licenses/LICENSE-2.0
13+
14+
Unless required by applicable law or agreed to in writing,
15+
software distributed under the License is distributed on an
16+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17+
KIND, either express or implied. See the License for the
18+
specific language governing permissions and limitations
19+
under the License.
20+
21+
-->
22+
<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">
23+
<modelVersion>4.0.0</modelVersion>
24+
<parent>
25+
<groupId>org.apache.iotdb</groupId>
26+
<artifactId>spark-iotdb-table-connector</artifactId>
27+
<version>2.0.2-SNAPSHOT</version>
28+
</parent>
29+
<artifactId>spark-iotdb-table-connector-3.4</artifactId>
30+
<name>IoTDB: Table Connector: Apache Spark3.4 (Scala 2.12)</name>
31+
<properties>
32+
<spark.version>3.4.0</spark.version>
33+
</properties>
34+
<dependencies>
35+
<dependency>
36+
<groupId>org.scala-lang</groupId>
37+
<artifactId>scala-library</artifactId>
38+
<scope>provided</scope>
39+
</dependency>
40+
<dependency>
41+
<groupId>org.apache.iotdb</groupId>
42+
<artifactId>spark-iotdb-table-common</artifactId>
43+
<version>${project.version}</version>
44+
</dependency>
45+
<dependency>
46+
<groupId>org.apache.spark</groupId>
47+
<artifactId>spark-sql_${scala.version}</artifactId>
48+
<version>${spark.version}</version>
49+
<scope>provided</scope>
50+
</dependency>
51+
</dependencies>
52+
<build>
53+
<plugins>
54+
<plugin>
55+
<groupId>org.scala-tools</groupId>
56+
<artifactId>maven-scala-plugin</artifactId>
57+
<executions>
58+
<execution>
59+
<goals>
60+
<goal>compile</goal>
61+
<goal>testCompile</goal>
62+
</goals>
63+
</execution>
64+
</executions>
65+
</plugin>
66+
<plugin>
67+
<groupId>org.apache.maven.plugins</groupId>
68+
<artifactId>maven-jar-plugin</artifactId>
69+
</plugin>
70+
<plugin>
71+
<groupId>org.apache.maven.plugins</groupId>
72+
<artifactId>maven-shade-plugin</artifactId>
73+
</plugin>
74+
</plugins>
75+
</build>
76+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
org.apache.iotdb.spark.table.db.IoTDBTableProvider
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
package org.apache.iotdb.spark.table.db
21+
22+
import org.apache.spark.sql.sources.DataSourceRegister
23+
24+
25+
class IoTDBTableProvider extends AbstractIoTDBTableProvider with DataSourceRegister {
26+
27+
override def shortName(): String = "iotdb"
28+
}
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
4+
Licensed to the Apache Software Foundation (ASF) under one
5+
or more contributor license agreements. See the NOTICE file
6+
distributed with this work for additional information
7+
regarding copyright ownership. The ASF licenses this file
8+
to you under the Apache License, Version 2.0 (the
9+
"License"); you may not use this file except in compliance
10+
with the License. You may obtain a copy of the License at
11+
12+
http://www.apache.org/licenses/LICENSE-2.0
13+
14+
Unless required by applicable law or agreed to in writing,
15+
software distributed under the License is distributed on an
16+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17+
KIND, either express or implied. See the License for the
18+
specific language governing permissions and limitations
19+
under the License.
20+
21+
-->
22+
<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">
23+
<modelVersion>4.0.0</modelVersion>
24+
<parent>
25+
<groupId>org.apache.iotdb</groupId>
26+
<artifactId>spark-iotdb-table-connector</artifactId>
27+
<version>2.0.2-SNAPSHOT</version>
28+
</parent>
29+
<artifactId>spark-iotdb-table-connector-3.5</artifactId>
30+
<name>IoTDB: Table Connector: Apache Spark3.5 (Scala 2.12)</name>
31+
<properties>
32+
<spark.version>3.5.0</spark.version>
33+
</properties>
34+
<dependencies>
35+
<dependency>
36+
<groupId>org.scala-lang</groupId>
37+
<artifactId>scala-library</artifactId>
38+
<scope>provided</scope>
39+
</dependency>
40+
<dependency>
41+
<groupId>org.apache.iotdb</groupId>
42+
<artifactId>spark-iotdb-table-common</artifactId>
43+
<version>${project.version}</version>
44+
</dependency>
45+
<dependency>
46+
<groupId>org.apache.spark</groupId>
47+
<artifactId>spark-sql_${scala.version}</artifactId>
48+
<version>${spark.version}</version>
49+
<scope>provided</scope>
50+
</dependency>
51+
</dependencies>
52+
<build>
53+
<plugins>
54+
<plugin>
55+
<groupId>org.scala-tools</groupId>
56+
<artifactId>maven-scala-plugin</artifactId>
57+
<executions>
58+
<execution>
59+
<goals>
60+
<goal>compile</goal>
61+
<goal>testCompile</goal>
62+
</goals>
63+
</execution>
64+
</executions>
65+
</plugin>
66+
<plugin>
67+
<groupId>org.apache.maven.plugins</groupId>
68+
<artifactId>maven-jar-plugin</artifactId>
69+
</plugin>
70+
<plugin>
71+
<groupId>org.apache.maven.plugins</groupId>
72+
<artifactId>maven-shade-plugin</artifactId>
73+
</plugin>
74+
</plugins>
75+
</build>
76+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
org.apache.iotdb.spark.table.db.IoTDBTableProvider

0 commit comments

Comments
 (0)