NIFI-3352 - Address issue where ListenLumberjack was sending long numbers back to clients - instead of int

This closes #1421.

Signed-off-by: Andy LoPresto <alopresto@apache.org>
This commit is contained in:
Andre F de Miranda 2017-01-14 22:57:33 +11:00 committed by Andy LoPresto
parent b2290b24a6
commit 1a91ecc379
No known key found for this signature in database
GPG Key ID: 3C6EF65B2F7DEF69
2 changed files with 2 additions and 2 deletions

View File

@ -161,7 +161,7 @@ public class LumberjackDecoder {
// Lumberjack has a weird approach to frames, where compressed frames embed D(ata) or J(SON) frames. // Lumberjack has a weird approach to frames, where compressed frames embed D(ata) or J(SON) frames.
// inside a compressed input. // inside a compressed input.
// Or astated in the documentation: // Or as stated in the documentation:
// //
// "As an example, you could have 3 data frames compressed into a single // "As an example, you could have 3 data frames compressed into a single
// 'compressed' frame type: 1D{k,v}{k,v}1D{k,v}{k,v}1D{k,v}{k,v}" // 'compressed' frame type: 1D{k,v}{k,v}1D{k,v}{k,v}1D{k,v}{k,v}"

View File

@ -51,7 +51,7 @@ public class LumberjackResponse {
return new LumberjackFrame.Builder() return new LumberjackFrame.Builder()
.version(version) .version(version)
.frameType(frameType) .frameType(frameType)
.payload(ByteBuffer.allocate(8).putLong(seqNumber).array()) .payload(ByteBuffer.allocate(4).putInt((int) seqNumber).array())
.build(); .build();
} }