fluent-plugin-redis 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 76ed9616d363f33920c8a1dd8e4e5596f2a35902
4
- data.tar.gz: 5784039d3c0b6f7ee7d4c7e28a054d54faf91220
3
+ metadata.gz: 772672c27bf0f6509a2929ab120c75f95796e62d
4
+ data.tar.gz: d9438be5e6fee77d90e296fd3f68c3cf108b6e01
5
5
  SHA512:
6
- metadata.gz: c31c34bbd4d1f441b463a256fbee00a34bee3886fbf24619ad7940685e16965db707864831a372195f63476bd6956e4294d26dde7dea6cc4a549f0dcfdee8951
7
- data.tar.gz: e76f25044068976638e066fd2dfc55622cb02bdfb2a1fff5048cd1d8909c8ade7e1250fe942d00d414720d47fc7332fcbc2da28618974a4e0b9ffe600fa3c5c1
6
+ metadata.gz: a7c8f61082e5b520f01e583e22cc0f6e7b40ba480924ec2017b11e1320dfb0e781f5a27728c6eef51d93836e37ab8098d479f55168ac21f8a0bc5955cab09e16
7
+ data.tar.gz: d938a143d5ce6954c671bf666360aa1ce6c354438753b823bb6ce8940e73d166d051a578f231a04405e93f70518bdaa375e3a1700ac4fadb07a7c7a8a3845b8c
@@ -5,6 +5,7 @@ rvm:
5
5
  - 2.1
6
6
  - 2.2
7
7
  - 2.3.3
8
+ - 2.4.0
8
9
  gemfile:
9
10
  - gemfiles/fluentd_v0.14.gemfile
10
11
  - Gemfile
@@ -1,3 +1,8 @@
1
+ ## 0.3.1
2
+
3
+ * Use public msgpack related API instead of internal its API
4
+ * Remove needless rescue block
5
+
1
6
  ## 0.3.0
2
7
 
3
8
  * Migrate v0.14 API based plugin
@@ -38,4 +43,3 @@
38
43
  ## 0.0.1
39
44
 
40
45
  * This initial plugin is released.
41
-
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.2
1
+ 0.3.1
@@ -3,12 +3,12 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "fluent-plugin-redis"
6
- s.version = "0.3.0"
6
+ s.version = "0.3.1"
7
7
  s.platform = Gem::Platform::RUBY
8
8
  s.authors = ["Yuki Nishijima", "Hiroshi Hatake", "Kenji Okimoto"]
9
- s.date = %q{2016-12-06}
9
+ s.date = %q{2017-01-05}
10
10
  s.email = ["mail@yukinishijima.net", "fluent@clear-code.com"]
11
- s.homepage = "http://github.com/yuki24/fluent-plugin-redis"
11
+ s.homepage = "https://github.com/fluent-plugins-nursery/fluent-plugin-redis"
12
12
  s.summary = "Redis output plugin for Fluent"
13
13
 
14
14
  s.files = `git ls-files`.split("\n")
@@ -1,12 +1,9 @@
1
1
  require 'redis'
2
2
  require 'msgpack'
3
- require 'fluent/msgpack_factory'
4
3
  require 'fluent/plugin/output'
5
4
 
6
5
  module Fluent::Plugin
7
6
  class RedisOutput < Output
8
- include Fluent::MessagePackFactory::Mixin
9
-
10
7
  Fluent::Plugin.register_output('redis', self)
11
8
 
12
9
  helpers :compat_parameters, :inject
@@ -38,6 +35,7 @@ module Fluent::Plugin
38
35
  end
39
36
  raise Fluent::ConfigError, "'tag' in chunk_keys is required." if not @chunk_key_tag
40
37
  raise Fluent::ConfigError, "'time' in chunk_keys is required." if not @chunk_key_time
38
+ @unpacker = Fluent::Engine.msgpack_factory.unpacker
41
39
  end
42
40
 
43
41
  def start
@@ -72,15 +70,10 @@ module Fluent::Plugin
72
70
  tag, time = expand_placeholders(chunk.metadata)
73
71
  @redis.pipelined {
74
72
  unless @allow_duplicate_key
75
- chunk.open { |io|
76
- begin
77
- msgpack_unpacker(io).each.with_index { |record, index|
78
- identifier = [tag, time].join(".")
79
- @redis.mapped_hmset "#{identifier}.#{index}", record[2]
80
- }
81
- rescue EOFError
82
- # EOFError always occured when reached end of chunk.
83
- end
73
+ stream = chunk.to_msgpack_stream
74
+ @unpacker.feed_each(stream).with_index { |record, index|
75
+ identifier = [tag, time].join(".")
76
+ @redis.mapped_hmset "#{identifier}.#{index}", record[2]
84
77
  }
85
78
  else
86
79
  chunk.each do |_tag, _time, record|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-redis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuki Nishijima
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-12-06 00:00:00.000000000 Z
13
+ date: 2017-01-05 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: fluentd
@@ -123,7 +123,7 @@ files:
123
123
  - gemfiles/fluentd_v0.14.gemfile
124
124
  - lib/fluent/plugin/out_redis.rb
125
125
  - test/plugin/test_out_redis.rb
126
- homepage: http://github.com/yuki24/fluent-plugin-redis
126
+ homepage: https://github.com/fluent-plugins-nursery/fluent-plugin-redis
127
127
  licenses: []
128
128
  metadata: {}
129
129
  post_install_message:
@@ -142,7 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
142
142
  version: '0'
143
143
  requirements: []
144
144
  rubyforge_project:
145
- rubygems_version: 2.5.1
145
+ rubygems_version: 2.6.8
146
146
  signing_key:
147
147
  specification_version: 4
148
148
  summary: Redis output plugin for Fluent