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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a48935e319e2acc14e90f5cd79fb5c18e5728eea36d93dc152c98afe68e73db7
|
4
|
+
data.tar.gz: 6e35b57e54ec0c20fe1240671fc3dadcdd3bdcba36ab27933cf83888b629f6a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
66
|
+
while !@blockingQueue.isEmpty
|
67
67
|
begin
|
68
|
-
|
69
|
-
event = LogStash::Event.new(
|
68
|
+
msg = @blockingQueue.poll
|
69
|
+
event = LogStash::Event.new(msg)
|
70
70
|
decorate(event)
|
71
71
|
queue << event
|
72
72
|
rescue Exception => e
|
Binary file
|
data/logstash-input-sls.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'logstash-input-sls'
|
3
|
-
s.version = '0.0.
|
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.
|
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:
|
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
|