Skip to content

Instantly share code, notes, and snippets.

@adekunleba
Created March 23, 2019 18:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adekunleba/ff97b4f7bbe8614155d86462458fa3ec to your computer and use it in GitHub Desktop.
Save adekunleba/ff97b4f7bbe8614155d86462458fa3ec to your computer and use it in GitHub Desktop.
val streamingContext: StreamingContext = new StreamingContext(sparkContext, Seconds(20))
val lines: ReceiverInputDStream[String] = streamingContext.socketTextStream("localhost", 9999)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment