The schema set for DataStreamReader can not work. The code is shown as below:
val line = ss.readStream.format("socket")
The printSchema prints:
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.