fluent-plugin-groonga 1.1.5 → 1.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/doc/text/news.md +12 -0
- data/fluent-plugin-groonga.gemspec +1 -1
- data/lib/fluent/plugin/in_groonga.rb +37 -12
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc768884f9ce10fdc73cc18f8d2cddae575b75a9
|
4
|
+
data.tar.gz: ee2ed4d2717c46d0aa5b52425591598e20971f80
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b4dbd683a4cbe10a7477bbe08ce8e2a15aa3bd090fff6cc4f9e4810f04e0a46b212e96cacfb176fb9dcf5cf8efc952ca06862d0d9d6b1fe78107ee9bdcc94250
|
7
|
+
data.tar.gz: ae2d76e50c1c8cdfce5133bfa9c6bd708bd1725d4ce73c90f16e8b6a39452b68d59f462009f9dfa4368288ebb3c94523f201d10c6a07b796ebabba0a6130d459
|
data/doc/text/news.md
CHANGED
@@ -2,6 +2,18 @@
|
|
2
2
|
|
3
3
|
# News
|
4
4
|
|
5
|
+
## 1.1.6: 2016-10-03
|
6
|
+
|
7
|
+
### Improvements
|
8
|
+
|
9
|
+
* Supported "100-continue" case.
|
10
|
+
HTTP response shouldn't be finished when a HTTP client requests
|
11
|
+
"100-continue". curl, PHP HTTP client and so on use "100-continue"
|
12
|
+
when they send a large POST data. The input groonga plugin should
|
13
|
+
support "100-conitnue".
|
14
|
+
* Ignored invalid JSON.
|
15
|
+
* Added more information to logs.
|
16
|
+
|
5
17
|
## 1.1.5: 2016-09-28
|
6
18
|
|
7
19
|
### Improvements
|
@@ -17,7 +17,7 @@
|
|
17
17
|
|
18
18
|
Gem::Specification.new do |spec|
|
19
19
|
spec.name = "fluent-plugin-groonga"
|
20
|
-
spec.version = "1.1.
|
20
|
+
spec.version = "1.1.6"
|
21
21
|
spec.authors = ["Kouhei Sutou"]
|
22
22
|
spec.email = ["kou@clear-code.com"]
|
23
23
|
spec.summary = "Fluentd plugin to store data into Groonga and implement Groonga replication system."
|
@@ -182,7 +182,8 @@ module Fluent
|
|
182
182
|
def run
|
183
183
|
@loop.run
|
184
184
|
rescue
|
185
|
-
$log.error
|
185
|
+
$log.error("[input][groonga][error] unexpected error",
|
186
|
+
:error => "#{$!.class}: #{$!}")
|
186
187
|
$log.error_backtrace
|
187
188
|
end
|
188
189
|
|
@@ -213,7 +214,7 @@ module Fluent
|
|
213
214
|
def on_connect
|
214
215
|
@repeater = @input.create_repeater(self)
|
215
216
|
@repeater.on_connect_failed do
|
216
|
-
$log.error("[input][groonga][error] " +
|
217
|
+
$log.error("[input][groonga][connect][error] " +
|
217
218
|
"failed to connect to Groonga:",
|
218
219
|
:real_host => @input.real_host,
|
219
220
|
:real_port => @input.real_port)
|
@@ -227,13 +228,13 @@ module Fluent
|
|
227
228
|
begin
|
228
229
|
@request_handler << data
|
229
230
|
rescue HTTP::Parser::Error, URI::InvalidURIError
|
230
|
-
$log.error("[input][groonga][error] " +
|
231
|
+
$log.error("[input][groonga][request][error] " +
|
231
232
|
"failed to parse HTTP request:",
|
232
233
|
:error => "#{$!.class}: #{$!}")
|
233
234
|
$log.error_backtrace
|
234
235
|
reply_error_response("400 Bad Request")
|
235
236
|
rescue
|
236
|
-
$log.error("[input][groonga][error] " +
|
237
|
+
$log.error("[input][groonga][request][error] " +
|
237
238
|
"failed to handle HTTP request:",
|
238
239
|
:error => "#{$!.class}: #{$!}")
|
239
240
|
$log.error_backtrace
|
@@ -242,7 +243,16 @@ module Fluent
|
|
242
243
|
end
|
243
244
|
|
244
245
|
def write_back(data)
|
245
|
-
|
246
|
+
begin
|
247
|
+
@response_handler << data
|
248
|
+
rescue
|
249
|
+
$log.error("[input][groonga][response][error] " +
|
250
|
+
"failed to handle HTTP response from Groonga:",
|
251
|
+
:error => "#{$!.class}: #{$!}")
|
252
|
+
$log.error_backtrace
|
253
|
+
reply_error_response("500 Internal Server Error")
|
254
|
+
return
|
255
|
+
end
|
246
256
|
write(data)
|
247
257
|
end
|
248
258
|
|
@@ -372,15 +382,30 @@ module Fluent
|
|
372
382
|
end
|
373
383
|
|
374
384
|
def on_message_complete
|
385
|
+
return if @parser.status_code == 100
|
386
|
+
|
387
|
+
response = nil
|
375
388
|
case @content_type
|
376
|
-
when /\Aapplication\/json\z/
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
389
|
+
when /\Aapplication\/json\z/i
|
390
|
+
begin
|
391
|
+
response = JSON.parse(@body)
|
392
|
+
rescue JSON::ParserError
|
393
|
+
$log.warn("[input][groonga][response][warn] " +
|
394
|
+
"failed to parse response JSON:",
|
395
|
+
:error => "#{$!.class}: #{$!}",
|
396
|
+
:json => @body)
|
397
|
+
end
|
398
|
+
when /\Aapplication\/x-msgpack\z/i
|
399
|
+
begin
|
400
|
+
response = MessagePack.unpack(@body)
|
401
|
+
rescue MessagePack::UnpackError, EOFError
|
402
|
+
$log.warn("[input][groonga][response][warn] " +
|
403
|
+
"failed to parse response MessagePack",
|
404
|
+
:error => "#{$!.class}: #{$!}",
|
405
|
+
:msgpack => @body)
|
406
|
+
end
|
407
|
+
when /\Atext\/x-groonga-command-list\z/i
|
381
408
|
response = @body
|
382
|
-
else
|
383
|
-
response = nil
|
384
409
|
end
|
385
410
|
@handler.on_response_complete(response)
|
386
411
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-groonga
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kouhei Sutou
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|