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 +4 -4
- data/ChangeLog +6 -0
- data/README.md +2 -1
- data/VERSION +1 -1
- data/lib/fluent/plugin/in_s3.rb +7 -4
- data/test/test_in_s3.rb +5 -8
- 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: 55e080d8a3659c9031a55c444803d30f9fc748de
|
4
|
+
data.tar.gz: 09d5d7227c24f4f997e88d7a5d8ea41fb24aaf1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49e4ba0663061d8443a9603a0d465b491a23f4e286d1e620d8f1cb8a5bbde204c0a274d60c088181e22b181a702881ca39664764b88fc02ad75d73615a604ebc
|
7
|
+
data.tar.gz: 13da940d95c312cf99f7fc632493a2d1c5b36e397528212a45de930520c61250e7f798a2d6f498d9d7e6825f5b660e7cedfabb6462b33d53782eafd66d600ec5
|
data/ChangeLog
CHANGED
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
|
+
0.7.2
|
data/lib/fluent/plugin/in_s3.rb
CHANGED
@@ -148,8 +148,8 @@ module Fluent
|
|
148
148
|
|
149
149
|
process(body)
|
150
150
|
rescue => e
|
151
|
-
log.warn
|
152
|
-
|
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
|
-
|
222
|
-
|
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
|
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
|
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.
|
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-
|
12
|
+
date: 2016-10-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: fluentd
|