Class: Fluent::DedupOutput
- Inherits:
-
Output
- Object
- Output
- Fluent::DedupOutput
- Defined in:
- lib/fluent/plugin/out_dedup.rb
Instance Method Summary collapse
Instance Method Details
#configure(conf) ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/fluent/plugin/out_dedup.rb', line 17 def configure(conf) super unless conf.include?('key') raise Fluent::ConfigError, "config parameter `key` is required" end @states = {} end |
#emit(tag, es, chain) ⇒ Object
37 38 39 40 41 42 43 44 |
# File 'lib/fluent/plugin/out_dedup.rb', line 37 def emit(tag, es, chain) es.each do |time, record| next if dup?(tag, record) Fluent::Engine.emit("dedup.#{tag}", time, record) end chain.next end |
#shutdown ⇒ Object
31 32 33 34 35 |
# File 'lib/fluent/plugin/out_dedup.rb', line 31 def shutdown super save_states end |
#start ⇒ Object
25 26 27 28 29 |
# File 'lib/fluent/plugin/out_dedup.rb', line 25 def start super restore_states end |