T
- type the netty tuple comtent.public abstract class AbstractSocketInput<T>
extends org.thales.punch.libraries.storm.api.BaseInputNode
Refer to each for its javadoc documentation.
Constructor and Description |
---|
AbstractSocketInput(org.thales.punch.libraries.storm.api.NodeSettings spoutSettings,
org.apache.logging.log4j.Logger subLogger)
A Spout constructor is in charge of setting the fields that will be required later on when the spout will be effectively
started and run somewhere in the cluster.
|
Modifier and Type | Method and Description |
---|---|
void |
ack(Object o) |
void |
fail(Object o) |
protected String |
getSocketHostAddress(InetSocketAddress addr) |
void |
open(Map stormSettings,
org.apache.storm.task.TopologyContext topologyContext,
org.apache.storm.spout.SpoutOutputCollector collector)
Setup this spout before it starts receiving data and emitting tuples into the topology.
|
close, deactivate, declareOutputFields, getPublishedStreams, regulate, sendLatencyRecord
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected transient Charset charset
public AbstractSocketInput(org.thales.punch.libraries.storm.api.NodeSettings spoutSettings, org.apache.logging.log4j.Logger subLogger)
spoutSettings
- the spout configurationsubLogger
- a logger ot make it easier to identify trhe source classpublic void open(Map stormSettings, org.apache.storm.task.TopologyContext topologyContext, org.apache.storm.spout.SpoutOutputCollector collector)
This is called by the Storm runtime at topology activation.
open
in interface org.apache.storm.spout.ISpout
open
in class org.thales.punch.libraries.storm.api.BaseInputNode
stormSettings
- storm configurationtopologyContext
- the storm topology contextcollector
- the output collector for emitting tuples.public void ack(Object o)
ack
in interface org.apache.storm.spout.ISpout
ack
in class org.thales.punch.libraries.storm.api.BaseInputNode
public void fail(Object o)
fail
in interface org.apache.storm.spout.ISpout
fail
in class org.thales.punch.libraries.storm.api.BaseInputNode
protected String getSocketHostAddress(InetSocketAddress addr)
Copyright © 2023. All rights reserved.