fluent-plugin-td 0.10.14 → 0.10.15

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: e714d06604caed899f2c4e779a2992ea212fc56b
4
+ data.tar.gz: 7adba07608a2c16bd3ed66569f292e764849e546
5
+ SHA512:
6
+ metadata.gz: 5e4368592d9bf8c457d354de53cc066af26cdb79af2f83142a7a394dfadfd89ff6e85a2d9115af93400acebad958133552156c5518e4a90a1f4406f1e25c2c78
7
+ data.tar.gz: a5ae6d314cc1e75c33deffd37a483cae7a5ce5ec7f52fda474241fcd4e0aabbd613a3cacd0e0e00664b288904b623f386d0c939975a66ab285e48c6c9d5f7b40
data/ChangeLog CHANGED
@@ -1,3 +1,10 @@
1
+ Release 0.10.15 - 2013/07/26
2
+
3
+ * Add user-agent header to upload request
4
+ * Change temporary directory to same as Ruby's Tempfile default
5
+ * Convert Bignum into String. Please use 'CAST(key AS DECIMAL)' in your query.
6
+ * Update td-client to v0.8.53
7
+
1
8
 
2
9
  Release 0.10.14 - 2013/04/22
3
10
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.10.14
1
+ 0.10.15
@@ -17,6 +17,6 @@ Gem::Specification.new do |gem|
17
17
  gem.require_paths = ['lib']
18
18
 
19
19
  gem.add_dependency "fluentd", "~> 0.10.27"
20
- gem.add_dependency "td-client", "~> 0.8.48"
20
+ gem.add_dependency "td-client", "~> 0.8.53"
21
21
  gem.add_development_dependency "rake", ">= 0.9.2"
22
22
  end
@@ -71,7 +71,7 @@ class TreasureDataLogOutput < BufferedOutput
71
71
  require 'td-client'
72
72
  require 'digest/md5'
73
73
  super
74
- @tmpdir = '/tmp/fluent/tdlog'
74
+ @tmpdir = nil
75
75
  @apikey = nil
76
76
  @key = nil
77
77
  @key_num_limit = 5120 # TODO
@@ -91,8 +91,10 @@ class TreasureDataLogOutput < BufferedOutput
91
91
  @buffer.buffer_chunk_limit = IMPORT_SIZE_LIMIT
92
92
  end
93
93
 
94
- @tmpdir = conf['tmpdir'] || @tmpdir
95
- FileUtils.mkdir_p(@tmpdir)
94
+ if conf.has_key?('tmpdir')
95
+ @tmpdir = conf['tmpdir']
96
+ FileUtils.mkdir_p(@tmpdir)
97
+ end
96
98
 
97
99
  @apikey = conf['apikey']
98
100
  unless @apikey
@@ -164,11 +166,12 @@ class TreasureDataLogOutput < BufferedOutput
164
166
  @anonymizes = nil if @anonymizes.empty?
165
167
 
166
168
  @http_proxy = conf['http_proxy']
169
+ @user_agent = "fluent-plugin-td: 0.10.15" # TODO: automatic increment version
167
170
  end
168
171
 
169
172
  def start
170
173
  super
171
- @client = TreasureData::Client.new(@apikey, :ssl=>@use_ssl, :http_proxy=>@http_proxy)
174
+ @client = TreasureData::Client.new(@apikey, :ssl=>@use_ssl, :http_proxy=>@http_proxy, :user_agent=>@user_agent)
172
175
  unless @auto_create_table
173
176
  check_table_exists(@key)
174
177
  end
@@ -219,7 +222,11 @@ class TreasureDataLogOutput < BufferedOutput
219
222
  next
220
223
  end
221
224
 
222
- record.to_msgpack(out)
225
+ begin
226
+ record.to_msgpack(out)
227
+ rescue RangeError
228
+ TreasureData::API.normalized_msgpack(record, out)
229
+ end
223
230
 
224
231
  noff = out.bytesize
225
232
  sz = noff - off
@@ -246,6 +253,7 @@ class TreasureDataLogOutput < BufferedOutput
246
253
  unique_id = chunk.unique_id
247
254
  database, table = chunk.key.split('.',2)
248
255
 
256
+ FileUtils.mkdir_p(@tmpdir) unless @tmpdir.nil?
249
257
  f = Tempfile.new("tdlog-", @tmpdir)
250
258
  w = Zlib::GzipWriter.new(f)
251
259
 
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-td
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.14
5
- prerelease:
4
+ version: 0.10.15
6
5
  platform: ruby
7
6
  authors:
8
7
  - Treasure Data, Inc.
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-04-23 00:00:00.000000000 Z
11
+ date: 2013-07-25 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: fluentd
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ~>
28
25
  - !ruby/object:Gem::Version
@@ -30,33 +27,29 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: td-client
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ~>
36
32
  - !ruby/object:Gem::Version
37
- version: 0.8.48
33
+ version: 0.8.53
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ~>
44
39
  - !ruby/object:Gem::Version
45
- version: 0.8.48
40
+ version: 0.8.53
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: rake
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - '>='
52
46
  - !ruby/object:Gem::Version
53
47
  version: 0.9.2
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - '>='
60
53
  - !ruby/object:Gem::Version
61
54
  version: 0.9.2
62
55
  description: Treasure Data Big Data as a Service plugin for Fluentd
@@ -78,33 +71,26 @@ files:
78
71
  - test/out_tdlog.rb
79
72
  homepage: http://treasure-data.com/
80
73
  licenses: []
74
+ metadata: {}
81
75
  post_install_message:
82
76
  rdoc_options: []
83
77
  require_paths:
84
78
  - lib
85
79
  required_ruby_version: !ruby/object:Gem::Requirement
86
- none: false
87
80
  requirements:
88
- - - ! '>='
81
+ - - '>='
89
82
  - !ruby/object:Gem::Version
90
83
  version: '0'
91
- segments:
92
- - 0
93
- hash: -1597575292850647774
94
84
  required_rubygems_version: !ruby/object:Gem::Requirement
95
- none: false
96
85
  requirements:
97
- - - ! '>='
86
+ - - '>='
98
87
  - !ruby/object:Gem::Version
99
88
  version: '0'
100
- segments:
101
- - 0
102
- hash: -1597575292850647774
103
89
  requirements: []
104
90
  rubyforge_project:
105
- rubygems_version: 1.8.23
91
+ rubygems_version: 2.0.2
106
92
  signing_key:
107
- specification_version: 3
93
+ specification_version: 4
108
94
  summary: Treasure Data Big Data as a Service plugin for Fluentd
109
95
  test_files:
110
96
  - test/out_tdlog.rb