Class: Fluent::SolrOutput
Overview
Solr output plugin for Fluent
Instance Attribute Summary
#localtime
Instance Method Summary
collapse
Methods included from SolrUtil
#update_core, #update_core_request
Constructor Details
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
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
|
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
|