Class: Fluent::Plugin::ArrowMemoryBuffer

Inherits:
Buffer
  • Object
show all
Defined in:
lib/fluent/plugin/buf_arrow_memory.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#arrow_schemaObject (readonly)

Returns the value of attribute arrow_schema.



29
30
31
# File 'lib/fluent/plugin/buf_arrow_memory.rb', line 29

def arrow_schema
  @arrow_schema
end

Instance Method Details

#configure(conf) ⇒ Object



31
32
33
34
35
36
# File 'lib/fluent/plugin/buf_arrow_memory.rb', line 31

def configure(conf)
  super

  # [{"name" => foo1, "type" => "uint64"}, {"name" => foo2, "type" => "struct", "fields" => [{"name" => bar1, "type" => "string"}]}
  @arrow_schema = ::Arrow::Schema.new(@schema)
end

#generate_chunk(metadata) ⇒ Object



42
43
44
# File 'lib/fluent/plugin/buf_arrow_memory.rb', line 42

def generate_chunk()
  Fluent::Plugin::Buffer::ArrowMemoryChunk.new(, @arrow_schema, chunk_size: @row_group_chunk_size, format: @arrow_format)
end

#resumeObject



38
39
40
# File 'lib/fluent/plugin/buf_arrow_memory.rb', line 38

def resume
  return {}, []
end