Sha256: 6c5b2d6c6cfd8031661700ef1733d28d1b70e043c6235875d270611100102b5e
Contents?: true
Size: 553 Bytes
Versions: 12
Compression:
Stored size: 553 Bytes
Contents
module Fluent::Plugin class WebHDFSOutput < Output class Bzip2Compressor < Compressor WebHDFSOutput.register_compressor('bzip2', self) def initialize(options = {}) begin require "bzip2/ffi" rescue LoadError raise Fluent::ConfigError, "Install bzip2-ffi before use bzip2 compressor" end end def ext ".bz2" end def compress(chunk, tmp) Bzip2::FFI::Writer.open(tmp) do |writer| chunk.write_to(writer) end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems