Sha256: ca0d8189f9bebef177999f6e8ba07c5bdb31482818d8ed17c4fe632e09acbed1
Contents?: true
Size: 550 Bytes
Versions: 4
Compression:
Stored size: 550 Bytes
Contents
module Fluent::Plugin class WebHDFSOutput < Output class SnappyCompressor < Compressor WebHDFSOutput.register_compressor('snappy', self) def initialize(options = {}) begin require "snappy" rescue LoadError raise Fluent::ConfigError, "Install snappy before use snappy compressor" end end def ext ".sz" end def compress(chunk, tmp) Snappy::Writer.new(tmp) do |w| w << chunk.read w.flush end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems