Skip navigation links

Package org.thales.punch.libraries.storm.bolt

Punchplatform bolts package.

See: Description

Package org.thales.punch.libraries.storm.bolt Description

Punchplatform bolts package.

Overview

The punchplatform spouts are standard storm bolts. It is easy to code your own and make them available to punch topologies. The few key concepts regarding the way the data is received and forwarded as streams and fields is described here after. Refer to each bolt javadoc page for details.

Data, Streams and Fields

User Data

Data comes in to a bolt as a storm tuple from a previous spout or bolt from the same topology. Each bolt does somthing useful with that data : transform it, rejects it, multiply it. Some bolt are inner bolts, some other will save the outgoing tuples to an external destination (kafka, elasticsearch, ceph, files, ...).

It is your job to configure the bolt to eventually emit the outgoing tuples under the stream you need.

System Data

You can also configure your bolt to handle two additional reserved punchplatform streams whose names and semantics have a special meaning.

It is very unlikely you decide to process these tuples. All what is needed is to transport them in their final destination. Your job here is thus to make sure these tuples are directed to the right final destination.

Example

Here is an example Spout configuration. What you see here is that spout is configured to :

Example

Consider the following topology:


 "spouts" : [
  {
   "type" : "the_spout",
   "spout_settings" : { ... },
   "storm_settings" : {
    "publish" : [
     { "stream" : "logs", "fields" : ["log"] },
     { "stream" : "_ppf_metrics", "fields" : ["_ppf_latency"] },
     { "stream" : "_ppf_errors", "fields" : ["_ppf_error"] }
    ]
   }
  }
 "bolts" : [
  {
   "type" : "a_first_inner_bolt",
   "bolt_settings" : { ... },
   "storm_settings" : {
    "subscribe" : [
     { "component" : "the_spout", "stream" : "logs" },
    ]
    "publish" : [
     { "stream" : "logs", "fields" : ["log"] },
    ]
   },
  {
   "type" : "a_second_output_bolt",
   "bolt_settings" : { ... },
   "storm_settings" : {
    "subscribe" : [
     { "component" : "a_first_inner_bolt", "stream" : "logs" },
     { "component" : "the_spout", "stream" : "_ppf_errors" }
    ]
   }
  }
 

Hopefully you got the idea : you can arrange to route and dispatch your data in the way you want and need.

Skip navigation links

Copyright © 2023. All rights reserved.