Spark学习笔记 --- SparkStreaming 实现对 TCP 数据源处理


package demo1

import org.apache.spark._
import org.apache.spark.streaming._
//import org.apache.spark.streaming.StreamingContext._  (spark1.3 upper is not necessary)

/*
  Using this context, we can create a DStream that represents streaming data from a TCP source,
  specified  as hostname (eg.localhost) and port.This lines DStream represents the stream of data
  that will be received from the data server. Each record in this DStream is a line of text.
  Next, we want to split the lines by space characters 

你可能感兴趣的:(Scala,大数据挖掘与大数据应用案例,Object-Oriented,Programming)