logstash-integration-jdbc 5.1.7 → 5.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/logstash/plugin_mixins/jdbc/jdbc.rb +2 -4
- data/logstash-integration-jdbc.gemspec +2 -2
- data/spec/inputs/integration/integ_spec.rb +6 -8
- data/spec/inputs/jdbc_spec.rb +4 -8
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 70e445fd000df9ba4c631d3574d67826aaafcb22bb2b4c00f9e30aa386415ed0
|
4
|
+
data.tar.gz: 2fc2cef288fa7fa2f342db6096e79e49617c012e5ce9f5c4a5d94cc1f79b0838
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9fd72a1ebd12db838330101716032fbe125a9dab866bd552e61eeca37d51222f1f22e29cb8cdcc1b27bba8d1e5b59e8ff22de6aba29587e3811543a23860e79
|
7
|
+
data.tar.gz: ae0322899fdbc65f3be931f1e2fbc2cbb82ac7d3e9980c1aa1a404085a0d4e7218944567e4750260fd638506e6f43dceb6a477c4762fe856d3c262e152988920
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
## 5.1.8
|
2
|
+
- Fix the blocking pipeline reload and shutdown when connectivity issues happen [#85](https://github.com/logstash-plugins/logstash-integration-jdbc/pull/85)
|
3
|
+
|
1
4
|
## 5.1.7
|
2
5
|
- Normalize jdbc_driver_class loading to support any top-level java packages [#86](https://github.com/logstash-plugins/logstash-integration-jdbc/pull/86)
|
3
6
|
|
@@ -168,8 +168,6 @@ module LogStash module PluginMixins module Jdbc
|
|
168
168
|
@logger.warn("Failed test_connection with java.sql.SQLException.", :exception => e)
|
169
169
|
rescue Sequel::DatabaseConnectionError => e
|
170
170
|
@logger.warn("Failed test_connection.", :exception => e)
|
171
|
-
close_jdbc_connection
|
172
|
-
|
173
171
|
#TODO return false and let the plugin raise a LogStash::ConfigurationError
|
174
172
|
raise e
|
175
173
|
end
|
@@ -208,9 +206,9 @@ module LogStash module PluginMixins module Jdbc
|
|
208
206
|
public
|
209
207
|
def execute_statement
|
210
208
|
success = false
|
211
|
-
@connection_lock.lock
|
212
|
-
open_jdbc_connection
|
213
209
|
begin
|
210
|
+
@connection_lock.lock
|
211
|
+
open_jdbc_connection
|
214
212
|
sql_last_value = @use_column_value ? @value_tracker.value : Time.now.utc
|
215
213
|
@tracking_column_warning_sent = false
|
216
214
|
@statement_handler.perform_query(@database, @value_tracker.value, @jdbc_paging_enabled, @jdbc_page_size) do |row|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'logstash-integration-jdbc'
|
3
|
-
s.version = '5.1.
|
3
|
+
s.version = '5.1.8'
|
4
4
|
s.licenses = ['Apache License (2.0)']
|
5
5
|
s.summary = "Integration with JDBC - input and filter plugins"
|
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"
|
@@ -41,7 +41,7 @@ Gem::Specification.new do |s|
|
|
41
41
|
s.add_runtime_dependency "logstash-mixin-event_support", '~> 1.0'
|
42
42
|
|
43
43
|
s.add_development_dependency "childprocess"
|
44
|
-
s.add_development_dependency 'logstash-devutils'
|
44
|
+
s.add_development_dependency 'logstash-devutils', '>= 2.3'
|
45
45
|
s.add_development_dependency 'timecop'
|
46
46
|
s.add_development_dependency 'jdbc-derby'
|
47
47
|
end
|
@@ -66,13 +66,13 @@ describe LogStash::Inputs::Jdbc, :integration => true do
|
|
66
66
|
)
|
67
67
|
end
|
68
68
|
|
69
|
-
it "
|
69
|
+
it "log warning msg when plugin run" do
|
70
70
|
plugin.register
|
71
|
-
|
71
|
+
expect( plugin ).to receive(:log_java_exception)
|
72
|
+
expect(plugin.logger).to receive(:warn).once.with("Exception when executing JDBC query",
|
73
|
+
hash_including(:exception => instance_of(String)))
|
72
74
|
q = Queue.new
|
73
|
-
expect
|
74
|
-
plugin.run(q)
|
75
|
-
end.to raise_error(::Sequel::DatabaseConnectionError)
|
75
|
+
expect{ plugin.run(q) }.not_to raise_error
|
76
76
|
end
|
77
77
|
|
78
78
|
it "should log (native) Java driver error" do
|
@@ -85,9 +85,7 @@ describe LogStash::Inputs::Jdbc, :integration => true do
|
|
85
85
|
logger
|
86
86
|
end
|
87
87
|
q = Queue.new
|
88
|
-
expect
|
89
|
-
plugin.run(q)
|
90
|
-
end.to raise_error(::Sequel::DatabaseConnectionError)
|
88
|
+
expect{ plugin.run(q) }.not_to raise_error
|
91
89
|
end
|
92
90
|
end
|
93
91
|
end
|
data/spec/inputs/jdbc_spec.rb
CHANGED
@@ -1393,10 +1393,8 @@ describe LogStash::Inputs::Jdbc do
|
|
1393
1393
|
event = queue.pop
|
1394
1394
|
expect(event.get("num")).to eq(1)
|
1395
1395
|
expect(event.get("string")).to eq("A test")
|
1396
|
-
expect(event.get("started_at")).to
|
1397
|
-
expect(event.get("
|
1398
|
-
expect(event.get("custom_time")).to be_a(LogStash::Timestamp)
|
1399
|
-
expect(event.get("custom_time").to_s).to eq("1999-12-31T23:59:59.000Z")
|
1396
|
+
expect(event.get("started_at")).to be_a_logstash_timestamp_equivalent_to("1999-12-31T00:00:00.000Z")
|
1397
|
+
expect(event.get("custom_time")).to be_a_logstash_timestamp_equivalent_to("1999-12-31T23:59:59.000Z")
|
1400
1398
|
expect(event.get("ranking").to_f).to eq(95.67)
|
1401
1399
|
end
|
1402
1400
|
end
|
@@ -1442,10 +1440,8 @@ describe LogStash::Inputs::Jdbc do
|
|
1442
1440
|
event = queue.pop
|
1443
1441
|
expect(event.get("num")).to eq(1)
|
1444
1442
|
expect(event.get("string")).to eq("A test")
|
1445
|
-
expect(event.get("started_at")).to
|
1446
|
-
expect(event.get("
|
1447
|
-
expect(event.get("custom_time")).to be_a(LogStash::Timestamp)
|
1448
|
-
expect(event.get("custom_time").to_s).to eq("1999-12-31T23:59:59.000Z")
|
1443
|
+
expect(event.get("started_at")).to be_a_logstash_timestamp_equivalent_to("1999-12-31T00:00:00.000Z")
|
1444
|
+
expect(event.get("custom_time")).to be_a_logstash_timestamp_equivalent_to("1999-12-31T23:59:59.000Z")
|
1449
1445
|
expect(event.get("ranking").to_f).to eq(95.67)
|
1450
1446
|
end
|
1451
1447
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-integration-jdbc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.1.
|
4
|
+
version: 5.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -203,7 +203,7 @@ dependencies:
|
|
203
203
|
requirements:
|
204
204
|
- - ">="
|
205
205
|
- !ruby/object:Gem::Version
|
206
|
-
version: '
|
206
|
+
version: '2.3'
|
207
207
|
name: logstash-devutils
|
208
208
|
prerelease: false
|
209
209
|
type: :development
|
@@ -211,7 +211,7 @@ dependencies:
|
|
211
211
|
requirements:
|
212
212
|
- - ">="
|
213
213
|
- !ruby/object:Gem::Version
|
214
|
-
version: '
|
214
|
+
version: '2.3'
|
215
215
|
- !ruby/object:Gem::Dependency
|
216
216
|
requirement: !ruby/object:Gem::Requirement
|
217
217
|
requirements:
|