fluentd-hubspot 0.14.14.1 → 0.14.14.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -170,14 +170,10 @@ module Fluent
170
170
  def generate_chunk(metadata)
171
171
  # FileChunk generates real path with unique_id
172
172
  if @file_permission
173
- chunk = Fluent::Plugin::Buffer::FileChunk.new(metadata, @path, :create, perm: @file_permission, compress: @compress)
173
+ Fluent::Plugin::Buffer::FileChunk.new(metadata, @path, :create, perm: @file_permission, compress: @compress)
174
174
  else
175
- chunk = Fluent::Plugin::Buffer::FileChunk.new(metadata, @path, :create, compress: @compress)
175
+ Fluent::Plugin::Buffer::FileChunk.new(metadata, @path, :create, compress: @compress)
176
176
  end
177
-
178
- log.debug "Created new chunk", chunk_id: dump_unique_id_hex(chunk.unique_id), metadata: metadata
179
-
180
- return chunk
181
177
  end
182
178
  end
183
179
  end
@@ -312,7 +312,7 @@ module Fluent
312
312
  end
313
313
 
314
314
  def enqueue_chunk(metadata)
315
- log.trace "enqueueing chunk", instance: self.object_id, metadata: metadata
315
+ log.debug "enqueueing chunk", instance: self.object_id, metadata: metadata
316
316
  synchronize do
317
317
  chunk = @stage.delete(metadata)
318
318
  return nil unless chunk
@@ -334,7 +334,7 @@ module Fluent
334
334
  end
335
335
 
336
336
  def enqueue_unstaged_chunk(chunk)
337
- log.trace "enqueueing unstaged chunk", instance: self.object_id, metadata: chunk.metadata
337
+ log.debug "enqueueing unstaged chunk", instance: self.object_id, metadata: chunk.metadata
338
338
  synchronize do
339
339
  chunk.synchronize do
340
340
  metadata = chunk.metadata
@@ -347,7 +347,7 @@ module Fluent
347
347
  end
348
348
 
349
349
  def enqueue_all
350
- log.trace "enqueueing all chunks in buffer", instance: self.object_id
350
+ log.debug "enqueueing all chunks in buffer", instance: self.object_id
351
351
  synchronize do
352
352
  if block_given?
353
353
  @stage.keys.each do |metadata|
@@ -365,7 +365,7 @@ module Fluent
365
365
 
366
366
  def dequeue_chunk
367
367
  return nil if @queue.empty?
368
- log.trace "dequeueing a chunk", instance: self.object_id
368
+ log.debug "dequeueing a chunk", instance: self.object_id
369
369
  synchronize do
370
370
  chunk = @queue.shift
371
371
 
@@ -374,18 +374,18 @@ module Fluent
374
374
 
375
375
  @dequeued[chunk.unique_id] = chunk
376
376
  @queued_num[chunk.metadata] -= 1 # BUG if nil, 0 or subzero
377
- log.trace "chunk dequeued", instance: self.object_id, metadata: chunk.metadata
377
+ log.debug "chunk dequeued", instance: self.object_id, metadata: chunk.metadata
378
378
  chunk
379
379
  end
380
380
  end
381
381
 
382
382
  def takeback_chunk(chunk_id)
383
- log.trace "taking back a chunk", instance: self.object_id, chunk_id: dump_unique_id_hex(chunk_id)
383
+ log.debug "taking back a chunk", instance: self.object_id, chunk_id: dump_unique_id_hex(chunk_id)
384
384
  synchronize do
385
385
  chunk = @dequeued.delete(chunk_id)
386
386
  return false unless chunk # already purged by other thread
387
387
  @queue.unshift(chunk)
388
- log.trace "chunk taken back", instance: self.object_id, chunk_id: dump_unique_id_hex(chunk_id), metadata: chunk.metadata
388
+ log.debug "chunk taken back", instance: self.object_id, chunk_id: dump_unique_id_hex(chunk_id), metadata: chunk.metadata
389
389
  @queued_num[chunk.metadata] += 1 # BUG if nil
390
390
  end
391
391
  true
@@ -397,7 +397,7 @@ module Fluent
397
397
  return nil unless chunk # purged by other threads
398
398
 
399
399
  metadata = chunk.metadata
400
- log.trace "purging a chunk", instance: self.object_id, chunk_id: dump_unique_id_hex(chunk_id), metadata: metadata
400
+ log.debug "purging a chunk", instance: self.object_id, chunk_id: dump_unique_id_hex(chunk_id), metadata: metadata
401
401
  begin
402
402
  bytesize = chunk.bytesize
403
403
  chunk.purge
@@ -410,18 +410,18 @@ module Fluent
410
410
  if metadata && !@stage[metadata] && (!@queued_num[metadata] || @queued_num[metadata] < 1)
411
411
  @metadata_list.delete(metadata)
412
412
  end
413
- log.trace "chunk purged", instance: self.object_id, chunk_id: dump_unique_id_hex(chunk_id), metadata: metadata
413
+ log.debug "chunk purged", instance: self.object_id, chunk_id: dump_unique_id_hex(chunk_id), metadata: metadata
414
414
  end
415
415
  nil
416
416
  end
417
417
 
418
418
  def clear_queue!
419
- log.trace "clearing queue", instance: self.object_id
419
+ log.debug "clearing queue", instance: self.object_id
420
420
  synchronize do
421
421
  until @queue.empty?
422
422
  begin
423
423
  q = @queue.shift
424
- log.trace("purging a chunk in queue"){ {id: dump_unique_id_hex(chunk.unique_id), bytesize: chunk.bytesize, size: chunk.size} }
424
+ log.debug("purging a chunk in queue"){ {id: dump_unique_id_hex(chunk.unique_id), bytesize: chunk.bytesize, size: chunk.size} }
425
425
  q.purge
426
426
  rescue => e
427
427
  log.error "unexpected error while clearing buffer queue", error_class: e.class, error: e
@@ -16,6 +16,6 @@
16
16
 
17
17
  module Fluent
18
18
 
19
- VERSION = '0.14.14.1'
19
+ VERSION = '0.14.14.2'
20
20
 
21
21
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluentd-hubspot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.14.1
4
+ version: 0.14.14.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-10-14 00:00:00.000000000 Z
12
+ date: 2017-10-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: msgpack