Class: Fluent::Plugin::GroongaOutput
- Inherits:
-
Output
- Object
- Output
- Fluent::Plugin::GroongaOutput
show all
- Defined in:
- lib/fluent/plugin/out_groonga.rb
Defined Under Namespace
Modules: DefinitionParseMethods
Classes: BaseClient, CommandClient, Emitter, NetworkClient, Schema, TableDefinition, TablesCreator
Instance Method Summary
collapse
Constructor Details
Returns a new instance of GroongaOutput.
30
31
32
|
# File 'lib/fluent/plugin/out_groonga.rb', line 30
def initialize
super
end
|
Instance Method Details
80
81
82
83
84
85
86
87
88
89
90
91
92
|
# File 'lib/fluent/plugin/out_groonga.rb', line 80
def configure(conf)
compat_parameters_convert(conf, :buffer)
super
@client = create_client(@protocol)
@client.configure(conf)
@schema = Schema.new(@client, @store_table, @mappings)
@emitter = Emitter.new(@client, @store_table, @schema)
@tables = @tables.collect do |table|
TableDefinition.new(table)
end
end
|
112
113
114
|
# File 'lib/fluent/plugin/out_groonga.rb', line 112
def format(tag, time, record)
[tag, time, record].to_msgpack
end
|
116
117
118
|
# File 'lib/fluent/plugin/out_groonga.rb', line 116
def formatted_to_msgpack_binary
true
end
|
#multi_workers_ready? ⇒ Boolean
108
109
110
|
# File 'lib/fluent/plugin/out_groonga.rb', line 108
def multi_workers_ready?
true
end
|
#shutdown ⇒ Object
102
103
104
105
106
|
# File 'lib/fluent/plugin/out_groonga.rb', line 102
def shutdown
super
@emitter.shutdown
@client.shutdown
end
|
#start ⇒ Object
94
95
96
97
98
99
100
|
# File 'lib/fluent/plugin/out_groonga.rb', line 94
def start
super
@client.start
@emitter.start
tables_creator = TablesCreator.new(@client, @tables)
tables_creator.create
end
|
#write(chunk) ⇒ Object
120
121
122
|
# File 'lib/fluent/plugin/out_groonga.rb', line 120
def write(chunk)
@emitter.emit(chunk)
end
|