Sha256: 30dff61ba3d305dd471e3f8c2c0e5c355b0a2ebd110ed5235c080172b1a0cf62
Contents?: true
Size: 533 Bytes
Versions: 9
Compression:
Stored size: 533 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) w = Snappy::Writer.new(tmp) chunk.write_to(w) w.close end end end end
Version data entries
9 entries across 9 versions & 1 rubygems