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 +4 -4
- data/.travis.yml +1 -0
- data/CHANGELOG.md +5 -1
- data/VERSION +1 -1
- data/fluent-plugin-redis.gemspec +3 -3
- data/lib/fluent/plugin/out_redis.rb +5 -12
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 772672c27bf0f6509a2929ab120c75f95796e62d
|
4
|
+
data.tar.gz: d9438be5e6fee77d90e296fd3f68c3cf108b6e01
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7c8f61082e5b520f01e583e22cc0f6e7b40ba480924ec2017b11e1320dfb0e781f5a27728c6eef51d93836e37ab8098d479f55168ac21f8a0bc5955cab09e16
|
7
|
+
data.tar.gz: d938a143d5ce6954c671bf666360aa1ce6c354438753b823bb6ce8940e73d166d051a578f231a04405e93f70518bdaa375e3a1700ac4fadb07a7c7a8a3845b8c
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.3.1
|
data/fluent-plugin-redis.gemspec
CHANGED
@@ -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.
|
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{
|
9
|
+
s.date = %q{2017-01-05}
|
10
10
|
s.email = ["mail@yukinishijima.net", "fluent@clear-code.com"]
|
11
|
-
s.homepage = "
|
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.
|
76
|
-
|
77
|
-
|
78
|
-
|
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.
|
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:
|
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:
|
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.
|
145
|
+
rubygems_version: 2.6.8
|
146
146
|
signing_key:
|
147
147
|
specification_version: 4
|
148
148
|
summary: Redis output plugin for Fluent
|