fluent-plugin-firehose 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fluent/plugin/out_firehose.rb +13 -14
- data/lib/fluent/plugin/version.rb +1 -1
- 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: 17f0c780754d758ee26da33c7f0aba85764c6299
|
4
|
+
data.tar.gz: c14cf263c4d7b8b4adf21f54e0b44bca491f3f0c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc82dc2d5354dc58268f005d3ff806af35273d0aefab42ec62f55dcef3eb495083711a4d8850a619106fc2ac7a19069e8e6127a313e1dc321dde0c191579fbc9
|
7
|
+
data.tar.gz: 15018fb7f1d77af6418d19da3dfbac6b87739a105d991008fc694ec5131d9912ea5d57084183b52b86da4e32f00b0037e50b8fdd6a21a9082461a737444ab537
|
@@ -218,7 +218,7 @@ module FluentPluginFirehose
|
|
218
218
|
records_array
|
219
219
|
end
|
220
220
|
|
221
|
-
def put_record_batch_with_retry(records,retry_count=0)
|
221
|
+
def put_record_batch_with_retry(records, retry_count=0)
|
222
222
|
response = @client.put_record_batch(
|
223
223
|
records: records,
|
224
224
|
delivery_stream_name: @delivery_stream_name
|
@@ -232,28 +232,27 @@ module FluentPluginFirehose
|
|
232
232
|
failed_records = []
|
233
233
|
response[:request_responses].each_with_index{|record,index|
|
234
234
|
if record[:error_code]
|
235
|
-
failed_records.push({
|
236
|
-
log.info sprintf('Put record attempt failed, Error: %s, Record: %s',
|
237
|
-
record[:error_code],
|
238
|
-
@dump_class.dump(record[:body]))
|
235
|
+
failed_records.push({error_code: record[:error_code], error_message: record[:error_message], body: records[index]})
|
239
236
|
end
|
240
237
|
}
|
241
|
-
|
238
|
+
|
242
239
|
if(retry_count < @retries_on_putrecordbatch)
|
243
|
-
|
244
|
-
|
245
|
-
|
240
|
+
failed_records.each{|record|
|
241
|
+
log.info sprintf('Put record attempt failed, error_code: %s, error_message: %s, record: %s',
|
242
|
+
record[:error_code], record[:error_message], @dump_class.dump(record[:body]))
|
243
|
+
}
|
244
|
+
|
245
|
+
sleep(calculate_sleep_duration(retry_count))
|
246
|
+
retry_count += 1
|
247
|
+
log.warn sprintf('Retrying to put %d records, Retry count: %d', failed_records.length, retry_count)
|
246
248
|
put_record_batch_with_retry(
|
247
249
|
failed_records.map{|record| record[:body]},
|
248
250
|
retry_count
|
249
251
|
)
|
250
252
|
else
|
251
253
|
failed_records.each{|record|
|
252
|
-
|
253
|
-
|
254
|
-
record[:error_code],
|
255
|
-
@dump_class.dump(record[:body])
|
256
|
-
)
|
254
|
+
log.error sprintf('Could not put record, error_code: %s, error_message: %s, record: %s',
|
255
|
+
record[:error_code], record[:error_message], @dump_class.dump(record[:body]))
|
257
256
|
}
|
258
257
|
end
|
259
258
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-firehose
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ji Oh Yoo
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-01-
|
12
|
+
date: 2016-01-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|