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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0c5ee685f92cabfacf0a90e9eea644309e1cf449
4
- data.tar.gz: c1e5bbdd44e1edb01f6d1a76cef638c4bcfff488
3
+ metadata.gz: 17f0c780754d758ee26da33c7f0aba85764c6299
4
+ data.tar.gz: c14cf263c4d7b8b4adf21f54e0b44bca491f3f0c
5
5
  SHA512:
6
- metadata.gz: 1160bfbe6ea65cac50472fa755309cc81ed66fbb099dd96e7b9a3f6f5350e2cef662815804324c23ada57bcaf1fa537088e7889e0d432b00eb74e1be8ad5fe7a
7
- data.tar.gz: 0ebede5b05e76ba13a8e234201f9f8bb8153e785c6d2307178bb8961455322979438fe11cabe62de459966c60ffd9284554d7456745e0fdd11ad637b46af172a
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({body: records[index], error_code: record[:error_code]})
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
- sleep(calculate_sleep_duration(retry_count))
244
- retry_count += 1
245
- log.warn sprintf('Retrying to put records. Retry count: %d', retry_count)
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
- log.error sprintf(
253
- 'Could not put record, Error: %s, Record: %s',
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
@@ -13,5 +13,5 @@
13
13
  # language governing permissions and limitations under the License.
14
14
 
15
15
  module FluentPluginFirehose
16
- VERSION = '0.0.9'
16
+ VERSION = '0.0.10'
17
17
  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.9
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-08 00:00:00.000000000 Z
12
+ date: 2016-01-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler