fluent-plugin-td 0.10.24 → 0.10.25
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/.travis.yml +1 -0
- data/ChangeLog +6 -0
- data/Gemfile.msgpack.0.4 +5 -0
- data/lib/fluent/plugin/out_tdlog.rb +4 -2
- data/lib/fluent/plugin/td_plugin_version.rb +1 -1
- data/test/plugin/test_out_tdlog.rb +20 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a1db60dd2b0ce33a5752790d6f586c86ecf5d5d1
|
4
|
+
data.tar.gz: 860714c30461e7bd0904b91355eba1c35571e212
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b7a4e3c95a2180751bde7ae165f4e278aeb961907c16081fc6fba460b92841810dc1c3f5f1fe4b8b1a3c82e71bfc82558eb78121c0c98bc63bdf397549f4a40
|
7
|
+
data.tar.gz: cc08c575896bc7eb8361ee283391ae71db9e1a6dc3b6820d0327098c2c0347ad0e977a0d5044c7ce428d1dfac0d9865c83aae7828535cbef70e9e1016243f662
|
data/.travis.yml
CHANGED
data/ChangeLog
CHANGED
data/Gemfile.msgpack.0.4
ADDED
@@ -216,6 +216,8 @@ module Fluent
|
|
216
216
|
begin
|
217
217
|
record.to_msgpack(out)
|
218
218
|
rescue RangeError
|
219
|
+
# In msgpack v0.5, 'out' becomes String, not Buffer. This is not a problem because Buffer has a compatibility with String
|
220
|
+
out = out.to_s[0, off]
|
219
221
|
TreasureData::API.normalized_msgpack(record, out)
|
220
222
|
end
|
221
223
|
|
@@ -245,7 +247,7 @@ module Fluent
|
|
245
247
|
database, table = chunk.key.split('.', 2)
|
246
248
|
|
247
249
|
FileUtils.mkdir_p(@tmpdir) unless @tmpdir.nil?
|
248
|
-
f = Tempfile.new("tdlog-", @tmpdir)
|
250
|
+
f = Tempfile.new("tdlog-#{chunk.key}-", @tmpdir)
|
249
251
|
w = Zlib::GzipWriter.new(f)
|
250
252
|
|
251
253
|
chunk.write_to(w)
|
@@ -258,7 +260,7 @@ module Fluent
|
|
258
260
|
|
259
261
|
ensure
|
260
262
|
w.close if w
|
261
|
-
f.close if f
|
263
|
+
f.close(true) if f
|
262
264
|
end
|
263
265
|
|
264
266
|
def upload(database, table, io, size, unique_id)
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'fluent/test'
|
2
2
|
require 'fluent/plugin/out_tdlog'
|
3
|
+
require 'test_helper.rb'
|
3
4
|
|
4
5
|
class TreasureDataLogOutputTest < Test::Unit::TestCase
|
5
6
|
# BufferedOutputTestDriver uses module_eval, not inheritance.
|
@@ -75,6 +76,25 @@ class TreasureDataLogOutputTest < Test::Unit::TestCase
|
|
75
76
|
}, 'nil record should be skipped'
|
76
77
|
end
|
77
78
|
|
79
|
+
def test_emit_with_bigint_record
|
80
|
+
n = 100000000000000000000000
|
81
|
+
d = create_driver
|
82
|
+
time, records = stub_seed_values
|
83
|
+
records[1]['k'] = ['hogehoge' * 1000]
|
84
|
+
records[1]['kk'] = n.to_s # bigint is converted to string
|
85
|
+
database, table = d.instance.instance_variable_get(:@key).split(".", 2)
|
86
|
+
stub_td_table_create_request(database, table)
|
87
|
+
stub_td_import_request(stub_request_body(records, time), database, table)
|
88
|
+
|
89
|
+
test_time, test_records = stub_seed_values
|
90
|
+
test_records[1]['k'] = ['hogehoge' * 1000]
|
91
|
+
test_records[1]['kk'] = n
|
92
|
+
test_records.each { |record|
|
93
|
+
d.emit(record, test_time)
|
94
|
+
}
|
95
|
+
d.run
|
96
|
+
end
|
97
|
+
|
78
98
|
def test_emit_with_time_symbole
|
79
99
|
d = create_driver
|
80
100
|
time, records = stub_seed_values
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-td
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.25
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Treasure Data, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|
@@ -83,6 +83,7 @@ files:
|
|
83
83
|
- AUTHORS
|
84
84
|
- ChangeLog
|
85
85
|
- Gemfile
|
86
|
+
- Gemfile.msgpack.0.4
|
86
87
|
- README.rdoc
|
87
88
|
- Rakefile
|
88
89
|
- example.conf
|