fluent-plugin-redis 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +13 -1
- data/fluent-plugin-redis.gemspec +2 -2
- data/lib/fluent/plugin/out_redis.rb +10 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc27a03a225977f7a940849612abe4dfb8f42de1
|
4
|
+
data.tar.gz: b0177ec3657cb3407b504983afbb0e4fbd417b22
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c46bd642616f50876b99845091a80cf10a925d7d175edf12c7e2f3a7589bf3b3b84216cdbb60280059f9c86791fe4fafd05f1a6e48a1e3f39281773bc23784c
|
7
|
+
data.tar.gz: b8733653372daf3b105b3f41d9d8f73570516cdc2b35f800def7c890a8b59bd1a1121191ddb45a4a9238546fe317fba62cc0c4ef45aba0be516c23f112d8bc41
|
data/README.md
CHANGED
@@ -43,6 +43,14 @@ Then fluent automatically loads the plugin installed.
|
|
43
43
|
# ttl 300 # If 0 or negative value is set, ttl is not set in each key.
|
44
44
|
</match>
|
45
45
|
|
46
|
+
### With multi workers
|
47
|
+
|
48
|
+
fluent-plugin-redis can handle <em>multi workers</em>.
|
49
|
+
This feature can be enabled with the following configuration:
|
50
|
+
|
51
|
+
<system>
|
52
|
+
workers n # where n >= 2.
|
53
|
+
</system>
|
46
54
|
|
47
55
|
### Notice
|
48
56
|
|
@@ -50,8 +58,12 @@ Then fluent automatically loads the plugin installed.
|
|
50
58
|
|
51
59
|
They can use v0.3.0 or later. To use this parameters, users must update Fluentd to v0.14 or later and this plugin to v0.3.0 or later.
|
52
60
|
|
61
|
+
<em>multi workers</em> are newly introduced feature in Fluentd v0.14.
|
62
|
+
|
63
|
+
It can use this fetaure in this plugin in v0.3.3 or later.
|
64
|
+
|
53
65
|
## Contributing to fluent-plugin-redis
|
54
|
-
|
66
|
+
|
55
67
|
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
|
56
68
|
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
|
57
69
|
* Fork the project
|
data/fluent-plugin-redis.gemspec
CHANGED
@@ -3,10 +3,10 @@ $:.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.3"
|
7
7
|
s.platform = Gem::Platform::RUBY
|
8
8
|
s.authors = ["Yuki Nishijima", "Hiroshi Hatake", "Kenji Okimoto"]
|
9
|
-
s.date = %q{2017-
|
9
|
+
s.date = %q{2017-04-17}
|
10
10
|
s.email = ["mail@yukinishijima.net", "fluent@clear-code.com"]
|
11
11
|
s.homepage = "https://github.com/fluent-plugins-nursery/fluent-plugin-redis"
|
12
12
|
s.summary = "Redis output plugin for Fluent"
|
@@ -30,6 +30,7 @@ module Fluent::Plugin
|
|
30
30
|
|
31
31
|
def configure(conf)
|
32
32
|
compat_parameters_convert(conf, :buffer, :inject)
|
33
|
+
@running_multi_workers = system_config.workers > 1
|
33
34
|
super
|
34
35
|
|
35
36
|
if conf.has_key?('namespace')
|
@@ -68,13 +69,21 @@ module Fluent::Plugin
|
|
68
69
|
true
|
69
70
|
end
|
70
71
|
|
72
|
+
def multi_workers_ready?
|
73
|
+
true
|
74
|
+
end
|
75
|
+
|
71
76
|
def write(chunk)
|
72
77
|
tag, time = expand_placeholders(chunk.metadata)
|
73
78
|
@redis.pipelined {
|
74
79
|
unless @allow_duplicate_key
|
75
80
|
stream = chunk.to_msgpack_stream
|
76
81
|
@unpacker.feed_each(stream).with_index { |record, index|
|
77
|
-
identifier =
|
82
|
+
identifier = if @running_multi_workers
|
83
|
+
[tag, time, fluentd_worker_id].join(".")
|
84
|
+
else
|
85
|
+
[tag, time].join(".")
|
86
|
+
end
|
78
87
|
@redis.multi do
|
79
88
|
@redis.mapped_hmset "#{identifier}.#{index}", record[2]
|
80
89
|
@redis.expire "#{identifier}.#{index}", @ttl if @ttl > 0
|
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.3
|
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: 2017-
|
13
|
+
date: 2017-04-17 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: fluentd
|
@@ -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.6.
|
145
|
+
rubygems_version: 2.6.11
|
146
146
|
signing_key:
|
147
147
|
specification_version: 4
|
148
148
|
summary: Redis output plugin for Fluent
|