logstash-output-charrington 0.3.5 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/commons-io/commons-io/2.4/commons-io-2.4.jar +0 -0
- data/lib/de/flapdoodle/embed/de.flapdoodle.embed.process/2.0.2/de.flapdoodle.embed.process-2.0.2.jar +0 -0
- data/lib/logstash/outputs/charrington/alter_redshift_table.rb +14 -5
- data/lib/net/java/dev/jna/jna-platform/4.0.0/jna-platform-4.0.0.jar +0 -0
- data/lib/net/java/dev/jna/jna/4.0.0/jna-4.0.0.jar +0 -0
- data/lib/org/apache/commons/commons-compress/1.10/commons-compress-1.10.jar +0 -0
- data/lib/org/apache/commons/commons-lang3/3.1/commons-lang3-3.1.jar +0 -0
- data/lib/org/postgresql/postgresql/42.2.5/postgresql-42.2.5.jar +0 -0
- data/lib/ru/yandex/qatools/embed/postgresql-embedded/2.10/postgresql-embedded-2.10.jar +0 -0
- data/lib/ru/yandex/qatools/embed/postgresql-embedded/2.8/postgresql-embedded-2.8.jar +0 -0
- data/logstash-output-charrington.gemspec +1 -1
- metadata +10 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67301110645343eb9a0187da8a7c914cdba6ebe03241cea40ec757cc0972d61d
|
4
|
+
data.tar.gz: 753facf12027fd4a0c2d6a446835d060911aae52e74100b334ba6a277c37385c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0178367f4b8c91dff6da258005228ea8d473c7c6e550bcb03b6dd4e36a03f123a8ae83e96a7f91e8099c619f0fd7b3916388ba24741336881d2b3ff0c0c98733'
|
7
|
+
data.tar.gz: 16467a4fa971bc585e24cab322555239ba687daf77ece2839ad2e5d35ecf9af19463726261c7e4d31752a5771aee5881870fac3d61dbe887c8b0c6457caf6d95
|
Binary file
|
data/lib/de/flapdoodle/embed/de.flapdoodle.embed.process/2.0.2/de.flapdoodle.embed.process-2.0.2.jar
ADDED
Binary file
|
@@ -35,19 +35,19 @@ module Charrington
|
|
35
35
|
private
|
36
36
|
|
37
37
|
def alter_table
|
38
|
-
|
38
|
+
execute_list(get_list_of_alter_table_stmts)
|
39
39
|
end
|
40
40
|
|
41
|
-
def
|
41
|
+
def get_list_of_alter_table_stmts
|
42
42
|
column_types.map do |column|
|
43
|
-
"ADD COLUMN #{column}"
|
44
|
-
end
|
43
|
+
"ALTER TABLE #{schema}#{table_name} ADD COLUMN #{column}"
|
44
|
+
end
|
45
45
|
end
|
46
46
|
|
47
47
|
def set_column_types
|
48
48
|
(columns - current_table_columns).each_with_index do |key, idx|
|
49
49
|
self.logger.info "New column: #{key}, because of event: #{event}"
|
50
|
-
|
50
|
+
|
51
51
|
case event[key]
|
52
52
|
when Time, LogStash::Timestamp
|
53
53
|
column_types << "#{key} TIMESTAMP"
|
@@ -78,6 +78,15 @@ module Charrington
|
|
78
78
|
stmt.close unless stmt.nil?
|
79
79
|
end
|
80
80
|
|
81
|
+
def execute_list(list_of_sql_stmts)
|
82
|
+
self.logger.info "Received list of sql statments to execute: #{list_of_sql_stmts}"
|
83
|
+
|
84
|
+
list_of_sql_stmts.each_with_index do |sql, idx|
|
85
|
+
self.logger.info "Executing ALTER TABLE statement with index #{idx} and sql of: #{sql}"
|
86
|
+
execute(sql)
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
81
90
|
def execute(sql)
|
82
91
|
stmt = connection.prepareStatement(prep_sql(sql))
|
83
92
|
stmt.execute()
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-output-charrington
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- dconger
|
@@ -182,6 +182,8 @@ files:
|
|
182
182
|
- README.md
|
183
183
|
- THANKS.md
|
184
184
|
- lib/com/zaxxer/HikariCP/2.7.2/HikariCP-2.7.2.jar
|
185
|
+
- lib/commons-io/commons-io/2.4/commons-io-2.4.jar
|
186
|
+
- lib/de/flapdoodle/embed/de.flapdoodle.embed.process/2.0.2/de.flapdoodle.embed.process-2.0.2.jar
|
185
187
|
- lib/logstash-output-charrington_jars.rb
|
186
188
|
- lib/logstash/outputs/charrington.rb
|
187
189
|
- lib/logstash/outputs/charrington/alter_postgres_table.rb
|
@@ -193,9 +195,16 @@ files:
|
|
193
195
|
- lib/logstash/outputs/charrington/service.rb
|
194
196
|
- lib/logstash/outputs/charrington/transform_postgres.rb
|
195
197
|
- lib/logstash/outputs/charrington/transform_redshift.rb
|
198
|
+
- lib/net/java/dev/jna/jna-platform/4.0.0/jna-platform-4.0.0.jar
|
199
|
+
- lib/net/java/dev/jna/jna/4.0.0/jna-4.0.0.jar
|
200
|
+
- lib/org/apache/commons/commons-compress/1.10/commons-compress-1.10.jar
|
201
|
+
- lib/org/apache/commons/commons-lang3/3.1/commons-lang3-3.1.jar
|
196
202
|
- lib/org/apache/logging/log4j/log4j-api/2.6.2/log4j-api-2.6.2.jar
|
197
203
|
- lib/org/apache/logging/log4j/log4j-slf4j-impl/2.6.2/log4j-slf4j-impl-2.6.2.jar
|
204
|
+
- lib/org/postgresql/postgresql/42.2.5/postgresql-42.2.5.jar
|
198
205
|
- lib/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar
|
206
|
+
- lib/ru/yandex/qatools/embed/postgresql-embedded/2.10/postgresql-embedded-2.10.jar
|
207
|
+
- lib/ru/yandex/qatools/embed/postgresql-embedded/2.8/postgresql-embedded-2.8.jar
|
199
208
|
- logstash-output-charrington.gemspec
|
200
209
|
- spec/charrington_spec_helper.rb
|
201
210
|
- spec/logstash-output-charrington_test_jars.rb
|