Open kgneng2 opened 4 years ago
6장 kafka stream
Processor API에 대해서 알아봅시다.
6.1
ZMartKafkaStreamsApp : kafka stream api ZMartProcessorApp : Processor API
6.2 PopsHopsApplication.java 보면서 설명
6.3 더 파보기.. 요구사항
image
6.4
목표 : 두개의 거래를 조합하는건데 N초마다, 근데 하나의 스트림이 도착안한다고 기다리지 않음.
6.1. The trade-offs of higher-level abstractions vs. more control
6.2. Working with sources, processors, and sinks to create a topology
6.2.1. Adding a source node
6.2.2. Adding a processor node
6.2.3 Adding a sink node
addSink()
6.3. Digging deeper into the Processor API with a stock analysis processor
decision tree
6.3.1. The stock-performance processor application
init() method
Punctuation semantics
STREAM_TIME
(https://livebook.manning.com/#!/book/kafka-streams-in-action/chapter-6/84)
StreamTask
extracts the smallest timestamp from the PartitionGroup. The PartitionGroup is a set of partitions for a given StreamThread, and it contains all timestamp information for all partitions in the group.끊임없이 오는 데이터랑 연관이 있고, Timestamp가 중요하고, 띄엄띄엄으로 오면 사용할수 없다는 소리인듯
6.3.2 The process() method
process 한 결과는 state store에 저장하고 Punctuator.punctuate method를 통해 레코드를 남긴다.
6.3.3 The punctuator execution
6.4 The co-group processor
PairRDDFunctions.cogroup
와 유사하다6.4.1. Building the co-grouping processor
Defining the source nodes
Adding the processor nodes
Adding the state store && Adding the sink node
6.5. Integrating the Processor API and the Kafka Streams API
Summary