Class: Fluent::JubatusOutput
- Inherits:
-
Output
- Object
- Output
- Fluent::JubatusOutput
- Defined in:
- lib/fluent/plugin/out_jubatus.rb
Instance Method Summary collapse
- #configure(conf) ⇒ Object
- #emit(tag, es, chain) ⇒ Object
-
#initialize ⇒ JubatusOutput
constructor
A new instance of JubatusOutput.
- #shutdown ⇒ Object
- #start ⇒ Object
Constructor Details
#initialize ⇒ JubatusOutput
Returns a new instance of JubatusOutput.
13 14 15 16 |
# File 'lib/fluent/plugin/out_jubatus.rb', line 13 def initialize super require 'fluent/plugin/jubatus' end |
Instance Method Details
#configure(conf) ⇒ Object
18 19 20 21 22 23 |
# File 'lib/fluent/plugin/out_jubatus.rb', line 18 def configure(conf) super str = @str_keys.split(/,/).map{|key| key.strip } num = @num_keys.split(/,/).map{|key| key.strip } @keys = {str: str, num: num} end |
#emit(tag, es, chain) ⇒ Object
33 34 35 36 37 38 39 40 |
# File 'lib/fluent/plugin/out_jubatus.rb', line 33 def emit(tag, es, chain) es.each do |time, record| result = result_format(@client_api, jubatus_run(record)) Engine.emit(@tag, time, result) end chain.next end |
#shutdown ⇒ Object
29 30 31 |
# File 'lib/fluent/plugin/out_jubatus.rb', line 29 def shutdown super end |
#start ⇒ Object
25 26 27 |
# File 'lib/fluent/plugin/out_jubatus.rb', line 25 def start super end |