class Fluent::Plugin::Buffer::ArrowMemoryChunk
Public Class Methods
new(metadata, schema, chunk_size: 1024, format: :arrow)
click to toggle source
Calls superclass method
# File lib/fluent/plugin/buffer/arrow_memory_chunk.rb, line 29 def initialize(metadata, schema, chunk_size: 1024, format: :arrow) super(metadata, compress: :text) @schema = schema @chunk_size = chunk_size @format = format end
Public Instance Methods
open(**kwargs, &block)
click to toggle source
# File lib/fluent/plugin/buffer/arrow_memory_chunk.rb, line 40 def open(**kwargs, &block) StringIO.open(build_arrow_buffer_string, &block) end
read(**kwargs)
click to toggle source
# File lib/fluent/plugin/buffer/arrow_memory_chunk.rb, line 36 def read(**kwargs) build_arrow_buffer_string end
write_to(io, **kwargs)
click to toggle source
# File lib/fluent/plugin/buffer/arrow_memory_chunk.rb, line 44 def write_to(io, **kwargs) # re-implementation to optimize not to create StringIO io.write build_arrow_buffer_string end
Private Instance Methods
each_record(&block)
click to toggle source
# File lib/fluent/plugin/buffer/arrow_memory_chunk.rb, line 51 def each_record(&block) Fluent::MessagePackFactory.engine_factory.unpacker.feed_each(@chunk, &block) end