[ https://issues.apache.org/jira/browse/NIFI-3238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15889349#comment-15889349 ]
ASF GitHub Bot commented on NIFI-3238: -------------------------------------- Github user mattyb149 commented on a diff in the pull request: https://github.com/apache/nifi/pull/1418#discussion_r103595712 --- Diff: nifi-nar-bundles/nifi-beats-bundle/nifi-beats-processors/src/main/java/org/apache/nifi/processors/beats/frame/BeatsDecoder.java --- @@ -0,0 +1,330 @@ +/* + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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.beats.frame; + +import java.io.IOException; +import java.io.InputStream; +import java.nio.ByteBuffer; +import java.nio.charset.Charset; +import java.util.LinkedList; +import java.util.List; +import java.util.zip.InflaterInputStream; + +import org.apache.nifi.stream.io.ByteArrayInputStream; +import org.apache.nifi.stream.io.ByteArrayOutputStream; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * Decodes a Beats frame by maintaining a state based on each byte that has been processed. This class + * should not be shared by multiple threads. + */ +public class BeatsDecoder { + + + static final Logger logger = LoggerFactory.getLogger(BeatsDecoder.class); --- End diff -- Should we instead pass in a reference to the ComponentLog rather than depend on SLF4J as the implementation? I realize SLF4J is itself a facade, but this couples the logging directly to it rather than using the NiFi logging "framework" > ListenLumberjack should support the *beat protocol > -------------------------------------------------- > > Key: NIFI-3238 > URL: https://issues.apache.org/jira/browse/NIFI-3238 > Project: Apache NiFi > Issue Type: Improvement > Reporter: Andre F de Miranda > Assignee: Andre F de Miranda > > ListenLumberjack currently only supports v1 of the Lumberjack protocol. This > version has been deprecated in favor of v2, which is used on *beat (e.g. > filebeat, packetbeat, etc) edge components of the ELK stack. > We should consider deprecating ListenLumberjack or to extend it to handle > both v1 and v2 of the protocol. -- This message was sent by Atlassian JIRA (v6.3.15#6346)