public class PunchletDag extends Punchlets implements Runnable
This is used for high performance lightweight topologies, avoiding the storm?flink node to node serialisation.
punchletList
_threadLocal, LOG
child, code, eventCount, metricRegistry, r, uuidGenerator, world
Constructor and Description |
---|
PunchletDag()
Default ctor
|
Modifier and Type | Method and Description |
---|---|
boolean |
__isChained()
some punchlet are made of a chain of several punchlets.
|
void |
activate()
The activate method is called after startup, and before receiving input
tuples.
|
void |
add(List<Punchlet> punchlets,
String affinity)
Add a punchlet to the list
|
void |
addBlock(List<PunchletSequence> punchlets,
String affinity) |
void |
execute(Tuple root)
Execute the punchlet.
|
void |
execute(Tuple root,
org.thales.punch.api.IReceiver<Tuple> receiver)
Execute a chain of punchlet starting from a specific one.
|
static int |
getQueueNum(LinkedBlockingQueue<Tuple> q) |
void |
run() |
addEventCallback, isAsynchronous, setMetricContext
attach, bug, cef, cidrRange, cidrRange, coalesce, contains, contains, convert, convert, csv, currentTimeMillis, currentTimeNanos, date, date, date, dissect, dump, fetchCsv, fetchCsv, fetchJson, fetchJson, findByInterval, findByInterval, findByInterval, findByKey, findByKey, geo, geoip, geoOperator, getAttachement, getCode, getHostIp, getHostName, getResource, getResourceString, getResourceTuple, getUniqueMessageId, grok, http, ipmatch, ipmatch, ipRange, ipv4Range, ipv4Range, ipv6Range, ipv6Range, is, kv, logger, mail, meter, move, nifi, print, print, raise, remove, sha1, sleep, split, syslogHeader, toArray, toBoolean, toDouble, toFlatTuple, toKv, toLong, toLowerCase, toUpperCase, tryEpochMs, tryEpochMs, tryEpochSec, tryEpochSec, tuple, tuple, unflatTuple, validateSchema
ecount, every, getPath, getPersistentId, getProperties, getRuntimeId, getWorldTuple, invoke, setCode, setPath, setPersistentId, setProperties, setRuntimeId
public void activate()
Punchlet
public void addBlock(List<PunchletSequence> punchlets, String affinity)
public void add(List<Punchlet> punchlets, String affinity)
punchlet
- the additional punchletexecutors
- affinity
- public boolean __isChained()
__isChained
in class Punchlets
public void execute(Tuple root)
PunchletContext
{
[es_type] = \"apache\";
}
These simple punchlet are compiled into a running punchlet implementing this class.
Note that a punchlet can be injected with additional json resource tuples, i.e. tuple that hold the content of static json files, containing configuration data. These are automatically injected as fields in your punchlet.
execute
in class PunchletContext
root
- the root tuple. This one is mandatorypublic void execute(Tuple root, org.thales.punch.api.IReceiver<Tuple> receiver)
root
- the root document to pass to that punchlet and the subsequent ones.receiver
- public static int getQueueNum(LinkedBlockingQueue<Tuple> q)
Copyright © 2022. All rights reserved.