Spark Configuration (4)-----Spark streaming

Source: Internet
Author: User

Spark Streaming

Spark streaming uses the spark API for streaming calculations, which means that streaming and batching are done on spark. So you can reuse batch code, build powerful interactive applications using Spark streaming, and not just analyze data.

Spark Streaming Example (stream-based word count) to demonstrate spark streaming: The local server receives text data over TCP and outputs word statistics in real time.


  
 
  1. nc -l -p 9999
  2. # 需要另外开启一个终端,记为终端 2,然后运行如下命令
  3. /usr/local/spark/bin/run-example streaming.NetworkWordCount localhost 9999

Input text in Terminal 1, in the Terminal 2 can be seen in real-time word statistics results.







Reference reprinted from: http://www.powerxing.com/spark-quick-start-guide/



From for notes (Wiz)

Spark Configuration (4)-----Spark streaming

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.