logstash-codec-avro_schema_registry 1.1.1 → 1.2.0

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
- SHA1:
3
- metadata.gz: df24e437ee21154def83e8ad66bcbc70e58e3ecc
4
- data.tar.gz: c7e44473770cecf6165bb38788872c45f33aa4e6
2
+ SHA256:
3
+ metadata.gz: 5eecb9be76181189914cb09f9678a8278f5a650ed19a3ad3810f47e53ab24a59
4
+ data.tar.gz: 336bcfe3157c172f75a2a4a3df6c13cd3a52d6fde9d1fbd535c44378610d23b6
5
5
  SHA512:
6
- metadata.gz: 56267b65a7295a4766ff67658ca2aa799609c5cfc7675bd64ec9d98ddb8848ac1eb7da8604bff67aa93cea1cc36fb435429c2addcbc77d9f3bf38e9ded7153e6
7
- data.tar.gz: 210dfaf4d6eb1315d91727fb45fe1599d8f9537f0d018e0d2538a9bbae3938dab6e29da8a234dee04cbcdf0a95d137e4552ad8f4d037fbcc8cd4973d7ba0aab6
6
+ metadata.gz: 0600db36efc91fb87d01eacb1cc53b5d860b3c83f401fcc61c5eaeb963d9abfd64f8d5c5fcd658fa40303969d6d8cedddd4e64d9d4e732213dbe6143baed68a0
7
+ data.tar.gz: 9791576254e5fc778630363b3dc1f761db2bececf86c8cb99c46d08d56c7935b1b64cd5478b71cdfbf57a2f4727f41e5269b7e71d3880aab29ce4241f1e1bf62
@@ -1,3 +1,6 @@
1
+ ## 1.2.0
2
+ - Add base64_encoded for encode and change defaults
3
+
1
4
  ## 1.1.1
2
5
  - Add tag_on_failure for decode
3
6
 
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Logstash Codec - Avro Schema Registry
2
2
 
3
- ### v1.1.1
3
+ ### v1.2.0
4
4
 
5
5
  This plugin is used to serialize Logstash events as
6
6
  Avro datums, as well as deserializing Avro datums into
@@ -45,6 +45,7 @@ When this codec is used to encode, you may pass the following options:
45
45
  - ``register_schema`` - will register the JSON schema if it does not exist.
46
46
  - ``binary_encoded`` - will output the encoded event as a ByteArray.
47
47
  Requires the ``ByteArraySerializer`` to be set in the Kafka output config.
48
+ - ``base64_encoded`` - will output the encoded event as a base64 string.
48
49
  - ``client_certificate`` - Client TLS certificate for mutual TLS
49
50
  - ``client_key`` - Client TLS key for mutual TLS
50
51
  - ``ca_certificate`` - CA Certificate
@@ -51,6 +51,7 @@ MAGIC_BYTE = 0
51
51
  # - ``check_compatibility`` - will check schema compatibility before encoding.
52
52
  # - ``register_schema`` - will register the JSON schema if it does not exist.
53
53
  # - ``binary_encoded`` - will output the encoded event as a ByteArray.
54
+ # - ``base64_encoded`` - will output in base64 encoding, deafault is true
54
55
  # Requires the ``ByteArraySerializer`` to be set in the Kafka output config.
55
56
  # - ``client_certificate`` - Client TLS certificate for mutual TLS
56
57
  # - ``client_key`` - Client TLS key for mutual TLS
@@ -126,7 +127,8 @@ class LogStash::Codecs::AvroSchemaRegistry < LogStash::Codecs::Base
126
127
  config :schema_string, :validate => :string, :default => nil
127
128
  config :check_compatibility, :validate => :boolean, :default => false
128
129
  config :register_schema, :validate => :boolean, :default => false
129
- config :binary_encoded, :validate => :boolean, :default => true
130
+ config :binary_encoded, :validate => :boolean, :default => false
131
+ config :base64_encoded, :validate => :boolean, :default => false
130
132
 
131
133
  # tag events with `_avroparsefailure` when decode fails
132
134
  config :tag_on_failure, :validate => :boolean, :default => false
@@ -252,8 +254,10 @@ class LogStash::Codecs::AvroSchemaRegistry < LogStash::Codecs::Base
252
254
  dw.write(clean_event(event), encoder)
253
255
  if @binary_encoded
254
256
  @on_event.call(event, buffer.string.to_java_bytes)
255
- else
257
+ elsif @base64_encoded
256
258
  @on_event.call(event, Base64.strict_encode64(buffer.string))
259
+ else
260
+ @on_event.call(event, buffer.string)
257
261
  end
258
262
  end
259
263
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-codec-avro_schema_registry'
3
- s.version = '1.1.1'
3
+ s.version = '1.2.0'
4
4
  s.licenses = ['Apache License (2.0)']
5
5
  s.summary = "Encode and decode avro formatted data from a Confluent schema registry"
6
6
  s.description = "Encode and decode avro formatted data from a Confluent schema registry"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-codec-avro_schema_registry
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - RevPoint Media
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-03 00:00:00.000000000 Z
11
+ date: 2020-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -123,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
123
  version: '0'
124
124
  requirements: []
125
125
  rubyforge_project:
126
- rubygems_version: 2.6.14.1
126
+ rubygems_version: 2.7.10
127
127
  signing_key:
128
128
  specification_version: 4
129
129
  summary: Encode and decode avro formatted data from a Confluent schema registry