Read Tablestore data in real time via EMR Spark Streaming

This article describes how the data in E-MapReduce live streaming process in Tablestore.

Scene design

With the development of the Internet, companies accumulate more and more data, the data hidden behind great value in the two-eleven such holiday, the e-commerce business will show the total amount of orders in real time on the big screen, as orders huge amount, every second it is impossible to conduct a SQL database statistics need to use this time to calculate the flow, and by means of the conventional methods are needed to do the streaming Kafka calculating message queue, the data line needs to be written Kafka in the database, Spark Streaming consumption in the order information from Kafka.
Tablestore database and can be used herein, which channels directly service functions for Spark Streaming streaming consumption, and further calculates the number of money orders, the entire process is simplified, particularly as shown in FIG.
1

This article describes a simple Demo, flow Tablestore number of statistical data in the table field that appears.

Prerequisites

Be sure to Ta

Guess you like

Origin yq.aliyun.com/articles/719370