pyspark.streaming.StreamingContext.socketTextStream#
- StreamingContext.socketTextStream(hostname, port, storageLevel=StorageLevel(True, True, False, False, 2))[source]#
Create an input from TCP source hostname:port. Data is received using a TCP socket and receive byte is interpreted as UTF8 encoded
\n
delimited lines.- Parameters
- hostnamestr
Hostname to connect to for receiving data
- portint
Port to connect to for receiving data
- storageLevel
pyspark.StorageLevel
, optional Storage level to use for storing the received objects