NIFI-10737 Correct ListenBeats buffer handling#6608
Closed
exceptionfactory wants to merge 1 commit intoapache:mainfrom
Closed
NIFI-10737 Correct ListenBeats buffer handling#6608exceptionfactory wants to merge 1 commit intoapache:mainfrom
exceptionfactory wants to merge 1 commit intoapache:mainfrom
Conversation
- Added test class for ListenBeats - Removed unnecessary dependencies - Implemented BatchDecoder for reading Beats Protocol frames - Refactored protocol and handler classes
546c4f9 to
4c0e151
Compare
Contributor
|
Will review |
Contributor
|
+1 looks good to me, tested this out and found that ListenBeats is working as expected. The refactor code changes look good. Will merge. |
lizhizhou
pushed a commit
to lizhizhou/nifi
that referenced
this pull request
Jan 2, 2023
- Added test class for ListenBeats - Removed unnecessary dependencies - Implemented BatchDecoder for reading Beats Protocol frames - Refactored protocol and handler classes Signed-off-by: Nathan Gough <thenatog@gmail.com> This closes apache#6608.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
NIFI-10737 Corrects the behavior of the
ListenBeatsProcessor when reading a socket buffer where the buffer size is greater than 2048 bytes.The Netty framework can invoke handlers with a
ByteBufcontaining any number of bytes, so the handler implementations must be capable of checking for available bytes and resuming operation on subsequent invocations.Changes include adding a new unit test for
ListenBeats, removing unnecessary dependencies fromnifi-beats-processors, and implementing a newBatchDecoderclass for reading Beats Protocol frames. The protocol implementation follows the general approach of the logstash-input-beats project for reading Beats Version 2 frames.The channel handler process is also more efficient as it sends a Message Acknowledgement packet for the last Sequence Number from the batch of messages, as opposed to sending one for every message received.
Tracking
Please complete the following tracking steps prior to pull request creation.
Issue Tracking
Pull Request Tracking
NIFI-00000NIFI-00000Pull Request Formatting
mainbranchVerification
Please indicate the verification steps performed prior to pull request creation.
Build
mvn clean install -P contrib-checkLicensing
LICENSEandNOTICEfilesDocumentation