spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Genmao Yu (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (SPARK-24630) SPIP: Support SQLStreaming in Spark
Date Mon, 30 Jul 2018 11:28:00 GMT

    [ https://issues.apache.org/jira/browse/SPARK-24630?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16561762#comment-16561762
] 

Genmao Yu edited comment on SPARK-24630 at 7/30/18 11:27 AM:
-------------------------------------------------------------

Practice to add the StreamSQL DDL, like this:
{code:java}
spark-sql> create source stream service_logs with ("type"="kafka","bootstrap.servers"="x.x.x.x:9092",
"topic"="service_log"); 
Time taken: 1.833 seconds 
spark-sql> desc service_logs;
key binary NULL 
value binary NULL 
topic string NULL 
partition int NULL 
offset bigint NULL 
timestamp timestamp NULL 
timestampType int NULL 
Time taken: 0.394 seconds, Fetched 7 row(s) 
spark-sql> create sink stream analysis with ("type"="kafka", "outputMode"="complete", "bootstrap.servers"="x.x.x.x:9092",
"topic"="analysis", "checkpointLocation"="hdfs:///tmp/cp0"); 
Time taken: 0.027 seconds 
spark-sql> insert into analysis select key, value, count(*) from service_logs group by
key, value; 
Time taken: 0.355 seconds


{code}


was (Author: unclegen):
Try to add the StreamSQL DDL, like this:
{code:java}
spark-sql> create source stream service_logs with ("type"="kafka","bootstrap.servers"="x.x.x.x:9092",
"topic"="service_log"); 
Time taken: 1.833 seconds 
spark-sql> desc service_logs;
key binary NULL 
value binary NULL 
topic string NULL 
partition int NULL 
offset bigint NULL 
timestamp timestamp NULL 
timestampType int NULL 
Time taken: 0.394 seconds, Fetched 7 row(s) 
spark-sql> create sink stream analysis with ("type"="kafka", "outputMode"="complete", "bootstrap.servers"="x.x.x.x:9092",
"topic"="analysis", "checkpointLocation"="hdfs:///tmp/cp0"); 
Time taken: 0.027 seconds 
spark-sql> insert into analysis select key, value, count(*) from service_logs group by
key, value; 
Time taken: 0.355 seconds


{code}

> SPIP: Support SQLStreaming in Spark
> -----------------------------------
>
>                 Key: SPARK-24630
>                 URL: https://issues.apache.org/jira/browse/SPARK-24630
>             Project: Spark
>          Issue Type: Improvement
>          Components: Structured Streaming
>    Affects Versions: 2.2.0, 2.2.1
>            Reporter: Jackey Lee
>            Priority: Minor
>              Labels: SQLStreaming
>         Attachments: SQLStreaming SPIP.pdf
>
>
> At present, KafkaSQL, Flink SQL(which is actually based on Calcite), SQLStream, StormSQL
all provide a stream type SQL interface, with which users with little knowledge about streaming, 
can easily develop a flow system processing model. In Spark, we can also support SQL API based
on StructStreamig.
> To support for SQL Streaming, there are two key points: 
> 1, Analysis should be able to parse streaming type SQL. 
> 2, Analyzer should be able to map metadata information to the corresponding 
> Relation. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org


Mime
View raw message