Module: Fluent::GridDBData

Included in:
Plugin::GriddbOutput
Defined in:
lib/fluent/plugin/griddb_data.rb

Instance Method Summary collapse

Instance Method Details

#chunk_convert(chunk) ⇒ Object

Format for chunk data



8
9
10
11
12
13
14
15
16
# File 'lib/fluent/plugin/griddb_data.rb', line 8

def chunk_convert(chunk)
	arrays_2 = Array.new
	tmp = Array.new
	chunk.msgpack_each do |time, record|
		tmp = hash_to_array(record)
		arrays_2.push(tmp)
	end			
	arrays_2
end

#convert(record) ⇒ Object

Format for each record



19
20
21
22
23
# File 'lib/fluent/plugin/griddb_data.rb', line 19

def convert(record)
	arrays_2 = Array.new
	tmp = hash_to_array(record)
	arrays_2.push(tmp)
end

#hash_to_array(record) ⇒ Object

Covert from hash object to array



26
27
28
29
30
31
32
# File 'lib/fluent/plugin/griddb_data.rb', line 26

def hash_to_array(record)
	arr = Array.new
	record.map do |key, val |
		arr.push(val)
	end			
	arr
end