class Fluent::Plugin::S3Output::LZOCompressor
Public Instance Methods
compress(chunk, tmp)
click to toggle source
# File lib/fluent/plugin/s3_compressor_lzo.rb, line 21 def compress(chunk, tmp) w = Tempfile.new("chunk-tmp") w.binmode chunk.write_to(w) w.close # We don't check the return code because we can't recover lzop failure. system "lzop #{@command_parameter} -o #{tmp.path} #{w.path}" ensure w.close rescue nil w.unlink rescue nil end
configure(conf)
click to toggle source
Calls superclass method
Fluent::Plugin::S3Output::Compressor#configure
# File lib/fluent/plugin/s3_compressor_lzo.rb, line 8 def configure(conf) super check_command('lzop', 'LZO') end
content_type()
click to toggle source
# File lib/fluent/plugin/s3_compressor_lzo.rb, line 17 def content_type 'application/x-lzop'.freeze end
ext()
click to toggle source
# File lib/fluent/plugin/s3_compressor_lzo.rb, line 13 def ext 'lzo'.freeze end