fluent-plugin-kinesis 3.4.1 → 3.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/README.md +1 -1
- data/lib/fluent/plugin/kinesis.rb +3 -0
- data/lib/fluent/plugin/kinesis_helper/compression.rb +27 -0
- data/lib/fluent_plugin_kinesis/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a80a4e62aad6b32241c8db4ce69903db51da13b06391d9762737ef9b39a3987
|
4
|
+
data.tar.gz: 6dd4150b29f65e50980dd8977227de8675a6125b3d3977fe20089650f76bae90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26ef149f10a4e953573bacdc3bf19185edeff7d13fc72058bc02d93d453d9573455eb9a9f5d75e0016ece72b1f0440f2431a0351ce9d988784de6a273efc3a9c
|
7
|
+
data.tar.gz: 1e591b860e4f1d4d2152d1b1327488da16d0efc2273d5ceff214180fb58f38bfc78d25859166b0ab67e4f883e140a2d5242a5a3dd95161cc8f2084f58cc9e7ac
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## 3.4.2
|
4
|
+
- Feature - Add option to support gzip compression : [#215](https://github.com/awslabs/aws-fluent-plugin-kinesis/pull/215)
|
5
|
+
|
3
6
|
## 3.4.1
|
4
7
|
|
5
8
|
- Enhancement - Add stream name to debug logs to identify : [#214](https://github.com/awslabs/aws-fluent-plugin-kinesis/pull/214)
|
data/README.md
CHANGED
@@ -353,7 +353,7 @@ Also, there are some format related options below:
|
|
353
353
|
If your record contains a field whose string should be sent to Amazon Kinesis directly (without formatter), use this parameter to specify the field. In that case, other fields than **data_key** are thrown away and never sent to Amazon Kinesis. Default `nil`, which means whole record will be formatted and sent.
|
354
354
|
|
355
355
|
### compression
|
356
|
-
|
356
|
+
Specifying compression way for data of each record. Current accepted options are `zlib` and `gzip`. Otherwise, no compression will be preformed.
|
357
357
|
|
358
358
|
### log_truncate_max_size
|
359
359
|
Integer, default 1024. When emitting the log entry, the message will be truncated by this size to avoid infinite loop when the log is also sent to Kinesis. The value 0 means no truncation.
|
@@ -17,6 +17,7 @@ require 'fluent/msgpack_factory'
|
|
17
17
|
require 'fluent/plugin/output'
|
18
18
|
require 'fluent/plugin/kinesis_helper/client'
|
19
19
|
require 'fluent/plugin/kinesis_helper/api'
|
20
|
+
require 'fluent/plugin/kinesis_helper/compression'
|
20
21
|
require 'zlib'
|
21
22
|
|
22
23
|
module Fluent
|
@@ -121,6 +122,8 @@ module Fluent
|
|
121
122
|
case @compression
|
122
123
|
when "zlib"
|
123
124
|
->(data) { Zlib::Deflate.deflate(data) }
|
125
|
+
when "gzip"
|
126
|
+
->(data) { Gzip.compress(data) }
|
124
127
|
else
|
125
128
|
->(data) { data }
|
126
129
|
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require "stringio"
|
2
|
+
require "zlib"
|
3
|
+
|
4
|
+
class Stream < StringIO
|
5
|
+
def initialize(*)
|
6
|
+
super
|
7
|
+
set_encoding "BINARY"
|
8
|
+
end
|
9
|
+
|
10
|
+
def close
|
11
|
+
rewind;
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
class Gzip
|
16
|
+
def self.compress(string, level = Zlib::DEFAULT_COMPRESSION, strategy = Zlib::DEFAULT_STRATEGY)
|
17
|
+
output = Stream.new
|
18
|
+
gz = Zlib::GzipWriter.new(output, level, strategy)
|
19
|
+
gz.write(string)
|
20
|
+
gz.close
|
21
|
+
output.string
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.decompress(string)
|
25
|
+
Zlib::GzipReader.wrap(StringIO.new(string), &:read)
|
26
|
+
end
|
27
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-kinesis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.4.
|
4
|
+
version: 3.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amazon Web Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|
@@ -308,6 +308,7 @@ files:
|
|
308
308
|
- lib/fluent/plugin/kinesis_helper/aggregator.rb
|
309
309
|
- lib/fluent/plugin/kinesis_helper/api.rb
|
310
310
|
- lib/fluent/plugin/kinesis_helper/client.rb
|
311
|
+
- lib/fluent/plugin/kinesis_helper/compression.rb
|
311
312
|
- lib/fluent/plugin/out_kinesis_firehose.rb
|
312
313
|
- lib/fluent/plugin/out_kinesis_streams.rb
|
313
314
|
- lib/fluent/plugin/out_kinesis_streams_aggregated.rb
|