August 2017
Beginner to intermediate
278 pages
6h 40m
English
As mentioned earlier, the lookup service is reused from Chapter 5, Building Spark Streaming Applications with Kafka, and Chapter 6, Building Storm Application with Kafka. Note that this is in the memory lookup created over the interface, so you can add your own lookup service by simply providing implementation for isFraud(), and you are done.
The IP scanner interface looks like this:
package com.packt.Kafka.lookup;public interface IIPScanner { boolean isFraudIP(String ipAddresses);}
We have kept the in-memory IP lookup very simple for an interactive execution of the application. The lookup service will scan the IP address and detect whether the record is a fraud or not by comparing the first 8 bits of the IP address:
Read now
Unlock full access