Sha256: d42db6898e713b055904a11ec0b1fc4e9429a516fe52bf3de64f4ceb5e7ce04b

Contents?: true

Size: 404 Bytes

Versions: 3

Compression:

Stored size: 404 Bytes

Contents

module Fluent
  class WebHDFSOutput < Fluent::TimeSlicedOutput
    class GzipCompressor < Compressor
      WebHDFSOutput.register_compressor('gzip', self)

      def initialize(options = {})
        require "zlib"
      end

      def ext
        ".gz"
      end

      def compress(chunk, tmp)
        w = Zlib::GzipWriter.new(tmp)
        chunk.write_to(w)
        w.finish
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fluent-plugin-webhdfs-0.7.1 lib/fluent/plugin/webhdfs_compressor_gzip.rb
fluent-plugin-webhdfs-0.7.0 lib/fluent/plugin/webhdfs_compressor_gzip.rb
fluent-plugin-webhdfs-0.6.1 lib/fluent/plugin/webhdfs_compressor_gzip.rb