spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Apache Spark (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (SPARK-21147) the schema of socket source can not be set.
Date Tue, 20 Jun 2017 16:25:00 GMT

     [ https://issues.apache.org/jira/browse/SPARK-21147?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Apache Spark reassigned SPARK-21147:
------------------------------------

    Assignee:     (was: Apache Spark)

> the schema of socket source can not be set.
> -------------------------------------------
>
>                 Key: SPARK-21147
>                 URL: https://issues.apache.org/jira/browse/SPARK-21147
>             Project: Spark
>          Issue Type: Bug
>          Components: Structured Streaming
>    Affects Versions: 2.1.0
>         Environment: Win7,spark 2.1.0
>            Reporter: Fei Shao
>
> The schema set for DataStreamReader can not work. The code is shown as below:
> val line = ss.readStream.format("socket")
> .option("ip",xxx)
> .option("port",xxx)
> .schema( StructField("name",StringType)::StructField("area",StringType)::Nil)
> .load
> line.printSchema
> The printSchema prints:
> root
> |--value:String(nullable=true)
> According to the code, it should print the schema set by schema().
> Suggestion from Michael Armbrust:
> throw an exception saying that you can't set schema here.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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


Mime
View raw message