fluent-plugin-s3 1.1.7 → 1.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ChangeLog +5 -0
- data/README.md +7 -5
- data/VERSION +1 -1
- data/lib/fluent/plugin/in_s3.rb +19 -11
- data/lib/fluent/plugin/out_s3.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 706ac1da3860e8310ea63b3a0acdb3d819f327ed
|
4
|
+
data.tar.gz: a5dc2d7ed59f8af1f1ecbba02cbb6b8b49b9f256
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de3ef963574a32ea2ccb517e7ea6e6a8e17b8489e2b8809f8ba3a243d695f4d0e14a5e91d238b93fa703c892a487bf0f9a172870ac249cef438b98e5edd707e9
|
7
|
+
data.tar.gz: c2e79fb312a87fddda7c5d8dfef25448c59d3923a89f03c904e93891aa203a13c3f174ba087d3da8edc69b5146cc0ee137b6fd9a1a7b727e68dbe0710a24cde0
|
data/ChangeLog
CHANGED
data/README.md
CHANGED
@@ -282,11 +282,9 @@ to decide keys dynamically.
|
|
282
282
|
* %{path} is exactly the value of **path** configured in the configuration file.
|
283
283
|
E.g., "logs/" in the example configuration above.
|
284
284
|
* %{time_slice} is the
|
285
|
-
time-slice in text that are formatted with **time_slice_format**.
|
286
|
-
the sequential number starts from 0, increments when multiple files are
|
287
|
-
|
288
|
-
* %{file_extention} is always "gz" for
|
289
|
-
now.
|
285
|
+
time-slice in text that are formatted with **time_slice_format**.
|
286
|
+
* %{index} is the sequential number starts from 0, increments when multiple files are uploaded to S3 in the same time slice.
|
287
|
+
* %{file_extension} depends on **store_as** parameter.
|
290
288
|
* %{uuid_flush} a uuid that is replaced everytime the buffer will be flushed. If you want to use this placeholder, install `uuidtools` gem first.
|
291
289
|
* %{hostname} is replaced with `Socket.gethostname` result.
|
292
290
|
* %{hex_random} a random hex string that is replaced for each buffer chunk, not
|
@@ -652,6 +650,10 @@ When true, messages are not deleted after polling block. Default is false.
|
|
652
650
|
|
653
651
|
The long polling interval. Default is 20.
|
654
652
|
|
653
|
+
**sqs/retry_error_interval**
|
654
|
+
|
655
|
+
Interval to retry polling SQS if polling unsuccessful, in seconds. Default is 300.
|
656
|
+
|
655
657
|
## IAM Policy
|
656
658
|
|
657
659
|
The following is an example for a minimal IAM policy needed to write to an s3
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.8
|
data/lib/fluent/plugin/in_s3.rb
CHANGED
@@ -86,6 +86,8 @@ module Fluent::Plugin
|
|
86
86
|
config_param :skip_delete, :bool, default: false
|
87
87
|
desc "The long polling interval."
|
88
88
|
config_param :wait_time_seconds, :integer, default: 20
|
89
|
+
desc "Polling error retry interval."
|
90
|
+
config_param :retry_error_interval, :integer, default: 300
|
89
91
|
end
|
90
92
|
|
91
93
|
desc "Tag string"
|
@@ -159,18 +161,24 @@ module Fluent::Plugin
|
|
159
161
|
@poller.before_request do |stats|
|
160
162
|
throw :stop_polling unless @running
|
161
163
|
end
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
164
|
+
begin
|
165
|
+
@poller.poll(options) do |message|
|
166
|
+
begin
|
167
|
+
body = Yajl.load(message.body)
|
168
|
+
log.debug(body)
|
169
|
+
next unless body["Records"] # skip test queue
|
170
|
+
|
171
|
+
process(body)
|
172
|
+
rescue => e
|
173
|
+
log.warn(error: e)
|
174
|
+
log.warn_backtrace(e.backtrace)
|
175
|
+
throw :skip_delete
|
176
|
+
end
|
173
177
|
end
|
178
|
+
rescue => e
|
179
|
+
log.warn("SQS Polling Failed. Retry in #{@sqs.retry_error_interval} seconds")
|
180
|
+
sleep(@sqs.retry_error_interval)
|
181
|
+
retry
|
174
182
|
end
|
175
183
|
end
|
176
184
|
|
data/lib/fluent/plugin/out_s3.rb
CHANGED
@@ -152,8 +152,8 @@ module Fluent::Plugin
|
|
152
152
|
begin
|
153
153
|
buffer_type = @buffer_config[:@type]
|
154
154
|
@compressor = COMPRESSOR_REGISTRY.lookup(@store_as).new(buffer_type: buffer_type, log: log)
|
155
|
-
rescue
|
156
|
-
log.warn "#{@store_as} not
|
155
|
+
rescue => e
|
156
|
+
log.warn "'#{@store_as}' not supported. Use 'text' instead: error = #{e.message}"
|
157
157
|
@compressor = TextCompressor.new
|
158
158
|
end
|
159
159
|
@compressor.configure(conf)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-s3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sadayuki Furuhashi
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2019-01-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: fluentd
|