public class LumberjackOutput
extends org.thales.punch.libraries.storm.api.BaseProcessingNode
The PunchPlatformBolt forwards the Storm Tuple it receives, using the lumberjack protocol encoding. For example on a log management PunchPlatform you have something like :
{ "logs" : { "log" : { "message" : "original log" , "vendor" : "apache" ...}, "es_id" = "37643" }
What will be sent is a lumberjack frame with
"log" : { "message" : "original log" , "vendor" : "apache" ...}
"es_id" = "37643"
{
"type" : "lumberjack_bolt",
"bolt_settings" : {
"destination" : [{
"host" : "localhost",
"port" : 9999,
"compression" : false,
"ssl" : true,
"ssl_private_key" : "/opt/keys/punchplatform.key.pkcs8",
"ssl_certificate" : "/opt/keys/punchplatform.crt"
}]
},
"storm_settings" : {
"executors": 1
}
}
property | mandatory | type | default | comment |
---|
property | mandatory | type | default | comment |
---|---|---|---|---|
host | yes | string | - | The server host address. Accepted values are dotted number IP addresses, or hostname. You can set several destination addresses using the destination property. |
port | yes | int | - | The server listening port. |
send_queue_flush_size | no | int | 0 | If that amount of data is received, flush the queue right away. Use this only if you have low traffic and?or to benefit from a better compression level |
send_queue_size | no | integer | 100000 | Set this property to avoid having your client send more frames to the server than it reads the corresponding acks. This property is advised to avoid your client library to enqueue too many frames in the send queue. |
send_queue_flush_period | no | int | 100 | Only effective if queue_flush_size is greater than 0. If little data is sent, flush the size of the blocking queue. This period is expressed in milliseconds. |
ssl | no | string | false | Set to true to listen on SSL. |
secret | no | string | - | The secret to load a TLS PKCS12 SSL context |
connect_timeout_ms | no | long | 5000 | the socket connection timeout. |
connect_retry_interval_ms | no | long | 5000 | If the connection to the destination(s) fails, a new connection attempt is performed regularly. Set this to the retry interval. |
Constructor and Description |
---|
LumberjackOutput(org.thales.punch.libraries.storm.api.NodeSettings config)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
cleanup() |
void |
declareOutputFields(org.apache.storm.topology.OutputFieldsDeclarer declarer) |
void |
prepare(Map map,
org.apache.storm.task.TopologyContext topologyContext,
org.apache.storm.task.OutputCollector collector)
Setup this spout before starting emitting Tuples into the topology.
|
void |
process(org.apache.storm.tuple.Tuple tuple)
Storm gives us tuple one by one.
|
public LumberjackOutput(org.thales.punch.libraries.storm.api.NodeSettings config)
config
- the bolt configurationpublic void prepare(Map map, org.apache.storm.task.TopologyContext topologyContext, org.apache.storm.task.OutputCollector collector)
prepare
in interface org.apache.storm.task.IBolt
prepare
in class org.thales.punch.libraries.storm.api.BaseProcessingNode
map
- the storm settingstopologyContext
- the topology settingsscollector
- the output collector for sending out tuples.public void process(org.apache.storm.tuple.Tuple tuple)
process
in class org.thales.punch.libraries.storm.api.BaseProcessingNode
public void cleanup()
cleanup
in interface org.apache.storm.task.IBolt
cleanup
in class org.thales.punch.libraries.storm.api.BaseProcessingNode
public void declareOutputFields(org.apache.storm.topology.OutputFieldsDeclarer declarer)
declareOutputFields
in interface org.apache.storm.topology.IComponent
declareOutputFields
in class org.thales.punch.libraries.storm.api.BaseProcessingNode
Copyright © 2022. All rights reserved.