Open tmd313 opened 7 years ago
From the docs, it works with output "@type file" but not with kafka's buffered (fluent-plugin-kafka @type kafka_buffered) output. I would be great if it could. I'm going to look at writing a plugin that would use the schema registry to make it simpler to use a buffered output plugin to send to kafka, given that then it would make it simpler to tag the chunk with the schema id.
Current v1.0.0 version inherits Fluent::Plugin::Formatter
class.
It should be disappeared this error.
Could you upgrade fluent-plugin-avro to v1.0.0?
Current version in use is 0.0.2 of fluent-plugin-avro, and td-agent is version 0.14.16. Here's the block from the config (but somehow this editor is not showing the \<format> and \ (ah, finally got them to show using some escapes) around what should be 2 lines below where it says "@type avro" which should be on one line followed by 'schema_json {"type":"record","name":"ipdr","namespace":"arris","fields":[{"name":"message","type":"string"}]}', so I converted it to a code block:
`<match ipdr.system.**> @type kafka_buffered
brokers 10.185.45.121:9092
flush_interval 3s
default_topic test
get_kafka_client_log
\<format> @type avro schema_json {"type":"record","name":"ipdr","namespace":"arris","fields":[{"name":"message","type":"string"}]} \
output_data_type avro compression_codec gzip
max_send_retries 1 required_acks -1
\`
Here's the full log of the error:
2017-10-25 15:01:57 +0000 [info]: gem 'fluent-plugin-avro' version '0.0.2' 2017-10-25 15:01:57 +0000 [info]: gem 'fluent-plugin-elasticsearch' version '1.10.1' 2017-10-25 15:01:57 +0000 [info]: gem 'fluent-plugin-elasticsearch' version '1.9.5' 2017-10-25 15:01:57 +0000 [info]: gem 'fluent-plugin-formatter_sprintf' version '0.1.0' 2017-10-25 15:01:57 +0000 [info]: gem 'fluent-plugin-grep' version '0.3.4' 2017-10-25 15:01:57 +0000 [info]: gem 'fluent-plugin-kafka' version '0.6.1' 2017-10-25 15:01:57 +0000 [info]: gem 'fluent-plugin-kafka' version '0.5.5' 2017-10-25 15:01:57 +0000 [info]: gem 'fluent-plugin-rewrite-tag-filter' version '1.5.5' 2017-10-25 15:01:57 +0000 [info]: gem 'fluent-plugin-s3' version '1.0.0.rc3' 2017-10-25 15:01:57 +0000 [info]: gem 'fluent-plugin-td' version '1.0.0.rc1' 2017-10-25 15:01:57 +0000 [info]: gem 'fluent-plugin-td-monitoring' version '0.2.2' 2017-10-25 15:01:57 +0000 [info]: gem 'fluent-plugin-webhdfs' version '1.1.1' 2017-10-25 15:01:57 +0000 [info]: gem 'fluentd' version '0.14.16' 2017-10-25 15:01:57 +0000 [info]: gem 'fluentd' version '0.12.40' 2017-10-25 15:01:57 +0000 [info]: adding match pattern="system." type="grep" 2017-10-25 15:01:57 +0000 [info]: adding match pattern="ipdr.system." type="kafka_buffered" 2017-10-25 15:01:57 +0000 [info]: #0 brokers has been set directly: ["10.185.45.121:9092"] 2017-10-25 15:01:57 +0000 [error]: #0 unexpected error error_class=NameError error="uninitialized constant Fluent::TextFormatter::Formatter" 2017-10-25 15:01:57 +0000 [error]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluent-plugin-avro-0.0.2/lib/fluent/plugin/formatter_avro.rb:5:in'
2017-10-25 15:01:57 +0000 [error]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluent-plugin-avro-0.0.2/lib/fluent/plugin/formatter_avro.rb:3:in '
2017-10-25 15:01:57 +0000 [info]: Worker 0 finished with status 1
<module:TextFormatter>' 2017-10-25 15:01:57 +0000 [error]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluent-plugin-avro-0.0.2/lib/fluent/plugin/formatter_avro.rb:4:in
<top (required)>' 2017-10-25 15:01:57 +0000 [error]: #0 /opt/td-agent/embedded/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in
require' 2017-10-25 15:01:57 +0000 [error]: #0 /opt/td-agent/embedded/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:inrequire' 2017-10-25 15:01:57 +0000 [error]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-0.14.16/lib/fluent/registry.rb:102:in
block in search' 2017-10-25 15:01:57 +0000 [error]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-0.14.16/lib/fluent/registry.rb:99:ineach' 2017-10-25 15:01:57 +0000 [error]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-0.14.16/lib/fluent/registry.rb:99:in
search' 2017-10-25 15:01:57 +0000 [error]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-0.14.16/lib/fluent/registry.rb:44:inlookup' 2017-10-25 15:01:57 +0000 [error]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-0.14.16/lib/fluent/plugin.rb:146:in
new_impl' 2017-10-25 15:01:57 +0000 [error]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-0.14.16/lib/fluent/plugin.rb:128:innew_formatter' 2017-10-25 15:01:57 +0000 [error]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluent-plugin-kafka-0.6.1/lib/fluent/plugin/out_kafka_buffered.rb:239:in
setup_formatter' 2017-10-25 15:01:57 +0000 [error]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluent-plugin-kafka-0.6.1/lib/fluent/plugin/out_kafka_buffered.rb:153:inconfigure' 2017-10-25 15:01:57 +0000 [error]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-0.14.16/lib/fluent/plugin.rb:164:in
configure' 2017-10-25 15:01:57 +0000 [error]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-0.14.16/lib/fluent/agent.rb:130:inadd_match' 2017-10-25 15:01:57 +0000 [error]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-0.14.16/lib/fluent/agent.rb:72:in
block in configure' 2017-10-25 15:01:57 +0000 [error]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-0.14.16/lib/fluent/agent.rb:64:ineach' 2017-10-25 15:01:57 +0000 [error]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-0.14.16/lib/fluent/agent.rb:64:in
configure' 2017-10-25 15:01:57 +0000 [error]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-0.14.16/lib/fluent/root_agent.rb:109:inconfigure' 2017-10-25 15:01:57 +0000 [error]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-0.14.16/lib/fluent/engine.rb:127:in
configure' 2017-10-25 15:01:57 +0000 [error]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-0.14.16/lib/fluent/engine.rb:92:inrun_configure' 2017-10-25 15:01:57 +0000 [error]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-0.14.16/lib/fluent/supervisor.rb:733:in
run_configure' 2017-10-25 15:01:57 +0000 [error]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-0.14.16/lib/fluent/supervisor.rb:502:inblock in run_worker' 2017-10-25 15:01:57 +0000 [error]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-0.14.16/lib/fluent/supervisor.rb:661:in
main_process' 2017-10-25 15:01:57 +0000 [error]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-0.14.16/lib/fluent/supervisor.rb:498:inrun_worker' 2017-10-25 15:01:57 +0000 [error]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-0.14.16/lib/fluent/command/fluentd.rb:316:in
<top (required)>' 2017-10-25 15:01:57 +0000 [error]: #0 /opt/td-agent/embedded/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:inrequire' 2017-10-25 15:01:57 +0000 [error]: #0 /opt/td-agent/embedded/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in
require' 2017-10-25 15:01:57 +0000 [error]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-0.14.16/bin/fluentd:5:in<top (required)>' 2017-10-25 15:01:57 +0000 [error]: #0 /opt/td-agent/embedded/bin/fluentd:22:in
load' 2017-10-25 15:01:57 +0000 [error]: #0 /opt/td-agent/embedded/bin/fluentd:22:in<top (required)>' 2017-10-25 15:01:57 +0000 [error]: #0 /usr/sbin/td-agent:7:in
load' 2017-10-25 15:01:57 +0000 [error]: #0 /usr/sbin/td-agent:7:in `