fluent-plugin-redshift-out 0.4.0 → 0.4.1
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/VERSION +1 -1
- data/lib/fluent/plugin/out_redshift-out.rb +4 -0
- data/test/plugin/test_out_redshift.rb +6 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 28c952d81280b2ad7696326e84915b86cabdb6bc
|
4
|
+
data.tar.gz: 5610f078618641fd172df3444297dd4c0edd0909
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0508d4e80c3d3c50e58a0ce6b73703cda84cc129c1ffd9ce4da5ffcc3c420554489194de7b6cb512ffb4f0435d90b6f59a772ea9366b5fb067581c759fc014b7
|
7
|
+
data.tar.gz: a2445027f4b587eb41ccccac7444069e9a55fa74ba0c5388c171fe2d46bbb4c80b566243b3e21f4b3c158a7f0baa7060645ed21398527df2095dc82600399144
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.1
|
@@ -81,6 +81,7 @@ class RedshiftOutput < BufferedOutput
|
|
81
81
|
@s3 = AWS::S3.new(options)
|
82
82
|
@bucket = @s3.buckets[@s3_bucket]
|
83
83
|
@redshift_connection = RedshiftConnection.new(@db_conf)
|
84
|
+
@redshift_connection.connect_start
|
84
85
|
end
|
85
86
|
|
86
87
|
def format(tag, time, record)
|
@@ -289,6 +290,9 @@ class RedshiftOutput < BufferedOutput
|
|
289
290
|
def initialize(db_conf)
|
290
291
|
@db_conf = db_conf
|
291
292
|
@connection = nil
|
293
|
+
ObjectSpace.define_finalizer(self) {
|
294
|
+
close()
|
295
|
+
}
|
292
296
|
end
|
293
297
|
|
294
298
|
attr_reader :db_conf
|
@@ -187,6 +187,7 @@ class RedshiftOutputTest < Test::Unit::TestCase
|
|
187
187
|
end
|
188
188
|
|
189
189
|
def test_format_csv
|
190
|
+
setup_mocks("")
|
190
191
|
d_csv = create_driver_no_write(CONFIG_CSV)
|
191
192
|
emit_csv(d_csv)
|
192
193
|
d_csv.expect_format RECORD_CSV_A['log'] + "\n"
|
@@ -194,6 +195,7 @@ class RedshiftOutputTest < Test::Unit::TestCase
|
|
194
195
|
d_csv.run
|
195
196
|
end
|
196
197
|
def test_format_tsv
|
198
|
+
setup_mocks("")
|
197
199
|
d_tsv = create_driver_no_write(CONFIG_TSV)
|
198
200
|
emit_tsv(d_tsv)
|
199
201
|
d_tsv.expect_format RECORD_TSV_A['log'] + "\n"
|
@@ -201,6 +203,7 @@ class RedshiftOutputTest < Test::Unit::TestCase
|
|
201
203
|
d_tsv.run
|
202
204
|
end
|
203
205
|
def test_format_json
|
206
|
+
setup_mocks("")
|
204
207
|
d_json = create_driver_no_write(CONFIG_JSON)
|
205
208
|
emit_json(d_json)
|
206
209
|
d_json.expect_format RECORD_JSON_A.to_msgpack
|
@@ -209,6 +212,7 @@ class RedshiftOutputTest < Test::Unit::TestCase
|
|
209
212
|
end
|
210
213
|
|
211
214
|
def test_format_msgpack
|
215
|
+
setup_mocks("")
|
212
216
|
d_msgpack = create_driver_no_write(CONFIG_MSGPACK)
|
213
217
|
emit_msgpack(d_msgpack)
|
214
218
|
d_msgpack.expect_format({ 'log' => RECORD_MSGPACK_A }.to_msgpack)
|
@@ -254,6 +258,7 @@ class RedshiftOutputTest < Test::Unit::TestCase
|
|
254
258
|
end
|
255
259
|
end
|
256
260
|
end
|
261
|
+
conn.should_receive(:connect_start)
|
257
262
|
end
|
258
263
|
end
|
259
264
|
|
@@ -485,6 +490,7 @@ class RedshiftOutputTest < Test::Unit::TestCase
|
|
485
490
|
end
|
486
491
|
|
487
492
|
def test_maintenance_mode
|
493
|
+
setup_mocks("")
|
488
494
|
flexmock(File).should_receive(:exists?).with(MAINTENANCE_FILE_PATH_FOR_TEST).and_return(true)
|
489
495
|
|
490
496
|
d_json = create_driver(CONFIG_JSON)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-redshift-out
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Naohiro Sakuma
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|
@@ -163,7 +163,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
163
163
|
version: '0'
|
164
164
|
requirements: []
|
165
165
|
rubyforge_project:
|
166
|
-
rubygems_version: 2.
|
166
|
+
rubygems_version: 2.5.1
|
167
167
|
signing_key:
|
168
168
|
specification_version: 4
|
169
169
|
summary: Amazon Redshift output plugin for Fluentd
|