Package org.apache.nifi.processors.beats
Class ListenBeats
java.lang.Object
org.apache.nifi.components.AbstractConfigurableComponent
org.apache.nifi.processor.AbstractSessionFactoryProcessor
org.apache.nifi.processor.AbstractProcessor
org.apache.nifi.processors.beats.ListenBeats
- All Implemented Interfaces:
ConfigurableComponent,Processor
@InputRequirement(INPUT_FORBIDDEN)
@Tags({"beats","logstash","elasticsearch","log"})
@CapabilityDescription("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
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PropertyDescriptorprivate static final List<PropertyDescriptor> protected BlockingQueue<BatchMessage> protected EventBatcher<BatchMessage> protected BlockingQueue<BatchMessage> protected org.apache.nifi.event.transport.EventServerprotected byte[]static final Relationshipprivate static final Set<Relationship> static final PropertyDescriptor -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate EventBatcher<BatchMessage> intprivate StringgetMessageDemarcator(ProcessContext context) final Set<Relationship> private StringvoidonScheduled(ProcessContext context) voidonTrigger(ProcessContext context, ProcessSession session) private voidprocessEvents(ProcessSession session, Map<String, FlowFileEventBatch<BatchMessage>> batches) voidshutdown()Methods inherited from class org.apache.nifi.processor.AbstractProcessor
onTriggerMethods inherited from class org.apache.nifi.processor.AbstractSessionFactoryProcessor
getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, init, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTrueMethods inherited from class org.apache.nifi.components.AbstractConfigurableComponent
customValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, validateMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.nifi.components.ConfigurableComponent
getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validateMethods inherited from interface org.apache.nifi.processor.Processor
isStateful, migrateProperties, migrateRelationships
-
Field Details
-
SSL_CONTEXT_SERVICE
-
CLIENT_AUTH
-
REL_SUCCESS
-
DESCRIPTORS
-
RELATIONSHIPS
-
events
-
errorEvents
-
eventServer
protected volatile org.apache.nifi.event.transport.EventServer eventServer -
messageDemarcatorBytes
protected volatile byte[] messageDemarcatorBytes -
eventBatcher
-
-
Constructor Details
-
ListenBeats
public ListenBeats()
-
-
Method Details
-
getRelationships
- Specified by:
getRelationshipsin interfaceProcessor- Overrides:
getRelationshipsin classAbstractSessionFactoryProcessor
-
getSupportedPropertyDescriptors
- Overrides:
getSupportedPropertyDescriptorsin classAbstractConfigurableComponent
-
onScheduled
- Throws:
IOException
-
getListeningPort
public int getListeningPort() -
onTrigger
- Specified by:
onTriggerin classAbstractProcessor- Throws:
ProcessException
-
shutdown
-
processEvents
private void processEvents(ProcessSession session, Map<String, FlowFileEventBatch<BatchMessage>> batches) -
getTransitUri
-
getAttributes
-
getMessageDemarcator
-
getEventBatcher
-