Suhas created PHOENIX-4627:
------------------------------
Summary: Phoenix-Spark doesn't supported spark structured streaming
Key: PHOENIX-4627
URL: https://issues.apache.org/jira/browse/PHOENIX-4627
Project: Phoenix
Issue Type: Bug
Affects Versions: 4.11.0
Reporter: Suhas
Spark 2.x introduced a feature of structured streaming
([https://spark.apache.org/docs/latest/structured-streaming-programming-guide.html).]
However, when phoenix-spark driver is used to write the structured streamed
data, we get the exception
Exception in thread "main" java.lang.UnsupportedOperationException: Data source
org.apache.phoenix.spark does not support streamed writing
at
org.apache.spark.sql.execution.datasources.DataSource.createSink(DataSource.scala:287)
at
org.apache.spark.sql.streaming.DataStreamWriter.start(DataStreamWriter.scala:266)
Code:
Dataset<Row> inputDF =
sparkSession
.readStream()
.schema(jsonSchema)
.json(inputPath);
StreamingQuery query = inputDF
.writeStream()
.format("org.apache.phoenix.spark")
.outputMode(OutputMode.Complete())
.option("zkUrl", "localhost:2181")
.option("table","SHM2")
.start();
query.awaitTermination();
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)