fluentd 0.14.7 → 0.14.8

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: f99bac7f1329f22434907c02e8d382ca2774988e
4
- data.tar.gz: fe3cb1733cc27f065397c5135f4f3c579dec81fe
3
+ metadata.gz: 830d1ce6df9602f508f6f28f57197d5ed8fc3979
4
+ data.tar.gz: 0f0f897b0a13526974df16bbfa55abde73929c68
5
5
  SHA512:
6
- metadata.gz: bc21095fbec80e1ff718ef9179f84081a20d4688b33ee2f7b81821f56501cd5f3645dab77bb6ef98ad175118b5825d1e3ba261ed9baa19ab93214145a515472b
7
- data.tar.gz: e2d3978c237c3101ce10146b2afe7ad5f8ffaf180c6d49c5f97cc483e6169ecc2802a2944647b25183cf4dbf81879704a0f61dffab0ac7cdd5b4488269cc30bf
6
+ metadata.gz: 6f3675e97aac37d204dbe2501ff6ec1629d0aec10d2ed534b6af4ebd5160153e459e9fb9707203f9b09142cf068cbd65272f57d4be214a590fe09109503270a9
7
+ data.tar.gz: fcdc64eed9af5917723efd395ac292e9200fffb0276c5c6471a8a86c19f513ec9515abd9f3d66650232ac4f60e51bf4c4627a2f6376ef3c1032a4903c804264b
data/ChangeLog CHANGED
@@ -1,15 +1,26 @@
1
1
  # v0.14
2
2
 
3
+ ## Release v0.14.8 - 2016/10/13
4
+
5
+ ### Bug fixes
6
+
7
+ * Add msgpack_each to buffer chunks in compat-layer output plugins
8
+ https://github.com/fluent/fluentd/pull/1273
9
+
3
10
  ## Release v0.14.7 - 2016/10/07
4
11
 
5
12
  ### New features / Enhancement
6
13
 
14
+ * Support data compression in buffer plugins
15
+ https://github.com/fluent/fluentd/pull/1172
7
16
  * in_forward: support to transfer compressed data
8
17
  https://github.com/fluent/fluentd/pull/1179
9
18
  * out_stdout: fix to show nanosecond resolution time
10
19
  https://github.com/fluent/fluentd/pull/1249
11
20
  * Add option to rotate Fluentd daemon's log
12
21
  https://github.com/fluent/fluentd/pull/1235
22
+ * Add extract plugin helper, with symmetric time parameter support in parser/formatter and inject/extract
23
+ https://github.com/fluent/fluentd/pull/1207
13
24
  * Add a feature to parse/format numeric time (unix time [+ subsecond value])
14
25
  https://github.com/fluent/fluentd/pull/1254
15
26
  * Raise configuration errors for inconsistent <label> configurations
@@ -22,6 +33,8 @@
22
33
  https://github.com/fluent/fluentd/pull/1227
23
34
  * Add some features to write plugins more easily
24
35
  https://github.com/fluent/fluentd/pull/1256
36
+ * Add a tool to load dumped events from file
37
+ https://github.com/fluent/fluentd/pull/1165
25
38
 
26
39
  ### Bug fixes
27
40
 
@@ -26,6 +26,7 @@ require 'fluent/compat/record_filter_mixin'
26
26
  require 'fluent/compat/output_chain'
27
27
  require 'fluent/timezone'
28
28
  require 'fluent/mixin'
29
+ require 'fluent/event'
29
30
  require 'fluent/process' # to load Fluent::DetachProcessMixin
30
31
 
31
32
  require 'fluent/plugin_helper/compat_parameters'
@@ -123,6 +124,7 @@ module Fluent
123
124
  # prepend this module to BufferedOutput (including ObjectBufferedOutput) plugin singleton class
124
125
  def write(chunk)
125
126
  chunk.extend(ChunkSizeCompatMixin)
127
+ chunk.extend(ChunkMessagePackEventStreamer)
126
128
  chunk.extend(AddKeyToChunkMixin) if chunk.metadata.variables && chunk.metadata.variables.has_key?(:key)
127
129
  super
128
130
  end
@@ -132,6 +134,7 @@ module Fluent
132
134
  # prepend this module to TimeSlicedOutput plugin singleton class
133
135
  def write(chunk)
134
136
  chunk.extend(ChunkSizeCompatMixin)
137
+ chunk.extend(ChunkMessagePackEventStreamer)
135
138
  chunk.extend(AddTimeSliceKeyToChunkMixin)
136
139
  chunk.time_slice_format = @time_slice_format
137
140
  chunk.timekey = @_timekey
@@ -16,6 +16,6 @@
16
16
 
17
17
  module Fluent
18
18
 
19
- VERSION = '0.14.7'
19
+ VERSION = '0.14.8'
20
20
 
21
21
  end
@@ -1,6 +1,7 @@
1
1
  require_relative '../helper'
2
2
  require 'fluent/plugin/output'
3
3
  require 'fluent/plugin/buffer'
4
+ require 'fluent/output'
4
5
  require 'fluent/event'
5
6
 
6
7
  require 'json'
@@ -126,6 +127,28 @@ module FluentPluginOutputAsBufferedTest
126
127
  @try_write ? @try_write.call(chunk) : nil
127
128
  end
128
129
  end
130
+ module OldPluginMethodMixin
131
+ def initialize
132
+ super
133
+ @format = nil
134
+ @write = nil
135
+ end
136
+ def register(name, &block)
137
+ instance_variable_set("@#{name}", block)
138
+ end
139
+ def format(tag, time, record)
140
+ @format ? @format.call(tag, time, record) : [tag, time, record].to_json
141
+ end
142
+ def write(chunk)
143
+ @write ? @write.call(chunk) : nil
144
+ end
145
+ end
146
+ class DummyOldBufferedOutput < Fluent::BufferedOutput
147
+ include OldPluginMethodMixin
148
+ end
149
+ class DummyOldObjectBufferedOutput < Fluent::ObjectBufferedOutput
150
+ include OldPluginMethodMixin
151
+ end
129
152
  end
130
153
 
131
154
  class BufferedOutputTest < Test::Unit::TestCase
@@ -138,6 +161,8 @@ class BufferedOutputTest < Test::Unit::TestCase
138
161
  when :standard then FluentPluginOutputAsBufferedTest::DummyStandardBufferedOutput.new
139
162
  when :custom then FluentPluginOutputAsBufferedTest::DummyCustomFormatBufferedOutput.new
140
163
  when :full then FluentPluginOutputAsBufferedTest::DummyFullFeatureOutput.new
164
+ when :old_buf then FluentPluginOutputAsBufferedTest::DummyOldBufferedOutput.new
165
+ when :old_obj then FluentPluginOutputAsBufferedTest::DummyOldObjectBufferedOutput.new
141
166
  else
142
167
  raise ArgumentError, "unknown type: #{type}"
143
168
  end
@@ -346,6 +371,37 @@ class BufferedOutputTest < Test::Unit::TestCase
346
371
  assert_equal events, each_pushed.map{|tag,time,record| [time,record]}
347
372
  end
348
373
  end
374
+
375
+ data(:BufferedOutput => :old_buf,
376
+ :ObjectBufferedOutput => :old_obj)
377
+ test 'old plugin types can iterate chunk by msgpack_each in #write' do |plugin_type|
378
+ events_from_chunk = []
379
+ # event_emitter helper requires Engine.root_agent for routing
380
+ ra = Fluent::RootAgent.new(log: $log)
381
+ stub(Fluent::Engine).root_agent { ra }
382
+ @i = create_output(plugin_type)
383
+ @i.configure(config_element('ROOT', '', {}, [config_element('buffer', '', @hash)]))
384
+ @i.register(:format) { |tag, time, record| [time, record].to_msgpack }
385
+ @i.register(:write) { |chunk| e = []; chunk.msgpack_each { |t, r| e << [t, r] }; events_from_chunk << [:write, e]; }
386
+ @i.start
387
+ @i.after_start
388
+
389
+ events = [
390
+ [event_time('2016-10-05 16:16:16 -0700'), {"message" => "yaaaaaaaaay!"}],
391
+ [event_time('2016-10-05 16:16:17 -0700'), {"message" => "yoooooooooy!"}],
392
+ ]
393
+
394
+ @i.emit_events("test.tag", Fluent::ArrayEventStream.new(events))
395
+ @i.emit_events("test.tag", Fluent::ArrayEventStream.new(events))
396
+
397
+ waiting(5) { sleep 0.1 until events_from_chunk.size == 2 }
398
+
399
+ assert_equal 2, events_from_chunk.size
400
+ 2.times.each do |i|
401
+ assert_equal :write, events_from_chunk[i][0]
402
+ assert_equal events, events_from_chunk[i][1]
403
+ end
404
+ end
349
405
  end
350
406
 
351
407
  sub_test_case 'buffered output configured with many chunk keys' do
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.14.7
4
+ version: 0.14.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sadayuki Furuhashi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-07 00:00:00.000000000 Z
11
+ date: 2016-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: msgpack
@@ -787,4 +787,3 @@ test_files:
787
787
  - test/test_time_formatter.rb
788
788
  - test/test_time_parser.rb
789
789
  - test/test_unique_id.rb
790
- has_rdoc: false