fluent-plugin-elasticsearch 3.5.2 → 3.5.3
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c5093f6c265f2f0ac3cd14caea2f3fbe35e3ec8298d0c5f7189caeab58303e6
|
4
|
+
data.tar.gz: 36feb2e651446883c84b8e41dfceb8f0d16e53920938c623540db83c7ae92a38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 858f0656ee19d31d7dde01a0df664269eb350f79c58fe051f4881479a74c11b4448800a04f36bb6c01dbd03800bbf5fa3c3b8ccca0a5a9bb3e1b5a9cb300875d
|
7
|
+
data.tar.gz: 2a9bf33a6840fcd246117d362e83524a79544b61a3a19ad977b1407d8bf8577bc5634a71952a34e78f553194b23595341324b451ba18f01b79942b46a40a2984
|
data/History.md
CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path('../lib', __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = 'fluent-plugin-elasticsearch'
|
6
|
-
s.version = '3.5.
|
6
|
+
s.version = '3.5.3'
|
7
7
|
s.authors = ['diogo', 'pitr']
|
8
8
|
s.email = ['pitr.vern@gmail.com', 'me@diogoterror.com']
|
9
9
|
s.description = %q{Elasticsearch output plugin for Fluent event collector}
|
@@ -56,10 +56,13 @@ class Fluent::Plugin::ElasticsearchErrorHandler
|
|
56
56
|
next
|
57
57
|
end
|
58
58
|
item = items.shift
|
59
|
-
if item.has_key?(@plugin.write_operation)
|
59
|
+
if item.is_a?(Hash) && item.has_key?(@plugin.write_operation)
|
60
60
|
write_operation = @plugin.write_operation
|
61
|
-
elsif INDEX_OP == @plugin.write_operation && item.has_key?(CREATE_OP)
|
61
|
+
elsif INDEX_OP == @plugin.write_operation && item.is_a?(Hash) && item.has_key?(CREATE_OP)
|
62
62
|
write_operation = CREATE_OP
|
63
|
+
elsif item.nil?
|
64
|
+
stats[:errors_nil_resp] += 1
|
65
|
+
next
|
63
66
|
else
|
64
67
|
# When we don't have an expected ops field, something changed in the API
|
65
68
|
# expected return values (ES 2.x)
|
@@ -145,6 +145,20 @@ class TestElasticsearchErrorHandler < Test::Unit::TestCase
|
|
145
145
|
end
|
146
146
|
end
|
147
147
|
|
148
|
+
def test_nil_items_responses
|
149
|
+
records = [{time: 123, record: {"foo" => "bar", '_id' => 'abc'}}]
|
150
|
+
response = parse_response(%({
|
151
|
+
"took" : 0,
|
152
|
+
"errors" : true,
|
153
|
+
"items" : [{}]
|
154
|
+
}))
|
155
|
+
chunk = MockChunk.new(records)
|
156
|
+
dummy_extracted_values = []
|
157
|
+
@handler.handle_error(response, 'atag', chunk, records.length, dummy_extracted_values)
|
158
|
+
assert_equal(0, @plugin.error_events.size)
|
159
|
+
assert_nil(@plugin.error_events[0])
|
160
|
+
end
|
161
|
+
|
148
162
|
def test_dlq_400_responses
|
149
163
|
records = [{time: 123, record: {"foo" => "bar", '_id' => 'abc'}}]
|
150
164
|
response = parse_response(%({
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-elasticsearch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.5.
|
4
|
+
version: 3.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- diogo
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-
|
12
|
+
date: 2019-07-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: fluentd
|