Skip to content

Latest commit

 

History

History
35 lines (22 loc) · 831 Bytes

Readme.md

File metadata and controls

35 lines (22 loc) · 831 Bytes

版本

The versions required for Spark and Java are as follow:

Spark Version Scala Version Java Version TsFile
2.0-2.1 2.11 1.8 0.5.0

安装

mvn clean scala:compile compile install

maven 依赖

    <dependency>
      <groupId>cn.edu.tsinghua</groupId>
      <artifactId>spark-iotdb-connector</artifactId>
      <version>0.5.0</version>
    </dependency>

spark-shell使用方式

./spark-shell --jars /home/rl/tsfile-0.5.0-SNAPSHOT.jar,/home/rl/iotdb-jdbc-0.5.0-SNAPSHOT.jar,/home/rl/spark-iotdb-connector-0.5.0.jar

val df = spark.read.format("cn.edu.tsinghua.iotdb").option("url","jdbc:tsfile://127.0.0.1:6667/").option("sql","select * from root").load

df.printSchema()

df.show()