class Fluent::Plugin::S3Input::LZOExtractor
Public Instance Methods
Source
# File lib/fluent/plugin/s3_extractor_lzo.rb, line 8 def configure(conf) super check_command('lzop', 'LZO') end
Calls superclass method
Fluent::Plugin::S3Input::Extractor#configure
Source
# File lib/fluent/plugin/s3_extractor_lzo.rb, line 17 def content_type 'application/x-lzop'.freeze end
Source
# File lib/fluent/plugin/s3_extractor_lzo.rb, line 21 def extract(io) path = if io.respond_to?(path) io.path else temp = Tempfile.new("lzop-temp") temp.write(io.read) temp.close temp.path end stdout, succeeded = Open3.capture2("lzop #{@command_parameter} #{path}") if succeeded stdout else raise "Failed to extract #{path} with lzop command." end end