lib/fluent/plugin/webhdfs_compressor_snappy.rb in fluent-plugin-webhdfs-0.5.1 vs lib/fluent/plugin/webhdfs_compressor_snappy.rb in fluent-plugin-webhdfs-0.5.2

- old
+ new

@@ -2,10 +2,14 @@ class WebHDFSOutput < Fluent::TimeSlicedOutput class SnappyCompressor < Compressor WebHDFSOutput.register_compressor('snappy', self) def initialize(options = {}) - require "snappy" + begin + require "snappy" + rescue LoadError + raise Fluent::ConfigError, "Install snappy before use snappy compressor" + end end def ext ".sz" end