logstash-codec-es_bulk 3.0.2 → 3.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/logstash/codecs/es_bulk.rb +10 -10
- data/logstash-codec-es_bulk.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 72a098a373cb83cf18c229661c69753ed7a4311b
|
4
|
+
data.tar.gz: 3aa8450510fbc6d956eaf51cb0b6f8ed24bf3d22
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 201e15ca1ca99f84c44ef0069db7f7b0b19fc009cc2f783713e9679c1a5e7236b8a36d71071022edb0ff7754b1ebd837efb397ca799dbd038c60299b7689b795
|
7
|
+
data.tar.gz: 1f8e14e0650b248816e74c5855c4b51405d4d60d535e5817e748b1785bc656f98ab2878aeb568cd07edfc08b9a894479696b699a6ae66b9c6811f6f85550f104
|
data/CHANGELOG.md
CHANGED
@@ -16,30 +16,30 @@ class LogStash::Codecs::ESBulk < LogStash::Codecs::Base
|
|
16
16
|
super(params)
|
17
17
|
@lines = LogStash::Codecs::Line.new
|
18
18
|
@lines.charset = "UTF-8"
|
19
|
+
@state = :initial
|
20
|
+
@metadata = Hash.new
|
19
21
|
end
|
20
22
|
|
21
23
|
public
|
22
24
|
def decode(data)
|
23
|
-
state = :initial
|
24
|
-
metadata = Hash.new
|
25
25
|
@lines.decode(data) do |bulk|
|
26
26
|
begin
|
27
27
|
line = LogStash::Json.load(bulk.get("message"))
|
28
|
-
case state
|
28
|
+
case @state
|
29
29
|
when :metadata
|
30
30
|
event = LogStash::Event.new(line)
|
31
|
-
event.set("@metadata", metadata)
|
31
|
+
event.set("@metadata", @metadata)
|
32
32
|
yield event
|
33
|
-
state = :initial
|
33
|
+
@state = :initial
|
34
34
|
when :initial
|
35
|
-
metadata = line[line.keys[0]]
|
36
|
-
metadata["action"] = line.keys[0].to_s
|
37
|
-
state = :metadata
|
35
|
+
@metadata = line[line.keys[0]]
|
36
|
+
@metadata["action"] = line.keys[0].to_s
|
37
|
+
@state = :metadata
|
38
38
|
if line.keys[0] == 'delete'
|
39
39
|
event = LogStash::Event.new()
|
40
|
-
event.set("@metadata", metadata)
|
40
|
+
event.set("@metadata", @metadata)
|
41
41
|
yield event
|
42
|
-
state = :initial
|
42
|
+
@state = :initial
|
43
43
|
end
|
44
44
|
end
|
45
45
|
rescue LogStash::Json::ParserError => e
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-codec-es_bulk'
|
4
|
-
s.version = '3.0.
|
4
|
+
s.version = '3.0.3'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "This codec decodes messages received in the Elasticsearch bulk format"
|
7
7
|
s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-codec-es_bulk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -95,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
95
95
|
version: '0'
|
96
96
|
requirements: []
|
97
97
|
rubyforge_project:
|
98
|
-
rubygems_version: 2.
|
98
|
+
rubygems_version: 2.4.8
|
99
99
|
signing_key:
|
100
100
|
specification_version: 4
|
101
101
|
summary: This codec decodes messages received in the Elasticsearch bulk format
|