lib/fluent/plugin/out_s3.rb in fluent-plugin-s3-0.3.4 vs lib/fluent/plugin/out_s3.rb in fluent-plugin-s3-0.3.5
- old
+ new
@@ -32,10 +32,11 @@
config_param :s3_object_key_format, :string, :default => "%{path}%{time_slice}_%{index}.%{file_extension}"
config_param :store_as, :string, :default => "gzip"
config_param :auto_create_bucket, :bool, :default => true
config_param :check_apikey_on_start, :bool, :default => true
config_param :proxy_uri, :string, :default => nil
+ config_param :reduced_redundancy, :bool, :default => false
attr_reader :bucket
include Fluent::Mixin::ConfigPlaceholders
@@ -160,10 +161,11 @@
system "lzop -qf1 -o #{tmp.path} #{w.path}"
else
chunk.write_to(tmp)
tmp.close
end
- @bucket.objects[s3path].write(Pathname.new(tmp.path), :content_type => @mime_type)
+ @bucket.objects[s3path].write(Pathname.new(tmp.path), {:content_type => @mime_type,
+ :reduced_redundancy => @reduced_redundancy})
ensure
tmp.close(true) rescue nil
w.close rescue nil
w.unlink rescue nil
end