fluent-plugin-s3 1.0.0.rc6 → 1.0.0.rc7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/fluent/plugin/out_s3.rb +12 -7
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2dd861e069bcd31f8ad2706fc50c1092f5af8dcb
4
- data.tar.gz: 1f81371995e0055d970588c90ee4935cfbfde130
3
+ metadata.gz: a9004ff4bae66456aef22c473fc4c3ec84605550
4
+ data.tar.gz: 0542d73f21a39bda4c57ec89d72b17f48b8a7d54
5
5
  SHA512:
6
- metadata.gz: 98d38a22b4c2dda74f9cfc16563fab382734e86b46e8a7571c89e38602b3ef45620e566feb9344faae77ff3cc1fd4ef19ad022105483db80a7fcf2545942ee80
7
- data.tar.gz: 6912ead0e0351b6cae5bcdd4f92661c6a15221cb26056c508e466eb1cd8dee0b546e65bfb9e4fb51aebeeb60271fc0d0feaa6c69327e858cb7ec8660953369d7
6
+ metadata.gz: 6b7854777efd1ca785af9ccb2cf3fe02da3dd854ef6a4df0d9fc7d924efedb566f924841c6b7f21ba68fb20f637ad8c87b6d79356027d1567e998df19a30f801
7
+ data.tar.gz: f81bee6a69a7bf90ba8527018319e2e14a635460fae602e9588d67037a67bfd4f2475d6c51f7429a71052c444fe84f14475ff60da3ec230b7ad177c7c93945b0
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0.rc6
1
+ 1.0.0.rc7
@@ -160,6 +160,15 @@ module Fluent::Plugin
160
160
  end
161
161
 
162
162
  @s3_object_key_format = process_s3_object_key_format
163
+ if !@check_object
164
+ if conf.has_key?('s3_object_key_format')
165
+ log.warn "Set 'check_object false' and s3_object_key_format is specified. Check s3_object_key_format is unique in each write. If not, existing file will be overwritten."
166
+ else
167
+ log.warn "Set 'check_object false' and s3_object_key_format is not specified. Use '%{path}/%{date_slice}_%{hms_slice}.%{file_extension}' for s3_object_key_format"
168
+ @s3_object_key_format = "%{path}/%{date_slice}_%{hms_slice}.%{file_extension}"
169
+ end
170
+ end
171
+
163
172
  # For backward compatibility
164
173
  # TODO: Remove time_slice_format when end of support compat_parameters
165
174
  @configured_time_slice_format = conf['time_slice_format']
@@ -192,10 +201,6 @@ module Fluent::Plugin
192
201
  check_apikeys if @check_apikey_on_start
193
202
  ensure_bucket if @check_bucket
194
203
 
195
- if !@check_object
196
- @s3_object_key_format = "%{path}/%{date_slice}_%{hms_slice}.%{file_extension}"
197
- end
198
-
199
204
  super
200
205
  end
201
206
 
@@ -253,7 +258,7 @@ module Fluent::Plugin
253
258
  }
254
259
  values_for_s3_object_key = {
255
260
  "%{path}" => @path,
256
- "%{time_slice}" => time_slice,
261
+ "%{date_slice}" => time_slice,
257
262
  "%{file_extension}" => @compressor.ext,
258
263
  "%{hms_slice}" => hms_slicer,
259
264
  }.merge!(@values_for_s3_object_chunk[chunk.unique_id])
@@ -268,7 +273,7 @@ module Fluent::Plugin
268
273
  begin
269
274
  @compressor.compress(chunk, tmp)
270
275
  tmp.rewind
271
- log.debug { "out_s3: write chunk: {key:#{chunk.key},tsuffix:#{tsuffix(chunk)}} to s3://#{@s3_bucket}/#{s3path}" }
276
+ log.debug "out_s3: write chunk with metadata #{chunk.metadata} to s3://#{@s3_bucket}/#{s3path}"
272
277
 
273
278
  put_options = {
274
279
  body: tmp,
@@ -294,7 +299,7 @@ module Fluent::Plugin
294
299
 
295
300
  if @warn_for_delay
296
301
  if Time.at(chunk.metadata.timekey) < Time.now - @warn_for_delay
297
- log.warn { "out_s3: delayed events were put to s3://#{@s3_bucket}/#{s3path}" }
302
+ log.warn "out_s3: delayed events were put to s3://#{@s3_bucket}/#{s3path}"
298
303
  end
299
304
  end
300
305
  ensure
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.0.0.rc6
4
+ version: 1.0.0.rc7
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: 2017-08-30 00:00:00.000000000 Z
12
+ date: 2017-10-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fluentd