logstash-input-sls 0.0.10 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e007878b15bef7b0247ad7d8323a4c426ab5091cf0dc468eab686d471c4d16c1
4
- data.tar.gz: bb74f2e93876580373a90a02655efe4eac9b3111df3490e682c3fdb1c02a2610
3
+ metadata.gz: a48935e319e2acc14e90f5cd79fb5c18e5728eea36d93dc152c98afe68e73db7
4
+ data.tar.gz: 6e35b57e54ec0c20fe1240671fc3dadcdd3bdcba36ab27933cf83888b629f6a5
5
5
  SHA512:
6
- metadata.gz: 25f7ff14b2694ee21eaca8e48e56ddfc1b334fa33c128d5a07bccaa16816986c2dcbb42225d9fec1eaac943a132ed97a1d65ff63d8114826c3a93f745549a1ea
7
- data.tar.gz: 2280ba6821d8db9d8c794fa9c8a84c67b273a7a81b52a95894e8dc26ca35b5cc786f889911395567864fa82a03cc68111b5b5171e1c43297a37ef80a03276a57
6
+ metadata.gz: de009dd65e2ca92f6b17ed7049648dddd4aa00cfe8217ab795910acc52aa0ef78d38e99cb351652937b5c4d5dc939502fe7698cc1c3b25889ef0e22360210dbd
7
+ data.tar.gz: 9b0de0e5a8ca123165ec1a6a4c3f3b0a3d0169616899b13928cd40dd43d707918080bf88da472742659b3514ca5c9c0fdb91eb307e1b46bfce9a4374826078bb
@@ -12,7 +12,7 @@ LogStash::Environment.load_runtime_jars! File.join(root_dir, "vendor")
12
12
  java_import 'com.aliyun.log.logstash.LogHubStarter'
13
13
  java_import 'com.aliyun.log.logstash.LogstashLogHubProcessor'
14
14
 
15
- class LogStash::Inputs::LogService < LogStash::Inputs::Base
15
+ class LogStash::Inputs::LogService < LogStash::Inputs::Base
16
16
  attr_accessor :worker
17
17
  def initialize(*args)
18
18
  super(*args)
@@ -33,7 +33,6 @@ class LogStash::Inputs::LogService < LogStash::Inputs::Base
33
33
  config :checkpoint_second, :validate => :number, :default => 30
34
34
  config :include_meta, :validate => :boolean, :default => true
35
35
  config :consumer_name_with_ip, :validate => :boolean, :default => true
36
- config :queue_size, :validate => :number, :default => 1000
37
36
  Processor = com.aliyun.log.logstash
38
37
  public
39
38
  def register
@@ -50,7 +49,8 @@ class LogStash::Inputs::LogService < LogStash::Inputs::Base
50
49
  end
51
50
  @process_pid = "_#{Process.pid}"
52
51
  @logger.info("Running logstash-input-logservice",:local_address => @local_address)
53
- LogHubStarter.startWorker(@endpoint, @access_id, @access_key, @project, @logstore, @consumer_group, @consumer_name + @ip_suffix + @process_pid, @position, @checkpoint_second, @include_meta, @queue_size)
52
+ @blockingQueue = java.util.concurrent.LinkedBlockingQueue.new(1000)
53
+ LogHubStarter.startWorker(@endpoint, @access_id, @access_key, @project, @logstore, @consumer_group, @consumer_name + @ip_suffix + @process_pid, @position, @checkpoint_second, @include_meta, @blockingQueue)
54
54
 
55
55
  consume(queue)
56
56
 
@@ -63,10 +63,10 @@ class LogStash::Inputs::LogService < LogStash::Inputs::Base
63
63
 
64
64
  def consume(queue)
65
65
  while !stop?
66
- while !Processor.LogstashLogHubProcessor.queueCache.isEmpty
66
+ while !@blockingQueue.isEmpty
67
67
  begin
68
- textmap = Processor.LogstashLogHubProcessor.queueCache.poll
69
- event = LogStash::Event.new(textmap)
68
+ msg = @blockingQueue.poll
69
+ event = LogStash::Event.new(msg)
70
70
  decorate(event)
71
71
  queue << event
72
72
  rescue Exception => e
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-input-sls'
3
- s.version = '0.0.10'
3
+ s.version = '0.0.13'
4
4
  s.licenses = ['MIT']
5
5
  s.summary = "This sls input streams a string at a definable interval."
6
6
  s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-sls
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - lichao
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-27 00:00:00.000000000 Z
11
+ date: 2022-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logstash-core-plugin-api