Skip to Content
Practical Real-time Data Processing and Analytics
book

Practical Real-time Data Processing and Analytics

by Shilpi Saxena, Selva raj Ramasamy, Prateek Bhati, Saurabh Gupta
September 2017
Beginner to intermediate
360 pages
8h 13m
English
Packt Publishing
Content preview from Practical Real-time Data Processing and Analytics

Parser bolt

This bolt is used to read messages from Kafka spout and complete it into Java POJO class.

package com.book.processing;import java.io.IOException;import java.util.Map;import org.apache.storm.task.TopologyContext;import org.apache.storm.topology.BasicOutputCollector;import org.apache.storm.topology.OutputFieldsDeclarer;import org.apache.storm.topology.base.BaseBasicBolt;import org.apache.storm.tuple.Fields;import org.apache.storm.tuple.Tuple;import org.apache.storm.tuple.Values;import com.book.domain.VehicleSensor;import com.fasterxml.jackson.core.JsonParseException;import com.fasterxml.jackson.databind.JsonMappingException;import com.fasterxml.jackson.databind.ObjectMapper;/*** This bolt is used to parse Vehicle real-time data ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

What Employees Want Most in Uncertain Times

What Employees Want Most in Uncertain Times

Kristine W. Powers, Jessica B.B. Diaz

Publisher Resources

ISBN: 9781787281202