Event-driven source

Event-driven source controls the rate of events being pushed to channels and also controls the concurrency and latency. The event-driven source implements the EventDrivenSource  interface, which acts as a marker interface in selecting the appropriate SourceRunner. Event-driven sources are run by the  EventDrivenSourceRunner  There are two ways to write your own custom event-driven source, which are as follows:

  • Implementing the  EventDrivenSource interface 
  • Extending the  AbstractEventDrivenSource class

Instead of using a template for the  first approach of creating an event-driven source, we would like to take the following example of TwitterSource  class, which can be found at: https://github.com/Apache/flume:

import ...

Get Mastering Hadoop 3 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.