fluent-plugin-parser-avro 0.3.1 → 0.3.2
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 +4 -4
- data/.github/dependabot.yml +23 -0
- data/.github/workflows/linux.yml +17 -6
- data/.github/workflows/windows.yml +17 -6
- data/README.md +2 -2
- data/fluent-plugin-parser-avro.gemspec +4 -3
- data/lib/fluent/plugin/confluent_avro_schema_registry.rb +2 -2
- data/lib/fluent/plugin/parser_avro.rb +1 -1
- data/test/plugin/test_parser_avro.rb +4 -3
- metadata +23 -11
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b4bb8ae8913f70491a6803cff82e7d156d23f9f60b123e85c8693d0aa5e207e7
|
|
4
|
+
data.tar.gz: 2b4cd5f1504e02d614c26d2a6e2907c7542e1ae7012d11d60e9da764ef714476
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 72fb87d72910117128f0d486d3d730ee86aa3eeaafb767a2884072c0e9579b8b6a025e9cafdfd0be532181843a59fe144e7b0a2bf6188fa5c5d2d97f44d8da78
|
|
7
|
+
data.tar.gz: f045156bb8b96184ac2e22f01255dccffa07058020e22ab6ba96286f91ad607285e7db7c5657e35545ab2dbc1f3fa9a97dd448578d8bf062e4b39023376ef672
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
- package-ecosystem: 'github-actions'
|
|
4
|
+
directory: '/'
|
|
5
|
+
schedule:
|
|
6
|
+
interval: 'monthly'
|
|
7
|
+
groups:
|
|
8
|
+
# PR: "Security update [package] from [old] to [new]"
|
|
9
|
+
# This PR should be merged in hurry
|
|
10
|
+
security-updates:
|
|
11
|
+
applies-to: security-updates
|
|
12
|
+
patterns:
|
|
13
|
+
- '*'
|
|
14
|
+
|
|
15
|
+
# PR: "Bump [package] from [old] to [new]"
|
|
16
|
+
# No need to be merged this PR in hurry. It is enough to merge
|
|
17
|
+
# once in a month.
|
|
18
|
+
monthly-updates:
|
|
19
|
+
applies-to: version-updates
|
|
20
|
+
patterns:
|
|
21
|
+
- '*'
|
|
22
|
+
# Allow to create PR both of security and normal updates.
|
|
23
|
+
open-pull-requests-limit: 1
|
data/.github/workflows/linux.yml
CHANGED
|
@@ -1,26 +1,37 @@
|
|
|
1
1
|
name: Testing on Ubuntu
|
|
2
2
|
on:
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
push:
|
|
4
|
+
branches: [master]
|
|
5
|
+
pull_request:
|
|
6
|
+
branches: [master]
|
|
7
|
+
schedule:
|
|
8
|
+
- cron: '0 0 1 * *'
|
|
5
9
|
jobs:
|
|
10
|
+
ruby-versions:
|
|
11
|
+
uses: ruby/actions/.github/workflows/ruby_versions.yml@master
|
|
12
|
+
with:
|
|
13
|
+
engine: cruby
|
|
14
|
+
min_version: 3.2
|
|
6
15
|
build:
|
|
16
|
+
needs: ruby-versions
|
|
7
17
|
runs-on: ${{ matrix.os }}
|
|
8
18
|
strategy:
|
|
9
19
|
fail-fast: false
|
|
10
20
|
matrix:
|
|
11
|
-
ruby:
|
|
21
|
+
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
|
|
22
|
+
exclude:
|
|
23
|
+
- ruby: head
|
|
12
24
|
os:
|
|
13
25
|
- ubuntu-latest
|
|
14
26
|
name: Ruby ${{ matrix.ruby }} unit testing on ${{ matrix.os }}
|
|
15
27
|
steps:
|
|
16
|
-
- uses: actions/checkout@
|
|
17
|
-
- uses: ruby/setup-ruby@v1
|
|
28
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
29
|
+
- uses: ruby/setup-ruby@145243922b4465b78e04dd66294782c7de45901f # v1.345.0
|
|
18
30
|
with:
|
|
19
31
|
ruby-version: ${{ matrix.ruby }}
|
|
20
32
|
- name: unit testing
|
|
21
33
|
env:
|
|
22
34
|
CI: true
|
|
23
35
|
run: |
|
|
24
|
-
gem install bundler rake
|
|
25
36
|
bundle install --jobs 4 --retry 3
|
|
26
37
|
bundle exec rake test
|
|
@@ -1,26 +1,37 @@
|
|
|
1
1
|
name: Testing on Windows
|
|
2
2
|
on:
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
push:
|
|
4
|
+
branches: [master]
|
|
5
|
+
pull_request:
|
|
6
|
+
branches: [master]
|
|
7
|
+
schedule:
|
|
8
|
+
- cron: '0 0 1 * *'
|
|
5
9
|
jobs:
|
|
10
|
+
ruby-versions:
|
|
11
|
+
uses: ruby/actions/.github/workflows/ruby_versions.yml@master
|
|
12
|
+
with:
|
|
13
|
+
engine: cruby
|
|
14
|
+
min_version: 3.2
|
|
6
15
|
build:
|
|
16
|
+
needs: ruby-versions
|
|
7
17
|
runs-on: ${{ matrix.os }}
|
|
8
18
|
strategy:
|
|
9
19
|
fail-fast: false
|
|
10
20
|
matrix:
|
|
11
|
-
ruby:
|
|
21
|
+
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
|
|
22
|
+
exclude:
|
|
23
|
+
- ruby: head
|
|
12
24
|
os:
|
|
13
25
|
- windows-latest
|
|
14
26
|
name: Ruby ${{ matrix.ruby }} unit testing on ${{ matrix.os }}
|
|
15
27
|
steps:
|
|
16
|
-
- uses: actions/checkout@
|
|
17
|
-
- uses: ruby/setup-ruby@v1
|
|
28
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
29
|
+
- uses: ruby/setup-ruby@145243922b4465b78e04dd66294782c7de45901f # v1.345.0
|
|
18
30
|
with:
|
|
19
31
|
ruby-version: ${{ matrix.ruby }}
|
|
20
32
|
- name: unit testing
|
|
21
33
|
env:
|
|
22
34
|
CI: true
|
|
23
35
|
run: |
|
|
24
|
-
gem install bundler rake
|
|
25
36
|
bundle install --jobs 4 --retry 3
|
|
26
37
|
bundle exec rake test
|
data/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# fluent-plugin-parser-avro
|
|
2
2
|
|
|
3
|
-

|
|
4
|
+

|
|
5
5
|
|
|
6
6
|
[Fluentd](https://fluentd.org/) parser plugin to parse avro formatted data.
|
|
7
7
|
|
|
@@ -3,13 +3,13 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
|
3
3
|
|
|
4
4
|
Gem::Specification.new do |spec|
|
|
5
5
|
spec.name = "fluent-plugin-parser-avro"
|
|
6
|
-
spec.version = "0.3.
|
|
6
|
+
spec.version = "0.3.2"
|
|
7
7
|
spec.authors = ["Hiroshi Hatake", "Kentaro Hayashi"]
|
|
8
8
|
spec.email = ["cosmo0920.wp@gmail.com", "kenhys@gmail.com"]
|
|
9
9
|
|
|
10
10
|
spec.summary = %q{Avro parser plugin for Fluentd}
|
|
11
11
|
spec.description = spec.summary
|
|
12
|
-
spec.homepage = "https://github.com/fluent-plugins-
|
|
12
|
+
spec.homepage = "https://github.com/fluent-plugins-nursery/fluent-plugin-parser-avro"
|
|
13
13
|
spec.license = "Apache-2.0"
|
|
14
14
|
|
|
15
15
|
test_files, files = `git ls-files -z`.split("\x0").partition do |f|
|
|
@@ -21,9 +21,10 @@ Gem::Specification.new do |spec|
|
|
|
21
21
|
spec.require_paths = ["lib"]
|
|
22
22
|
|
|
23
23
|
spec.add_dependency "avro"
|
|
24
|
-
spec.add_development_dependency "bundler"
|
|
24
|
+
spec.add_development_dependency "bundler"
|
|
25
25
|
spec.add_development_dependency "rake", "~> 13.0"
|
|
26
26
|
spec.add_development_dependency "test-unit", "~> 3.3"
|
|
27
27
|
spec.add_development_dependency "webrick"
|
|
28
|
+
spec.add_development_dependency "bigdecimal"
|
|
28
29
|
spec.add_runtime_dependency "fluentd", [">= 0.14.10", "< 2"]
|
|
29
30
|
end
|
|
@@ -34,7 +34,7 @@ module Fluent
|
|
|
34
34
|
if schema_key.nil?
|
|
35
35
|
response.body
|
|
36
36
|
else
|
|
37
|
-
|
|
37
|
+
JSON.parse(response.body, allow_duplicate_key: true)[schema_key]
|
|
38
38
|
end
|
|
39
39
|
end
|
|
40
40
|
|
|
@@ -45,7 +45,7 @@ module Fluent
|
|
|
45
45
|
if schema_key.nil?
|
|
46
46
|
response.body
|
|
47
47
|
else
|
|
48
|
-
|
|
48
|
+
JSON.parse(response.body, allow_duplicate_key: true)[schema_key]
|
|
49
49
|
end
|
|
50
50
|
end
|
|
51
51
|
|
|
@@ -424,7 +424,7 @@ class AvroParserTest < Test::Unit::TestCase
|
|
|
424
424
|
])
|
|
425
425
|
d = create_driver(conf)
|
|
426
426
|
datum = {"firstName" => "Aleen","lastName" => "Terry","birthDate" => 159202477258}
|
|
427
|
-
schema =
|
|
427
|
+
schema = JSON.parse(File.read(File.join(__dir__, "..", "data", "schema-persions-value-1.avsc")))
|
|
428
428
|
encoded = encode_datum(datum, schema.fetch("schema"), true, 1)
|
|
429
429
|
d.instance.parse(encoded) do |_time, record|
|
|
430
430
|
assert_equal datum, record
|
|
@@ -442,7 +442,7 @@ class AvroParserTest < Test::Unit::TestCase
|
|
|
442
442
|
])
|
|
443
443
|
d = create_driver(conf)
|
|
444
444
|
datum = {"firstName" => "Aleen","lastName" => "Terry","birthDate" => 159202477258}
|
|
445
|
-
schema =
|
|
445
|
+
schema = JSON.parse(File.read(File.join(__dir__, "..", "data", "schema-persions-value-1.avsc")))
|
|
446
446
|
encoded = encode_datum(datum, schema.fetch("schema"), true, 1)
|
|
447
447
|
d.instance.parse(encoded) do |_time, record|
|
|
448
448
|
assert_equal datum, record
|
|
@@ -474,6 +474,7 @@ class AvroParserTest < Test::Unit::TestCase
|
|
|
474
474
|
server.shutdown
|
|
475
475
|
end
|
|
476
476
|
end
|
|
477
|
+
sleep 0.5 # Wait for the server to start
|
|
477
478
|
end
|
|
478
479
|
|
|
479
480
|
def test_authentication_failure
|
|
@@ -505,7 +506,7 @@ class AvroParserTest < Test::Unit::TestCase
|
|
|
505
506
|
}, [])
|
|
506
507
|
])
|
|
507
508
|
datum = {"firstName" => "Aleen","lastName" => "Terry","birthDate" => 159202477258}
|
|
508
|
-
schema =
|
|
509
|
+
schema = JSON.parse(File.read(File.join(__dir__, "..", "data", "schema-persions-value-1.avsc")))
|
|
509
510
|
encoded = encode_datum(datum, schema.fetch("schema"), true, 1)
|
|
510
511
|
d = create_driver(conf)
|
|
511
512
|
d.instance.parse(encoded) do |_time, record|
|
metadata
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fluent-plugin-parser-avro
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Hiroshi Hatake
|
|
8
8
|
- Kentaro Hayashi
|
|
9
|
-
autorequire:
|
|
10
9
|
bindir: bin
|
|
11
10
|
cert_chain: []
|
|
12
|
-
date:
|
|
11
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
13
12
|
dependencies:
|
|
14
13
|
- !ruby/object:Gem::Dependency
|
|
15
14
|
name: avro
|
|
@@ -29,16 +28,16 @@ dependencies:
|
|
|
29
28
|
name: bundler
|
|
30
29
|
requirement: !ruby/object:Gem::Requirement
|
|
31
30
|
requirements:
|
|
32
|
-
- - "
|
|
31
|
+
- - ">="
|
|
33
32
|
- !ruby/object:Gem::Version
|
|
34
|
-
version: '
|
|
33
|
+
version: '0'
|
|
35
34
|
type: :development
|
|
36
35
|
prerelease: false
|
|
37
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
38
37
|
requirements:
|
|
39
|
-
- - "
|
|
38
|
+
- - ">="
|
|
40
39
|
- !ruby/object:Gem::Version
|
|
41
|
-
version: '
|
|
40
|
+
version: '0'
|
|
42
41
|
- !ruby/object:Gem::Dependency
|
|
43
42
|
name: rake
|
|
44
43
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -81,6 +80,20 @@ dependencies:
|
|
|
81
80
|
- - ">="
|
|
82
81
|
- !ruby/object:Gem::Version
|
|
83
82
|
version: '0'
|
|
83
|
+
- !ruby/object:Gem::Dependency
|
|
84
|
+
name: bigdecimal
|
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
|
86
|
+
requirements:
|
|
87
|
+
- - ">="
|
|
88
|
+
- !ruby/object:Gem::Version
|
|
89
|
+
version: '0'
|
|
90
|
+
type: :development
|
|
91
|
+
prerelease: false
|
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
93
|
+
requirements:
|
|
94
|
+
- - ">="
|
|
95
|
+
- !ruby/object:Gem::Version
|
|
96
|
+
version: '0'
|
|
84
97
|
- !ruby/object:Gem::Dependency
|
|
85
98
|
name: fluentd
|
|
86
99
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -109,6 +122,7 @@ executables: []
|
|
|
109
122
|
extensions: []
|
|
110
123
|
extra_rdoc_files: []
|
|
111
124
|
files:
|
|
125
|
+
- ".github/dependabot.yml"
|
|
112
126
|
- ".github/workflows/linux.yml"
|
|
113
127
|
- ".github/workflows/windows.yml"
|
|
114
128
|
- ".gitignore"
|
|
@@ -132,11 +146,10 @@ files:
|
|
|
132
146
|
- test/data/writer_user.avsc
|
|
133
147
|
- test/helper.rb
|
|
134
148
|
- test/plugin/test_parser_avro.rb
|
|
135
|
-
homepage: https://github.com/fluent-plugins-
|
|
149
|
+
homepage: https://github.com/fluent-plugins-nursery/fluent-plugin-parser-avro
|
|
136
150
|
licenses:
|
|
137
151
|
- Apache-2.0
|
|
138
152
|
metadata: {}
|
|
139
|
-
post_install_message:
|
|
140
153
|
rdoc_options: []
|
|
141
154
|
require_paths:
|
|
142
155
|
- lib
|
|
@@ -151,8 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
151
164
|
- !ruby/object:Gem::Version
|
|
152
165
|
version: '0'
|
|
153
166
|
requirements: []
|
|
154
|
-
rubygems_version:
|
|
155
|
-
signing_key:
|
|
167
|
+
rubygems_version: 4.0.20
|
|
156
168
|
specification_version: 4
|
|
157
169
|
summary: Avro parser plugin for Fluentd
|
|
158
170
|
test_files:
|