zjd-melo commented on issue #5263:
URL:
https://github.com/apache/incubator-doris/issues/5263#issuecomment-763386672
@francisoliverlee
```input {
jdbc {
jdbc_connection_string => "jdbc:mysql://192.168.10.47:3306/micros_policy"
jdbc_user => "root"
jdbc_password => "sqlpwd"
jdbc_default_timezone => "Asia/Shanghai"
jdbc_driver_class => "com.mysql.jdbc.Driver"
jdbc_fetch_size => 5000
schedule => "* * * * * Asia/Shanghai"
record_last_run => true
tracking_column => "last_modified"
tracking_column_type => "timestamp"
last_run_metadata_path => "./last_updated.db"
use_column_value => true
clean_run => false
statement => "select id, model_name,'\n' as newline from
policy_newmodelingconfig where last_modified > :sql_last_value"
}
}
filter {
mutate {
remove_field => ["@version", "@timestamp"]
}
}
output {
stdout {
codec => plain {
format => "%{[id]},%{[model_name]}%{[newline]}"
}
}
doris {
codec => plain {
format => "%{[id]},%{[model_name]}%{[newline]}"
}
timezone => "Asia/Shanghai"
http_hosts => ["http://localhost:8030"]
user => "root"
password => ""
db => "test"
table => "test"
label_prefix => "doris"
column_separator => ","
}
}
```
With this conf i got this.
```
3,m0000001
[2021-01-20T14:59:01,145][WARN ][logstash.outputs.doris ][main] Failed to
flush outgoing items {:outgoing_count=>1, :exception=>"TypeError",
:backtrace=>["org/jruby/RubyString.java:2684:in `<<'",
"/logstash-7.4.2/vendor/local_gems/b61803dd/logstash-output-doris-0.1.0/lib/logstash/outputs/doris.rb:179:in
`block in flush'",
"org/jruby/RubyArray.java:1800:in `each'",
"/logstash-7.4.2/vendor/local_gems/b61803dd/logstash-output-doris-0.1.0/lib/logstash/outputs/doris.rb:178:in
`flush'",
"/logstash-7.4.2/vendor/bundle/jruby/2.5.0/gems/stud-0.0.23/lib/stud/buffer.rb:219:in
`block in buffer_flush'", "org/jruby/RubyHash.java:1417:in `each'",
"/logstash-7.4.2/vendor/bundle/jruby/2.5.0/gems/stud-0.0.23/lib/stud/buffer.rb:216:in
`buffer_flush'",
"/logstash-7.4.2/vendor/bundle/jruby/2.5.0/gems/stud-0.0.23/lib/stud/buffer.rb:159:in
`buffer_receive'",
"/logstash-7.4.2/vendor/local_gems/b61803dd/logstash-output-doris-0.1.0/lib/logstash/outputs/doris.rb:171:in
`receive'",
"/logstash-7.4.2/logstash-core/lib/logstash/outputs/base.rb:89:in `block
in multi_receive'", "org/jruby/RubyArray.java:1800:in `each'",
"/logstash-7.4.2/logstash-core/lib/logstash/outputs/base.rb:89:in
`multi_receive'",
"org/logstash/config/ir/compiler/OutputStrategyExt.java:118:in `multi_receive'",
"org/logstash/config/ir/compiler/AbstractOutputDelegatorExt.java:101:in
`multi_receive'",
"/logstash-7.4.2/logstash-core/lib/logstash/java_pipeline.rb:243:in `block
in start_workers'"]}
```
I don't know why this happen, should i format the event messsgae as csv?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]