Sha256: 380080455633e2c15337d663cbe9a15cbf6b4bb8f7fe23e22936526ac18f80a3

Contents?: true

Size: 394 Bytes

Versions: 13

Compression:

Stored size: 394 Bytes

Contents

module Fluent::Plugin
  class WebHDFSOutput < Output
    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

13 entries across 13 versions & 1 rubygems

Version Path
fluent-plugin-webhdfs-1.6.0 lib/fluent/plugin/webhdfs_compressor_gzip.rb
fluent-plugin-webhdfs-1.5.0 lib/fluent/plugin/webhdfs_compressor_gzip.rb
fluent-plugin-webhdfs-1.4.0 lib/fluent/plugin/webhdfs_compressor_gzip.rb
fluent-plugin-webhdfs-1.3.2 lib/fluent/plugin/webhdfs_compressor_gzip.rb
fluent-plugin-webhdfs-1.3.1 lib/fluent/plugin/webhdfs_compressor_gzip.rb
fluent-plugin-webhdfs-1.3.0 lib/fluent/plugin/webhdfs_compressor_gzip.rb
fluent-plugin-webhdfs-1.2.5 lib/fluent/plugin/webhdfs_compressor_gzip.rb
fluent-plugin-webhdfs-1.2.4 lib/fluent/plugin/webhdfs_compressor_gzip.rb
fluent-plugin-webhdfs-1.2.3 lib/fluent/plugin/webhdfs_compressor_gzip.rb
fluent-plugin-webhdfs-1.2.2 lib/fluent/plugin/webhdfs_compressor_gzip.rb
fluent-plugin-webhdfs-1.2.1 lib/fluent/plugin/webhdfs_compressor_gzip.rb
fluent-plugin-webhdfs-1.2.0 lib/fluent/plugin/webhdfs_compressor_gzip.rb
fluent-plugin-webhdfs-1.1.1 lib/fluent/plugin/webhdfs_compressor_gzip.rb