logstash-output-jdbc 0.2.2 → 0.2.3
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 +4 -4
- data/lib/logstash/outputs/jdbc.rb +4 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68dade27398ee4f7682df9353b6c392635c52036
|
4
|
+
data.tar.gz: a02adde147e79062c3034f21b0894f800e460df2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e97f6280c8e1d49fc37b9736656df26a35a107582c36bebf7c17a038e5324771aab6cb83380fc4555f57be820e1e2e42614e4611d2605b6d8b0dd08d0ccc9bf6
|
7
|
+
data.tar.gz: df35f18204e43b2a4ab9b13c67c7edf7c2d3af9ee3be376f15a38e1a2a4650a540cb08fa8927488dd4b15784e1838ed9824579c413899b34ff8e80e6d0b80b35
|
@@ -44,7 +44,7 @@ class LogStash::Outputs::Jdbc < LogStash::Outputs::Base
|
|
44
44
|
config :max_pool_size, :validate => :number, :default => 5
|
45
45
|
|
46
46
|
# Connection timeout
|
47
|
-
config :connection_timeout, :validate => :number, :default =>
|
47
|
+
config :connection_timeout, :validate => :number, :default => 10000
|
48
48
|
|
49
49
|
# We buffer a certain number of events before flushing that out to SQL.
|
50
50
|
# This setting controls how many events will be buffered before sending a
|
@@ -156,9 +156,11 @@ class LogStash::Outputs::Jdbc < LogStash::Outputs::Base
|
|
156
156
|
@pool.setMaximumPoolSize(@max_pool_size)
|
157
157
|
@pool.setConnectionTimeout(@connection_timeout)
|
158
158
|
|
159
|
+
validate_connection_timeout = (@connection_timeout / 1000) / 2
|
160
|
+
|
159
161
|
# Test connection
|
160
162
|
test_connection = @pool.getConnection()
|
161
|
-
unless test_connection.isValid(
|
163
|
+
unless test_connection.isValid(validate_connection_timeout)
|
162
164
|
@logger.error("JDBC - Connection is not valid. Please check connection string or that your JDBC endpoint is available.")
|
163
165
|
end
|
164
166
|
test_connection.close()
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-output-jdbc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- the_angry_angel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logstash-core
|