Class: Fluent::SolrOutput
- Inherits:
-
BufferedOutput
- Object
- BufferedOutput
- Fluent::SolrOutput
- Includes:
- SolrConfigCommon, SolrUtil
- Defined in:
- lib/fluent/plugin/out_solr.rb
Overview
Solr output plugin for Fluent
Instance Attribute Summary
Attributes included from SolrConfigCommon
Instance Method Summary collapse
- #configure(conf) ⇒ Object
- #format(tag, time, record) ⇒ Object
-
#initialize ⇒ SolrOutput
constructor
A new instance of SolrOutput.
- #shutdown ⇒ Object
- #start ⇒ Object
- #write(chunk) ⇒ Object
Methods included from SolrUtil
Constructor Details
#initialize ⇒ SolrOutput
Returns a new instance of SolrOutput.
15 16 17 18 19 20 21 |
# File 'lib/fluent/plugin/out_solr.rb', line 15 def initialize require 'net/http' require 'uri' require 'time' super @localtime = true end |
Instance Method Details
#configure(conf) ⇒ Object
23 24 25 26 27 28 29 30 |
# File 'lib/fluent/plugin/out_solr.rb', line 23 def configure(conf) if conf['utc'] @localtime = false elsif conf['localtime'] @localtime = true end super end |
#format(tag, time, record) ⇒ Object
36 37 38 |
# File 'lib/fluent/plugin/out_solr.rb', line 36 def format(tag, time, record) [tag, time, record].to_msgpack end |
#shutdown ⇒ Object
40 41 42 |
# File 'lib/fluent/plugin/out_solr.rb', line 40 def shutdown super end |
#start ⇒ Object
32 33 34 |
# File 'lib/fluent/plugin/out_solr.rb', line 32 def start super end |
#write(chunk) ⇒ Object
44 45 46 |
# File 'lib/fluent/plugin/out_solr.rb', line 44 def write(chunk) update_core(chunk, @core) end |