fluentd 0.12.16 → 0.12.17

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of fluentd might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2bc899dd92a360462c8ab40bdec4dfa955918c74
4
- data.tar.gz: 0c93a1e695baf87d2d01c0ff10821a2733115c44
3
+ metadata.gz: 9a8a90a863a94d939296d18ce47d4a37d4568ae6
4
+ data.tar.gz: 4ccca67d8a418215bca28e7b2297292b6782ca7d
5
5
  SHA512:
6
- metadata.gz: 35585caea38a587df230faa0027cbd5820c6e43e48669d35755055f73a185509e08bf0089c0ff7b2e4c4eaacfe361406f14709161d81f7e3ebc6354c5a203fd1
7
- data.tar.gz: 9f3e64fedf79a5609c54e7387a14d2a4c03705b7be00d4382d554a4ff357b5617dcc10689f6e4067ecd8e9e99cf6158583c88ac32761433f04fb091229db6fdc
6
+ metadata.gz: 95398c478a7b63b0b2f497cd4cdda0507ca9af63b6f55d9f9c76f6efe9c377c08e05864e67d9049cddb787082bc911ca04990ad2044a810ef9ec556de0fcd876
7
+ data.tar.gz: 58ad404181a58040ede0b7e1fd8bba4311ddae24378b3f777708092bdfe3a32d74b836602c1e003a0eb1a9ef6a98f3e0836a274ced77ccf2cf99da7adc3e62f3
@@ -16,6 +16,7 @@ branches:
16
16
  only:
17
17
  - master
18
18
  - v0.10
19
+ - v0.12
19
20
  - v0.14
20
21
 
21
22
  gemfile:
data/ChangeLog CHANGED
@@ -1,5 +1,26 @@
1
1
  # v0.12
2
2
 
3
+ ## Release 0.12.17 - 2015/11/04
4
+
5
+ ### New features / Enhancement
6
+
7
+ * Engine: Add Engine#msgpack_factory for v0.14 compatibility
8
+ https://github.com/fluent/fluentd/pull/693
9
+ * Log shutdown plugin info to check shutdown sequence
10
+ https://github.com/fluent/fluentd/pull/689
11
+ * in_monitor_agent: Emit plugin info to use existing plugins
12
+ https://github.com/fluent/fluentd/pull/670
13
+ * config: Improve describing plugin parameters
14
+ https://github.com/fluent/fluentd/pull/683
15
+
16
+ ### Bug fixes
17
+
18
+ * Tempfile should be binary mode
19
+ https://github.com/fluent/fluentd/pull/691
20
+ * filter_record_transformer: Don't use popular name to prevent field overwrite when enable_ruby is true
21
+ https://github.com/fluent/fluentd/pull/687
22
+
23
+
3
24
  ## Release 0.12.16 - 2015/09/30
4
25
 
5
26
  ### New features / Enhancement
data/README.md CHANGED
@@ -38,6 +38,7 @@ Mobile/Web Application Logging | Fluentd can function as middleware to enable as
38
38
  - Documentation: http://docs.fluentd.org/
39
39
  - Source repository: http://github.com/fluent
40
40
  - Discussion: http://groups.google.com/group/fluentd
41
+ - Slack / Community: http://slack.fluentd.org
41
42
  - Newsletters: http://get.treasuredata.com/Fluentd_education
42
43
  - Author: Sadayuki Furuhashi
43
44
  - Copyright: (c) 2011 FURUHASHI Sadayuki
@@ -48,4 +49,3 @@ Mobile/Web Application Logging | Fluentd can function as middleware to enable as
48
49
  Patches contributed by [great developers](https://github.com/fluent/fluentd/contributors).
49
50
 
50
51
  [<img src="https://ga-beacon.appspot.com/UA-24890265-6/fluent/fluentd" />](https://github.com/fluent/fluentd)
51
-
@@ -35,6 +35,6 @@ Gem::Specification.new do |gem|
35
35
  gem.add_development_dependency("simplecov", ["~> 0.6.4"])
36
36
  gem.add_development_dependency("rr", [">= 1.0.0"])
37
37
  gem.add_development_dependency("timecop", [">= 0.3.0"])
38
- gem.add_development_dependency("test-unit", ["~> 3.0.2"])
38
+ gem.add_development_dependency("test-unit", ["~> 3.1.4"])
39
39
  gem.add_development_dependency("test-unit-rr", ["~> 1.0.3"])
40
40
  end
@@ -78,6 +78,7 @@ module Fluent
78
78
  @started_filters.map { |f|
79
79
  Thread.new do
80
80
  begin
81
+ log.info "shutting down filter#{@context.nil? ? '' : " in #{@context}"}", type: Plugin.lookup_name_from_class(f.class), plugin_id: f.plugin_id
81
82
  f.shutdown
82
83
  rescue => e
83
84
  log.warn "unexpected error while shutting down filter plugins", :plugin => f.class, :plugin_id => f.plugin_id, :error_class => e.class, :error => e
@@ -91,6 +92,7 @@ module Fluent
91
92
  @started_outputs.map { |o|
92
93
  Thread.new do
93
94
  begin
95
+ log.info "shutting down output#{@context.nil? ? '' : " in #{@context}"}", type: Plugin.lookup_name_from_class(o.class), plugin_id: o.plugin_id
94
96
  o.shutdown
95
97
  rescue => e
96
98
  log.warn "unexpected error while shutting down output plugins", :plugin => o.class, :plugin_id => o.plugin_id, :error_class => e.class, :error => e
@@ -112,7 +112,7 @@ module Fluent
112
112
 
113
113
  def msgpack_each(&block)
114
114
  open {|io|
115
- u = MessagePack::Unpacker.new(io)
115
+ u = Fluent::Engine.msgpack_factory.unpacker(io)
116
116
  begin
117
117
  u.each(&block)
118
118
  rescue EOFError
@@ -289,7 +289,7 @@ when 'json'
289
289
 
290
290
  when 'msgpack'
291
291
  begin
292
- u = MessagePack::Unpacker.new($stdin)
292
+ u = Fluent::Engine.msgpack_factory.unpacker($stdin)
293
293
  u.each {|record|
294
294
  w.write(record)
295
295
  }
@@ -178,6 +178,11 @@ module Fluent
178
178
  def config_param(name, *args, &block)
179
179
  name, block, opts = parameter_configuration(name, *args, &block)
180
180
 
181
+ if @current_description
182
+ config_set_desc(name, @current_description)
183
+ @current_description = nil
184
+ end
185
+
181
186
  @sections.delete(name)
182
187
  @params[name] = [block, opts]
183
188
  name
@@ -205,6 +210,10 @@ module Fluent
205
210
  nil
206
211
  end
207
212
 
213
+ def desc(description)
214
+ @current_description = description
215
+ end
216
+
208
217
  def config_section(name, *args, &block)
209
218
  unless block_given?
210
219
  raise ArgumentError, "#{self.name}: config_section requires block parameter"
@@ -105,11 +105,19 @@ module Fluent
105
105
  configure_proxy(self.name).config_set_default(name, defval)
106
106
  end
107
107
 
108
+ def config_set_desc(name, desc)
109
+ configure_proxy(self.name).config_set_desc(name, desc)
110
+ end
111
+
108
112
  def config_section(name, *args, &block)
109
113
  configure_proxy(self.name).config_section(name, *args, &block)
110
114
  attr_accessor configure_proxy(self.name).sections[name].param_name
111
115
  end
112
116
 
117
+ def desc(description)
118
+ configure_proxy(self.name).desc(description)
119
+ end
120
+
113
121
  def merged_configure_proxy
114
122
  configurables = ancestors.reverse.select{ |a| a.respond_to?(:configure_proxy) }
115
123
 
@@ -19,6 +19,16 @@ module Fluent
19
19
  require 'fluent/root_agent'
20
20
 
21
21
  class EngineClass
22
+ class DummyMessagePackFactory
23
+ def packer(*args)
24
+ MessagePack::Packer.new(*args)
25
+ end
26
+
27
+ def unpacker(*args)
28
+ MessagePack::Unpacker.new(*args)
29
+ end
30
+ end
31
+
22
32
  def initialize
23
33
  @root_agent = nil
24
34
  @event_router = nil
@@ -30,6 +40,8 @@ module Fluent
30
40
  @log_event_queue = []
31
41
 
32
42
  @suppress_config_dump = false
43
+
44
+ @msgpack_factory = DummyMessagePackFactory.new
33
45
  end
34
46
 
35
47
  MATCH_CACHE_SIZE = 1024
@@ -37,6 +49,7 @@ module Fluent
37
49
 
38
50
  attr_reader :root_agent
39
51
  attr_reader :matches, :sources
52
+ attr_reader :msgpack_factory
40
53
 
41
54
  def init(opts = {})
42
55
  BasicSocket.do_not_reverse_lookup = true
@@ -27,7 +27,7 @@ module Fluent
27
27
  end
28
28
 
29
29
  def to_msgpack_stream
30
- out = MessagePack::Packer.new # MessagePack::Packer is fastest way to serialize events
30
+ out = Fluent::Engine.msgpack_factory.packer
31
31
  each {|time,record|
32
32
  out.write([time,record])
33
33
  }
@@ -143,7 +143,7 @@ module Fluent
143
143
 
144
144
  def each(&block)
145
145
  # TODO format check
146
- unpacker = MessagePack::Unpacker.new
146
+ unpacker = Fluent::Engine.msgpack_factory.unpacker
147
147
  unpacker.feed_each(@data, &block)
148
148
  nil
149
149
  end
@@ -57,7 +57,7 @@ module Fluent
57
57
 
58
58
  # optimize
59
59
  def msgpack_each(&block)
60
- u = MessagePack::Unpacker.new
60
+ u = Fluent::Engine.msgpack_factory.unpacker
61
61
  u.feed_each(@data, &block)
62
62
  end
63
63
  end
@@ -58,7 +58,7 @@ module Fluent
58
58
 
59
59
  class MessagePackParser < Parser
60
60
  def call(io)
61
- @u = MessagePack::Unpacker.new(io)
61
+ @u = Fluent::Engine.msgpack_factory.unpacker(io)
62
62
  begin
63
63
  @u.each(&@on_message)
64
64
  rescue EOFError
@@ -230,18 +230,17 @@ module Fluent
230
230
  @placeholders = struct
231
231
  end
232
232
 
233
- def expand(str, force_stringify=false)
233
+ def expand(_str_for_eval_, force_stringify=false)
234
234
  if @auto_typecast and !force_stringify
235
- single_placeholder_matched = str.match(/\A\${([^}]+)}\z/)
236
- if single_placeholder_matched
237
- code = single_placeholder_matched[1]
238
- return eval code, @placeholders.instance_eval { binding }
235
+ _single_placeholder_matched_ = _str_for_eval_.match(/\A\${([^}]+)}\z/)
236
+ if _single_placeholder_matched_
237
+ return eval _single_placeholder_matched_[1], @placeholders.instance_eval { binding }
239
238
  end
240
239
  end
241
- interpolated = str.gsub(/\$\{([^}]+)\}/, '#{\1}') # ${..} => #{..}
242
- eval "\"#{interpolated}\"", @placeholders.instance_eval { binding }
240
+ _interpolated_for_eval_ = _str_for_eval_.gsub(/\$\{([^}]+)\}/, '#{\1}') # ${..} => #{..}
241
+ eval "\"#{_interpolated_for_eval_}\"", @placeholders.instance_eval { binding }
243
242
  rescue => e
244
- log.warn "failed to expand `#{str}`", :error_class => e.class, :error => e.message
243
+ log.warn "failed to expand `#{_str_for_eval_}`", :error_class => e.class, :error => e.message
245
244
  log.warn_backtrace
246
245
  nil
247
246
  end
@@ -20,9 +20,13 @@ module Fluent
20
20
 
21
21
  BIN_NUM = 10
22
22
 
23
+ desc "The value is the tag assigned to the generated events."
23
24
  config_param :tag, :string
25
+ desc "It configures how many events to generate per second."
24
26
  config_param :rate, :integer, :default => 1
27
+ desc "If specified, each generated event has an auto-incremented key field."
25
28
  config_param :auto_increment_key, :string, :default => nil
29
+ desc "The dummy data to be generated. An array of JSON hashes or a single JSON hash."
26
30
  config_param :dummy, :default => [{"message"=>"dummy"}] do |val|
27
31
  begin
28
32
  parsed = JSON.parse(val)
@@ -219,7 +219,7 @@ module Fluent
219
219
  else
220
220
  m = method(:on_read_msgpack)
221
221
  @serializer = :to_msgpack.to_proc
222
- @u = MessagePack::Unpacker.new
222
+ @u = Fluent::Engine.msgpack_factory.unpacker
223
223
  end
224
224
 
225
225
  (class << self; self; end).module_eval do
@@ -191,7 +191,7 @@ module Fluent
191
191
 
192
192
  def parse_params_default(params)
193
193
  record = if msgpack = params['msgpack']
194
- MessagePack.unpack(msgpack)
194
+ Engine.msgpack_factory.unpacker.feed(msgpack).read
195
195
  elsif js = params['json']
196
196
  JSON.parse(js)
197
197
  else
@@ -27,6 +27,8 @@ module Fluent
27
27
 
28
28
  config_param :bind, :string, :default => '0.0.0.0'
29
29
  config_param :port, :integer, :default => 24220
30
+ config_param :tag, :string, :default => nil
31
+ config_param :emit_interval, :time, :default => 60
30
32
 
31
33
  class MonitorServlet < WEBrick::HTTPServlet::AbstractServlet
32
34
  def initialize(server, agent)
@@ -199,6 +201,36 @@ module Fluent
199
201
  end
200
202
  end
201
203
 
204
+ class TimerWatcher < Coolio::TimerWatcher
205
+ def initialize(interval, log, &callback)
206
+ @callback = callback
207
+ @log = log
208
+
209
+ # Avoid long shutdown time
210
+ @num_call = 0
211
+ if interval >= 10
212
+ min_interval = 10
213
+ @call_interval = interval / 10
214
+ else
215
+ min_interval = interval
216
+ @call_interval = 0
217
+ end
218
+
219
+ super(min_interval, true)
220
+ end
221
+
222
+ def on_timer
223
+ @num_call += 1
224
+ if @num_call >= @call_interval
225
+ @num_call = 0
226
+ @callback.call
227
+ end
228
+ rescue => e
229
+ @log.error e.to_s
230
+ @log.error_backtrace
231
+ end
232
+ end
233
+
202
234
  def start
203
235
  log.debug "listening monitoring http server on http://#{@bind}:#{@port}/api/plugins"
204
236
  @srv = WEBrick::HTTPServer.new({
@@ -214,6 +246,29 @@ module Fluent
214
246
  @thread = Thread.new {
215
247
  @srv.start
216
248
  }
249
+ if @tag
250
+ log.debug "tag parameter is specified. Emit plugins info to '#{@tag}'"
251
+
252
+ @loop = Coolio::Loop.new
253
+ opts = {:with_config => false}
254
+ timer = TimerWatcher.new(@emit_interval, log) {
255
+ es = MultiEventStream.new
256
+ now = Engine.now
257
+ plugins_info_all(opts).each { |record|
258
+ es.add(now, record)
259
+ }
260
+ router.emit_stream(@tag, es)
261
+ }
262
+ @loop.attach(timer)
263
+ @thread_for_emit = Thread.new(&method(:run))
264
+ end
265
+ end
266
+
267
+ def run
268
+ @loop.run
269
+ rescue => e
270
+ log.error "unexpected error", :error => e.to_s
271
+ log.error_backtrace
217
272
  end
218
273
 
219
274
  def shutdown
@@ -225,6 +280,13 @@ module Fluent
225
280
  @thread.join
226
281
  @thread = nil
227
282
  end
283
+ if @tag
284
+ @loop.watchers.each { |w| w.detach }
285
+ @loop.stop
286
+ @loop = nil
287
+ @thread_for_emit.join
288
+ @thread_for_emit = nil
289
+ end
228
290
  end
229
291
 
230
292
  MONITOR_INFO = {
@@ -320,7 +382,7 @@ module Fluent
320
382
  obj['plugin_id'] = pe.plugin_id
321
383
  obj['plugin_category'] = plugin_category(pe)
322
384
  obj['type'] = pe.config['@type'] || pe.config['type']
323
- obj['config'] = pe.config
385
+ obj['config'] = pe.config if !opts.has_key?(:with_config) || opts[:with_config]
324
386
 
325
387
  # run MONITOR_INFO in plugins' instance context and store the info to obj
326
388
  MONITOR_INFO.each_pair {|key,code|
@@ -130,7 +130,7 @@ module Fluent
130
130
  @y.on_parse_complete = @on_message
131
131
  else
132
132
  m = method(:on_read_msgpack)
133
- @u = MessagePack::Unpacker.new
133
+ @u = Fluent::Engine.msgpack_factory.unpacker
134
134
  end
135
135
 
136
136
  (class << self; self; end).module_eval do
@@ -81,6 +81,7 @@ module Fluent
81
81
  prog = "#{@command} #{chunk.path}"
82
82
  else
83
83
  tmpfile = Tempfile.new("fluent-plugin-exec-")
84
+ tmpfile.binmode
84
85
  chunk.write_to(tmpfile)
85
86
  tmpfile.close
86
87
  prog = "#{@command} #{tmpfile.path}"
@@ -65,7 +65,7 @@ module Fluent
65
65
  chain = NullOutputChain.instance
66
66
  chunk.open {|io|
67
67
  # TODO use MessagePackIoEventStream
68
- u = MessagePack::Unpacker.new(io)
68
+ u = Fluent::Engine.msgpack_factory.unpacker(io)
69
69
  begin
70
70
  u.each {|(tag,entries)|
71
71
  es = MultiEventStream.new
@@ -176,7 +176,7 @@ module Fluent
176
176
  end
177
177
 
178
178
  def read_event_stream(r, &block)
179
- u = MessagePack::Unpacker.new(r)
179
+ u = Fluent::Engine.msgpack_factory.unpacker(r)
180
180
  begin
181
181
  #buf = ''
182
182
  #map = {}
@@ -118,6 +118,7 @@ module Fluent
118
118
  @started_inputs.map { |i|
119
119
  Thread.new do
120
120
  begin
121
+ log.info "shutting down input", type: Plugin.lookup_name_from_class(i.class), plugin_id: i.plugin_id
121
122
  i.shutdown
122
123
  rescue => e
123
124
  log.warn "unexpected error while shutting down input plugin", :plugin => i.class, :plugin_id => i.plugin_id, :error_class => e.class, :error => e
@@ -16,6 +16,6 @@
16
16
 
17
17
  module Fluent
18
18
 
19
- VERSION = '0.12.16'
19
+ VERSION = '0.12.17'
20
20
 
21
21
  end
@@ -112,6 +112,26 @@ module Fluent::Config
112
112
  end
113
113
  end
114
114
 
115
+ sub_test_case '#desc' do
116
+ setup do
117
+ @proxy = Fluent::Config::ConfigureProxy.new(:section)
118
+ end
119
+
120
+ test 'permit to specify description twice' do
121
+ @proxy.desc("description1")
122
+ @proxy.desc("description2")
123
+ @proxy.config_param(:name, :string)
124
+ assert_equal("description2", @proxy.descriptions[:name])
125
+ end
126
+
127
+ test 'does not permit description specification twice' do
128
+ @proxy.desc("description1")
129
+ assert_raise(ArgumentError) do
130
+ @proxy.config_param(:name, :string, :desc => "description2")
131
+ end
132
+ end
133
+ end
134
+
115
135
  sub_test_case '#dump' do
116
136
  setup do
117
137
  @proxy = Fluent::Config::ConfigureProxy.new(:section)
@@ -206,6 +226,28 @@ CONFIG
206
226
  end
207
227
  assert_equal(<<CONFIG, @proxy.dump)
208
228
 
229
+ sub
230
+ name1: string: <"name1"> # desc1
231
+ name2: string: <"name2"> # desc2
232
+ sub2
233
+ name3: string: <"name3">
234
+ name4: string: <"name4"> # desc4
235
+ CONFIG
236
+ end
237
+
238
+ test 'sub proxy w/ desc method' do
239
+ @proxy.config_section(:sub) do
240
+ desc("desc1")
241
+ config_param(:name1, :string, default: "name1")
242
+ config_param(:name2, :string, default: "name2", desc: "desc2")
243
+ config_section(:sub2) do
244
+ config_param(:name3, :string, default: "name3")
245
+ desc("desc4")
246
+ config_param(:name4, :string, default: "name4")
247
+ end
248
+ end
249
+ assert_equal(<<CONFIG, @proxy.dump)
250
+
209
251
  sub
210
252
  name1: string: <"name1"> # desc1
211
253
  name2: string: <"name2"> # desc2
@@ -59,7 +59,7 @@ class ForwardInputTest < Test::Unit::TestCase
59
59
 
60
60
  d.run do
61
61
  d.expected_emits.each {|tag,time,record|
62
- send_data [tag, time, record].to_msgpack
62
+ send_data Fluent::Engine.msgpack_factory.packer.write([tag, time, record]).to_s
63
63
  }
64
64
  end
65
65
  end
@@ -77,7 +77,7 @@ class ForwardInputTest < Test::Unit::TestCase
77
77
  d.expected_emits.each {|tag,time,record|
78
78
  entries << [time, record]
79
79
  }
80
- send_data ["tag1", entries].to_msgpack
80
+ send_data Fluent::Engine.msgpack_factory.packer.write(["tag1", entries]).to_s
81
81
  end
82
82
  end
83
83
 
@@ -92,9 +92,9 @@ class ForwardInputTest < Test::Unit::TestCase
92
92
  d.run do
93
93
  entries = ''
94
94
  d.expected_emits.each {|tag,time,record|
95
- [time, record].to_msgpack(entries)
95
+ Fluent::Engine.msgpack_factory.packer(entries).write([time, record]).flush
96
96
  }
97
- send_data ["tag1", entries].to_msgpack
97
+ send_data Fluent::Engine.msgpack_factory.packer.write(["tag1", entries]).to_s
98
98
  end
99
99
  end
100
100
 
@@ -128,7 +128,7 @@ class ForwardInputTest < Test::Unit::TestCase
128
128
  assert chunk.size < (32 * 1024 * 1024)
129
129
 
130
130
  d.run do
131
- MessagePack::Unpacker.new.feed_each(chunk) do |obj|
131
+ Fluent::Engine.msgpack_factory.unpacker.feed_each(chunk) do |obj|
132
132
  d.instance.send(:on_message, obj, chunk.size, "host: 127.0.0.1, addr: 127.0.0.1, port: 0000")
133
133
  end
134
134
  end
@@ -157,7 +157,7 @@ class ForwardInputTest < Test::Unit::TestCase
157
157
  chunk = [ "test.tag", (0...16).map{|i| [time + i, {"data" => str}] } ].to_msgpack
158
158
 
159
159
  d.run do
160
- MessagePack::Unpacker.new.feed_each(chunk) do |obj|
160
+ Fluent::Engine.msgpack_factory.unpacker.feed_each(chunk) do |obj|
161
161
  d.instance.send(:on_message, obj, chunk.size, "host: 127.0.0.1, addr: 127.0.0.1, port: 0000")
162
162
  end
163
163
  end
@@ -184,7 +184,7 @@ class ForwardInputTest < Test::Unit::TestCase
184
184
 
185
185
  # d.run => send_data
186
186
  d.run do
187
- MessagePack::Unpacker.new.feed_each(chunk) do |obj|
187
+ Fluent::Engine.msgpack_factory.unpacker.feed_each(chunk) do |obj|
188
188
  d.instance.send(:on_message, obj, chunk.size, "host: 127.0.0.1, addr: 127.0.0.1, port: 0000")
189
189
  end
190
190
  end
@@ -17,7 +17,7 @@ module StreamInputTest
17
17
 
18
18
  d.run do
19
19
  d.expected_emits.each {|tag,time,record|
20
- send_data [tag, 0, record].to_msgpack
20
+ send_data Fluent::Engine.msgpack_factory.packer.write([tag, 0, record]).to_s
21
21
  }
22
22
  end
23
23
  end
@@ -32,7 +32,7 @@ module StreamInputTest
32
32
 
33
33
  d.run do
34
34
  d.expected_emits.each {|tag,time,record|
35
- send_data [tag, time, record].to_msgpack
35
+ send_data Fluent::Engine.msgpack_factory.packer.write([tag, time, record]).to_s
36
36
  }
37
37
  end
38
38
  end
@@ -50,7 +50,7 @@ module StreamInputTest
50
50
  d.expected_emits.each {|tag,time,record|
51
51
  entries << [time, record]
52
52
  }
53
- send_data ["tag1", entries].to_msgpack
53
+ send_data Fluent::Engine.msgpack_factory.packer.write(["tag1", entries]).to_s
54
54
  end
55
55
  end
56
56
 
@@ -65,9 +65,9 @@ module StreamInputTest
65
65
  d.run do
66
66
  entries = ''
67
67
  d.expected_emits.each {|tag,time,record|
68
- [time, record].to_msgpack(entries)
68
+ Fluent::Engine.msgpack_factory.packer(entries).write([time, record]).flush
69
69
  }
70
- send_data ["tag1", entries].to_msgpack
70
+ send_data Fluent::Engine.msgpack_factory.packer.write(["tag1", entries]).to_s
71
71
  end
72
72
  end
73
73
 
@@ -86,7 +86,7 @@ class CopyOutputTest < Test::Unit::TestCase
86
86
 
87
87
  es = if defined?(MessagePack::Packer)
88
88
  time = Time.parse("2013-05-26 06:37:22 UTC").to_i
89
- packer = MessagePack::Packer.new
89
+ packer = Fluent::Engine.msgpack_factory.packer
90
90
  packer.pack([time, {"a" => 1}])
91
91
  packer.pack([time, {"a" => 2}])
92
92
  Fluent::MessagePackEventStream.new(packer.to_s)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluentd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.16
4
+ version: 0.12.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sadayuki Furuhashi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-30 00:00:00.000000000 Z
11
+ date: 2015-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: msgpack
@@ -244,14 +244,14 @@ dependencies:
244
244
  requirements:
245
245
  - - "~>"
246
246
  - !ruby/object:Gem::Version
247
- version: 3.0.2
247
+ version: 3.1.4
248
248
  type: :development
249
249
  prerelease: false
250
250
  version_requirements: !ruby/object:Gem::Requirement
251
251
  requirements:
252
252
  - - "~>"
253
253
  - !ruby/object:Gem::Version
254
- version: 3.0.2
254
+ version: 3.1.4
255
255
  - !ruby/object:Gem::Dependency
256
256
  name: test-unit-rr
257
257
  requirement: !ruby/object:Gem::Requirement
@@ -465,7 +465,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
465
465
  version: '0'
466
466
  requirements: []
467
467
  rubyforge_project:
468
- rubygems_version: 2.2.3
468
+ rubygems_version: 2.4.5.1
469
469
  signing_key:
470
470
  specification_version: 4
471
471
  summary: Fluentd event collector