nifi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apiri <>
Subject [GitHub] nifi pull request: NIFI-856 Implements experimental ListenLumberja...
Date Tue, 31 May 2016 03:39:56 GMT
Github user apiri commented on a diff in the pull request:
    --- Diff: nifi-nar-bundles/nifi-lumberjack-bundle/nifi-lumberjack-processors/src/main/java/org/apache/nifi/processors/lumberjack/
    @@ -0,0 +1,237 @@
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.nifi.processors.lumberjack;
    +import org.apache.nifi.annotation.behavior.InputRequirement;
    +import org.apache.nifi.annotation.behavior.WritesAttribute;
    +import org.apache.nifi.annotation.behavior.WritesAttributes;
    +import org.apache.nifi.annotation.documentation.CapabilityDescription;
    +import org.apache.nifi.annotation.documentation.SeeAlso;
    +import org.apache.nifi.annotation.documentation.Tags;
    +import org.apache.nifi.annotation.lifecycle.OnScheduled;
    +import org.apache.nifi.components.PropertyDescriptor;
    +import org.apache.nifi.components.ValidationContext;
    +import org.apache.nifi.components.ValidationResult;
    +import org.apache.nifi.flowfile.attributes.CoreAttributes;
    +import org.apache.nifi.flowfile.attributes.FlowFileAttributeKey;
    +import org.apache.nifi.processor.DataUnit;
    +import org.apache.nifi.processor.ProcessContext;
    +import org.apache.nifi.processor.ProcessSession;
    +import org.apache.nifi.processor.util.listen.AbstractListenEventBatchingProcessor;
    +import org.apache.nifi.processor.util.listen.dispatcher.AsyncChannelDispatcher;
    +import org.apache.nifi.processor.util.listen.dispatcher.ChannelDispatcher;
    +import org.apache.nifi.processor.util.listen.dispatcher.SocketChannelDispatcher;
    +import org.apache.nifi.processor.util.listen.event.EventFactory;
    +import org.apache.nifi.processor.util.listen.handler.ChannelHandlerFactory;
    +import org.apache.nifi.processor.util.listen.response.ChannelResponder;
    +import org.apache.nifi.processor.util.listen.response.ChannelResponse;
    +import org.apache.nifi.processors.lumberjack.event.LumberjackEvent;
    +import org.apache.nifi.processors.lumberjack.event.LumberjackEventFactory;
    +import org.apache.nifi.processors.lumberjack.frame.LumberjackEncoder;
    +import org.apache.nifi.processors.lumberjack.handler.LumberjackSocketChannelHandlerFactory;
    +import org.apache.nifi.processors.lumberjack.response.LumberjackChannelResponse;
    +import org.apache.nifi.processors.lumberjack.response.LumberjackResponse;
    +import org.apache.nifi.ssl.SSLContextService;
    +import java.nio.ByteBuffer;
    +import java.nio.charset.Charset;
    +import java.util.Arrays;
    +import java.util.HashMap;
    +import java.util.List;
    +import java.util.Map;
    +import java.util.Collection;
    +import java.util.ArrayList;
    +import java.util.concurrent.BlockingQueue;
    +@Tags({"listen", "lumberjack", "tcp", "logs"})
    +@CapabilityDescription("Listens for Lumberjack messages being sent to a given port over
TCP. Each message will be " +
    +        "acknowledged after successfully writing the message to a FlowFile. Each FlowFile
will contain data " +
    +        "portion of one or more Lumberjack frames. In the case where the Lumberjack frames
contain syslog messages, the " +
    +        "output of this processor can be sent to a ParseSyslog processor for further
    +        @WritesAttribute(attribute="lumberjack.sender", description="The sending host
of the messages."),
    +        @WritesAttribute(attribute="lumberjack.port", description="The sending port the
messages were received over."),
    +        @WritesAttribute(attribute="lumberjack.sequencenumber", description="The sequence
number of the message. Only included if <Batch Size> is 1."),
    +        @WritesAttribute(attribute="lumberjack.*", description="The keys and respective
values as sent by the lumberjack producer. Only included if <Batch Size> is 1."),
    +        @WritesAttribute(attribute="mime.type", description="The mime.type of the content
which is text/plain")
    +@SeeAlso(classNames = {"org.apache.nifi.processors.standard.ParseSyslog"})
    +public class ListenLumberjack extends AbstractListenEventBatchingProcessor<LumberjackEvent>
    +    public static final PropertyDescriptor SSL_CONTEXT_SERVICE = new PropertyDescriptor.Builder()
    --- End diff --
    Should this be required?  At minimum, the logstash-forwarder requires specification of
an SSL CA and the server would need to provide an identity that corresponds to the configured
CA.  If I am overlooking something, let me know.  Certainly may have glossed over something
in the forwarder docs.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message