You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by "Michał Wieleba (Jira)" <ji...@apache.org> on 2021/08/09 07:43:00 UTC
[jira] [Commented] (PHOENIX-4627) Phoenix-Spark doesn't supported
spark structured streaming
[ https://issues.apache.org/jira/browse/PHOENIX-4627?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17395882#comment-17395882 ]
Michał Wieleba commented on PHOENIX-4627:
-----------------------------------------
Any updates on this?
> 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
> Priority: Major
>
> 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
(v8.3.4#803005)