September 2017
Beginner to intermediate
360 pages
8h 13m
English
This bolt checks the distance between the starting location of the vehicle read from Hazelcast and the current location received from parser bolt. If the current distance is greater than the threshold distance, then emit the tuple to the next bolt to process the alert:
package com.book.processing;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.AlertEvent;import com.book.domain.VehicleAlertInfo;import com.book.domain.VehicleSensor; ...
Read now
Unlock full access