logstash-input-udp 3.3.2 → 3.3.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2c1a51adcca72f210af80205adc7013e645125c20d9cdcf3594722dc6a1edd30
4
- data.tar.gz: ef56390c1eb089a147aec7ed835f0ed2ffd0e1f5d1dd081eebb7b9cedc7c0af6
3
+ metadata.gz: 5e1175824b16831674875cc4ede62188e3e6d38bff5aed42b169453be00c3cdf
4
+ data.tar.gz: fc54de7e53214b4f68db927f8e6bf5e81e6cb530a7fa104cb439ceb8920b03bf
5
5
  SHA512:
6
- metadata.gz: ec255113cc79a3f82da8ca84a35f15d49a05e55fc1cb49f4fe42be2ea226a1997ce862ccaa849fd5b5acc5ff065b3134903be05c96434ad7ad678f85189bc729
7
- data.tar.gz: 90143728291117d521b2479b1665e09ddbeb1920135ed66a99dbd7f92898da7585d0fc250d8f3d7e2a6c28ce715e0f1f250621ca86ba99ae3ad53e46d1297279
6
+ metadata.gz: bee71becfe577ce656daecce595d2b97dafc208a3b93d3dda7718f8f647adbb806e08caadd4ea81e0819158d1914c7efbe3f4745296c80c2dd6d71861faf4b21
7
+ data.tar.gz: e6cd007d1d904bff2a511101112d40b27f896294f820fc0bdba5213895f5ee5f7219d20cc2dbcaae07c9374ba6ae617237dcddabae3e4ad9833353d4990d5a38
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 3.3.3
2
+ - Work around jruby/jruby#5148 by cloning messages on jruby 9k, therefore resizing the underlying byte buffer
3
+
1
4
  ## 3.3.2
2
5
  - Fix missing require for the ipaddr library.
3
6
 
@@ -118,7 +118,7 @@ class LogStash::Inputs::Udp < LogStash::Inputs::Base
118
118
  begin
119
119
  payload, client = @udp.recvfrom_nonblock(@buffer_size)
120
120
  break if payload.empty?
121
- @input_to_worker.push([payload, client])
121
+ push_data(payload, client)
122
122
  rescue IO::EAGAINWaitReadable
123
123
  break
124
124
  end
@@ -148,6 +148,21 @@ class LogStash::Inputs::Udp < LogStash::Inputs::Base
148
148
  end
149
149
  end
150
150
 
151
+ # work around jruby/jruby#5148
152
+ # For jruby 9k (ruby >= 2.x) we need to truncate the buffer
153
+ # after reading from the socket otherwise each
154
+ # message will use 64kb
155
+ if RUBY_VERSION.match(/^2/)
156
+ def push_data(payload, client)
157
+ payload = payload.b.force_encoding(Encoding::UTF_8)
158
+ @input_to_worker.push([payload, client])
159
+ end
160
+ else
161
+ def push_data(payload, client)
162
+ @input_to_worker.push([payload, client])
163
+ end
164
+ end
165
+
151
166
  def push_decoded_event(host, event)
152
167
  decorate(event)
153
168
  event.set(HOST_FIELD, host) if event.get(HOST_FIELD).nil?
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-input-udp'
4
- s.version = '3.3.2'
4
+ s.version = '3.3.3'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "Reads events over UDP"
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-input-udp
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.2
4
+ version: 3.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-18 00:00:00.000000000 Z
11
+ date: 2018-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement