fluent-plugin-td 0.10.29 → 0.11.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -6
- data/ChangeLog +7 -0
- data/Gemfile.v0.12 +1 -1
- data/fluent-plugin-td.gemspec +2 -2
- data/lib/fluent/plugin/out_tdlog.rb +2 -2
- data/lib/fluent/plugin/td_plugin_version.rb +1 -1
- data/test/plugin/test_out_tdlog.rb +19 -0
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d1ae29d128d90dd331b4cc446ea185179c1a0a33
|
4
|
+
data.tar.gz: 5d8ed306878be4384000dcee1f60e94cea1a591d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2a2dde68301f045c80edcedcd0deaa6830eab6f449cabc9c5c98fc698138396d7f1a2556bf93f771096eecd9b9bdc12bdf6d97b6f32476c93f13fb6ebca3860
|
7
|
+
data.tar.gz: dcc9909052e4b5450f80d29b8f222803c0f70ea84c6db3ae00582fb70ecd9fa94fe69185604d09ac11ea41b76553d6897212b51bf8ef0e147458d7138d486b69
|
data/.travis.yml
CHANGED
@@ -1,9 +1,8 @@
|
|
1
1
|
rvm:
|
2
|
-
- 1.9.3
|
3
|
-
- 2.0
|
4
2
|
- 2.1
|
5
3
|
- 2.2.4
|
6
4
|
- 2.3.1
|
5
|
+
- 2.4.0
|
7
6
|
- ruby-head
|
8
7
|
|
9
8
|
gemfile:
|
@@ -19,7 +18,5 @@ matrix:
|
|
19
18
|
allow_failures:
|
20
19
|
- rvm: ruby-head
|
21
20
|
exclude:
|
22
|
-
- rvm:
|
23
|
-
gemfile: Gemfile
|
24
|
-
- rvm: 2.0
|
25
|
-
gemfile: Gemfile
|
21
|
+
- rvm: 2.4.0
|
22
|
+
gemfile: Gemfile.v0.12
|
data/ChangeLog
CHANGED
data/Gemfile.v0.12
CHANGED
data/fluent-plugin-td.gemspec
CHANGED
@@ -18,8 +18,8 @@ Gem::Specification.new do |gem|
|
|
18
18
|
gem.require_paths = ['lib']
|
19
19
|
gem.license = "Apache-2.0"
|
20
20
|
|
21
|
-
gem.add_dependency "fluentd", [">= 0.
|
22
|
-
gem.add_dependency "td-client", "~> 0
|
21
|
+
gem.add_dependency "fluentd", [">= 0.12.0", "< 2"]
|
22
|
+
gem.add_dependency "td-client", "~> 1.0"
|
23
23
|
gem.add_development_dependency "rake", ">= 0.9.2"
|
24
24
|
gem.add_development_dependency "webmock", "~> 1.16"
|
25
25
|
gem.add_development_dependency "test-unit", "~> 3.0.8"
|
@@ -119,14 +119,14 @@ module Fluent
|
|
119
119
|
end
|
120
120
|
|
121
121
|
def format_stream(tag, es)
|
122
|
-
out =
|
122
|
+
out = MessagePack::Buffer.new
|
123
123
|
off = out.size # size is same as bytesize in ASCII-8BIT string
|
124
124
|
es.each { |time, record|
|
125
125
|
# Applications may send non-hash record or broken chunk may generate non-hash record so such records should be skipped
|
126
126
|
next unless record.is_a?(Hash)
|
127
127
|
|
128
128
|
begin
|
129
|
-
record['time'] = time
|
129
|
+
record['time'] = time.to_i
|
130
130
|
record.delete(:time) if record.has_key?(:time)
|
131
131
|
|
132
132
|
if record.size > @key_num_limit
|
@@ -117,6 +117,25 @@ class TreasureDataLogOutputTest < Test::Unit::TestCase
|
|
117
117
|
d.run
|
118
118
|
end
|
119
119
|
|
120
|
+
def test_emit_with_event_time
|
121
|
+
omit "EventTime is not implemented with current Fluentd version" unless Fluent.const_defined?('EventTime')
|
122
|
+
|
123
|
+
event_time_klass = Fluent.const_get('EventTime')
|
124
|
+
|
125
|
+
event_time = event_time_klass.now
|
126
|
+
d = create_driver
|
127
|
+
_time, records = stub_seed_values
|
128
|
+
database, table = d.instance.instance_variable_get(:@key).split(".", 2)
|
129
|
+
stub_td_table_create_request(database, table)
|
130
|
+
stub_td_import_request(stub_request_body(records, event_time.to_i), database, table)
|
131
|
+
|
132
|
+
_test_time, test_records = stub_seed_values
|
133
|
+
test_records.each { |record|
|
134
|
+
d.emit(record, event_time)
|
135
|
+
}
|
136
|
+
d.run
|
137
|
+
end
|
138
|
+
|
120
139
|
def test_emit_with_time_symbole
|
121
140
|
d = create_driver
|
122
141
|
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.
|
4
|
+
version: 0.11.0.rc1
|
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:
|
11
|
+
date: 2017-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.12.0
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: '2'
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.
|
29
|
+
version: 0.12.0
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '2'
|
@@ -36,14 +36,14 @@ dependencies:
|
|
36
36
|
requirements:
|
37
37
|
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: 0
|
39
|
+
version: '1.0'
|
40
40
|
type: :runtime
|
41
41
|
prerelease: false
|
42
42
|
version_requirements: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|
44
44
|
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: 0
|
46
|
+
version: '1.0'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: rake
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -137,12 +137,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
137
137
|
version: '0'
|
138
138
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
139
139
|
requirements:
|
140
|
-
- - "
|
140
|
+
- - ">"
|
141
141
|
- !ruby/object:Gem::Version
|
142
|
-
version:
|
142
|
+
version: 1.3.1
|
143
143
|
requirements: []
|
144
144
|
rubyforge_project:
|
145
|
-
rubygems_version: 2.
|
145
|
+
rubygems_version: 2.6.8
|
146
146
|
signing_key:
|
147
147
|
specification_version: 4
|
148
148
|
summary: Treasure Data Cloud Data Service plugin for Fluentd
|