fluent-plugin-s3 0.7.1 → 0.7.2

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: f5f479caba1c3280aa3d9cb83186473afb3c192c
4
- data.tar.gz: b1d0ed15c3cee9e9fa3f3b39668f2676f6471870
3
+ metadata.gz: 55e080d8a3659c9031a55c444803d30f9fc748de
4
+ data.tar.gz: 09d5d7227c24f4f997e88d7a5d8ea41fb24aaf1a
5
5
  SHA512:
6
- metadata.gz: a37ef95d2298ca9f64fbc72fb5facec926862d0dedc40420f6f19baae4af32d16fb44be0122c2788355b29244ba804e9fdfd9b6263615860c7796a32b32a3870
7
- data.tar.gz: 3286ceedbd344873fd79987f2f413096e579b2164c932200943fefd1e6cff467a3aa78abd6991d10a15cc3d9d16c965efdc915da20ffc5f713daca9fc9b31fbf
6
+ metadata.gz: 49e4ba0663061d8443a9603a0d465b491a23f4e286d1e620d8f1cb8a5bbde204c0a274d60c088181e22b181a702881ca39664764b88fc02ad75d73615a604ebc
7
+ data.tar.gz: 13da940d95c312cf99f7fc632493a2d1c5b36e397528212a45de930520c61250e7f798a2d6f498d9d7e6825f5b660e7cedfabb6462b33d53782eafd66d600ec5
data/ChangeLog CHANGED
@@ -1,3 +1,9 @@
1
+ Release 0.7.2 - 2016/10/20
2
+
3
+ * in_s3: Replace old parser API with new one
4
+ * in_s3: Don't stop SQS polling when error happens
5
+
6
+
1
7
  Release 0.7.1 - 2016/09/02
2
8
 
3
9
  * Support IAM role for Amazon ECS task
data/README.md CHANGED
@@ -47,7 +47,8 @@ Simply use RubyGems:
47
47
  **aws_key_id**
48
48
 
49
49
  AWS access key id. This parameter is required when your agent is not
50
- running on EC2 instance with an IAM Role.
50
+ running on EC2 instance with an IAM Role. When using an IAM role, make
51
+ sure to configure `instance_profile_credentials`. Usage can be found below.
51
52
 
52
53
  **aws_sec_key**
53
54
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.1
1
+ 0.7.2
@@ -148,8 +148,8 @@ module Fluent
148
148
 
149
149
  process(body)
150
150
  rescue => e
151
- log.warn "#{e.message}\n#{e.backtrace.join("\n")}"
152
- @running = false
151
+ log.warn(error: e)
152
+ log.warn_backtrace(e.backtrace)
153
153
  throw :skip_delete
154
154
  end
155
155
  end
@@ -217,10 +217,13 @@ module Fluent
217
217
 
218
218
  io = @bucket.object(key).get.body
219
219
  content = @extractor.extract(io)
220
+ es = MultiEventStream.new
220
221
  content.each_line do |line|
221
- time, record = @parser.parse(line)
222
- router.emit(@tag, time, record)
222
+ @parser.parse(line) do |time, record|
223
+ es.add(time, record)
224
+ end
223
225
  end
226
+ router.emit_stream(@tag, es)
224
227
  end
225
228
 
226
229
  class Extractor
data/test/test_in_s3.rb CHANGED
@@ -12,6 +12,9 @@ class S3InputTest < Test::Unit::TestCase
12
12
  Fluent::Test.setup
13
13
  @time = Time.parse("2015-09-30 13:14:15 UTC").to_i
14
14
  Fluent::Engine.now = @time
15
+ if Fluent.const_defined?(:EventTime)
16
+ stub(Fluent::EventTime).now { @time }
17
+ end
15
18
  end
16
19
 
17
20
  CONFIG = %[
@@ -178,9 +181,7 @@ class S3InputTest < Test::Unit::TestCase
178
181
  [message]
179
182
  }
180
183
  assert_nothing_raised do
181
- d.run do
182
- d.instance.router.emit("input.s3", @time, { "message" => "aaa" })
183
- end
184
+ d.run
184
185
  end
185
186
  end
186
187
 
@@ -218,11 +219,7 @@ class S3InputTest < Test::Unit::TestCase
218
219
  [message]
219
220
  }
220
221
  assert_nothing_raised do
221
- d.run do
222
- d.instance.router.emit("input.s3", @time, { "message" => "aaa\n" })
223
- d.instance.router.emit("input.s3", @time, { "message" => "bbb\n" })
224
- d.instance.router.emit("input.s3", @time, { "message" => "ccc\n" })
225
- end
222
+ d.run
226
223
  end
227
224
  end
228
225
  end
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: 0.7.1
4
+ version: 0.7.2
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: 2016-09-02 00:00:00.000000000 Z
12
+ date: 2016-10-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fluentd