Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] elastic java.sql.Timestamp 写入失败 #272

Closed
baisui1981 opened this issue Oct 5, 2023 · 1 comment
Closed

[bug] elastic java.sql.Timestamp 写入失败 #272

baisui1981 opened this issue Oct 5, 2023 · 1 comment
Labels
3.8.0 bug Something isn't working
Milestone

Comments

@baisui1981
Copy link
Member

Caused by: java.lang.IllegalArgumentException: cannot write xcontent for unknown value of type class java.sql.Timestamp
	at org.elasticsearch.common.xcontent.XContentBuilder.unknownValue(XContentBuilder.java:833)
	at org.elasticsearch.common.xcontent.XContentBuilder.map(XContentBuilder.java:895)
	at org.elasticsearch.common.xcontent.XContentBuilder.map(XContentBuilder.java:870)
	at org.elasticsearch.action.index.IndexRequest.source(IndexRequest.java:428)
	at org.elasticsearch.action.index.IndexRequest.source(IndexRequest.java:417)
	at com.qlangtech.tis.plugins.incr.flink.connector.elasticsearch7.ElasticSearchSinkFactory$DefaultElasticsearchSinkFunction.createIndexRequest(ElasticSearchSinkFactory.java:247)
	at com.qlangtech.tis.plugins.incr.flink.connector.elasticsearch7.ElasticSearchSinkFactory$DefaultElasticsearchSinkFunction.process(ElasticSearchSinkFactory.java:256)
	at com.qlangtech.tis.plugins.incr.flink.connector.elasticsearch7.ElasticSearchSinkFactory$DefaultElasticsearchSinkFunction.process(ElasticSearchSinkFactory.java:210)
	at org.apache.flink.streaming.connectors.elasticsearch.ElasticsearchSinkBase.invoke(ElasticsearchSinkBase.java:330)
	at org.apache.flink.streaming.api.operators.StreamSink.processElement(StreamSink.java:54)
	at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.pushToOperator(CopyingChainingOutput.java:71)
	at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.collect(CopyingChainingOutput.java:46)
	at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.collect(CopyingChainingOutput.java:26)
	at org.apache.flink.streaming.api.operators.CountingOutput.collect(CountingOutput.java:50)
	at org.apache.flink.streaming.api.operators.CountingOutput.collect(CountingOutput.java:28)
	at org.apache.flink.streaming.api.operators.StreamFilter.processElement(StreamFilter.java:39)
	at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.pushToOperator(CopyingChainingOutput.java:71)
	at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.collect(CopyingChainingOutput.java:46)
	at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.collect(CopyingChainingOutput.java:26)
	at org.apache.flink.streaming.api.operators.CountingOutput.collect(CountingOutput.java:50)
	at org.apache.flink.streaming.api.operators.CountingOutput.collect(CountingOutput.java:28)
	at org.apache.flink.streaming.api.operators.StreamMap.processElement(StreamMap.java:38)
@baisui1981 baisui1981 added bug Something isn't working 3.8.0 labels Oct 5, 2023
@baisui1981 baisui1981 added this to the v3.8.0 milestone Oct 5, 2023
@baisui1981
Copy link
Member Author

添加 TISXContentBuilderExtension.java
扩展类,支持:

  1. java.sql.Timestamp.class
  2. java.sql.Time.class
  3. java.sql.Date.class
  4. Boolean.class
  5. org.apache.flink.table.data.DecimalData.class

等类型在dataRow中字段处理

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.8.0 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant