@InputRequirement(value=INPUT_FORBIDDEN) @Tags(value={"beats","logstash","elasticsearch","log"}) @CapabilityDescription(value="Receive messages encoded using the Elasticsearch Beats protocol and write decoded JSON") @WritesAttribute(attribute="beats.sender",description="Internet Protocol address of the message sender") @WritesAttribute(attribute="beats.port",description="TCP port on which the Processor received messages") @WritesAttribute(attribute="beats.sequencenumber",description="The sequence number of the message included for batches containing single messages") @WritesAttribute(attribute="mime.type",description="The mime.type of the content which is application/json") public class ListenBeats extends AbstractProcessor
| Modifier and Type | Class and Description |
|---|---|
private static class |
ListenBeats.BeatsAttributes |
| Modifier and Type | Field and Description |
|---|---|
static PropertyDescriptor |
CLIENT_AUTH |
private static List<PropertyDescriptor> |
DESCRIPTORS |
protected BlockingQueue<BatchMessage> |
errorEvents |
protected EventBatcher<BatchMessage> |
eventBatcher |
protected BlockingQueue<BatchMessage> |
events |
protected org.apache.nifi.event.transport.EventServer |
eventServer |
protected byte[] |
messageDemarcatorBytes |
protected int |
port |
static Relationship |
REL_SUCCESS |
private static Set<Relationship> |
RELATIONSHIPS |
static PropertyDescriptor |
SSL_CONTEXT_SERVICE |
| Constructor and Description |
|---|
ListenBeats() |
| Modifier and Type | Method and Description |
|---|---|
private Map<String,String> |
getAttributes(FlowFileEventBatch<BatchMessage> batch) |
private EventBatcher<BatchMessage> |
getEventBatcher() |
private String |
getMessageDemarcator(ProcessContext context) |
Set<Relationship> |
getRelationships() |
List<PropertyDescriptor> |
getSupportedPropertyDescriptors() |
private String |
getTransitUri(FlowFileEventBatch<BatchMessage> batch) |
void |
onScheduled(ProcessContext context) |
void |
onTrigger(ProcessContext context,
ProcessSession session) |
private void |
processEvents(ProcessSession session,
Map<String,FlowFileEventBatch<BatchMessage>> batches) |
void |
shutdown() |
onTriggergetControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, init, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTruecustomValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, validateclone, finalize, getClass, notify, notifyAll, wait, wait, waitisStatefulgetPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validatepublic static final PropertyDescriptor SSL_CONTEXT_SERVICE
public static final PropertyDescriptor CLIENT_AUTH
public static final Relationship REL_SUCCESS
private static final List<PropertyDescriptor> DESCRIPTORS
private static final Set<Relationship> RELATIONSHIPS
protected volatile int port
protected volatile BlockingQueue<BatchMessage> events
protected volatile BlockingQueue<BatchMessage> errorEvents
protected volatile org.apache.nifi.event.transport.EventServer eventServer
protected volatile byte[] messageDemarcatorBytes
protected volatile EventBatcher<BatchMessage> eventBatcher
public final Set<Relationship> getRelationships()
getRelationships in interface ProcessorgetRelationships in class AbstractSessionFactoryProcessorpublic List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors in class AbstractConfigurableComponent@OnScheduled public void onScheduled(ProcessContext context) throws IOException
IOExceptionpublic void onTrigger(ProcessContext context, ProcessSession session) throws ProcessException
onTrigger in class AbstractProcessorProcessException@OnStopped public void shutdown()
private void processEvents(ProcessSession session, Map<String,FlowFileEventBatch<BatchMessage>> batches)
private String getTransitUri(FlowFileEventBatch<BatchMessage> batch)
private Map<String,String> getAttributes(FlowFileEventBatch<BatchMessage> batch)
private String getMessageDemarcator(ProcessContext context)
private EventBatcher<BatchMessage> getEventBatcher()
Copyright © 2022 Apache NiFi Project. All rights reserved.