Skip to content

Conversation

@samperson1997
Copy link
Contributor

Improve tsfile-spark-connector to support spark 2.4.3 as is mentioned in issue IOTDB-91.

Spark has decoupled internal Row from external Row, which influences TsFileWriterFactory (extends OutputWriterFactory) and TsFileOutputWriter (extends OutputWriter). Therefore, function toTsRecord has to change param type from Row to InternalRow.

@LeiRui
Copy link
Contributor

LeiRui commented Jul 10, 2019

The commands I used in the spark-shell:

import org.apache.iotdb.tsfile._
val df = spark.read.tsfile("testDirect.tsfile") 
df.show
df.write.tsfile("output")

@samperson1997
Copy link
Contributor Author

The commands I used in the spark-shell:

import org.apache.iotdb.tsfile._
val df = spark.read.tsfile("testDirect.tsfile") 
df.show
df.write.tsfile("output")

Hi,

I have tried the same file created by TsFileWrite.java, and the commands of reading and writing all passed. I thought the failure may be caused by inconsistent spark version: the spark version should be updated to 2.3 / 2.4, and the tsfile-spark-connector-0.8.0-SNAPSHOT.jar needs to be built again with the accordingly spark version in pom.xml.

@LeiRui
Copy link
Contributor

LeiRui commented Jul 10, 2019

The commands I used in the spark-shell:

import org.apache.iotdb.tsfile._
val df = spark.read.tsfile("testDirect.tsfile") 
df.show
df.write.tsfile("output")

Hi,

I have tried the same file created by TsFileWrite.java, and the commands of reading and writing all passed. I thought the failure may be caused by inconsistent spark version: the spark version should be updated to 2.3 / 2.4, and the tsfile-spark-connector-0.8.0-SNAPSHOT.jar needs to be built again with the accordingly spark version in pom.xml.

Tests pass successfully.

@qiaojialin qiaojialin merged commit 0afdab3 into apache:master Jul 11, 2019
@samperson1997 samperson1997 deleted the spark-connector branch July 11, 2019 02:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants