大家有碰到过这个异常吗can not write type [class java.math.BigDecimal]
Elasticsearch | 作者 brucezhy | 发布于2018年12月18日 | 阅读数:4371
我先转化成json写入到kafka 然后从kafka消费 在转成对象 更新ES 5.4.3版本的ES
[logger.info] 2018-12-17 21:48:37,572 - - org.elasticsearch.action.bulk.BulkRequestHandler$SyncBulkRequestHandler.execute -16611 [elasticsearch[_client_][bulk_processor][T#1]] WARN [] - Failed to execute bulk request 1.
org.elasticsearch.common.util.concurrent.UncategorizedExecutionException: Failed execution
at org.elasticsearch.action.support.AdapterActionFuture.rethrowExecutionException(AdapterActionFuture.java:89) ~[elasticsearch-5.4.1.jar:5.4.1]
at org.elasticsearch.action.support.AdapterActionFuture.actionGet(AdapterActionFuture.java:47) ~[elasticsearch-5.4.1.jar:5.4.1]
at org.elasticsearch.action.bulk.Retry.withSyncBackoff(Retry.java:88) ~[elasticsearch-5.4.1.jar:5.4.1]
at org.elasticsearch.action.bulk.BulkRequestHandler$SyncBulkRequestHandler.execute(BulkRequestHandler.java:76) [elasticsearch-5.4.1.jar:5.4.1]
at org.elasticsearch.action.bulk.BulkProcessor.execute(BulkProcessor.java:346) [elasticsearch-5.4.1.jar:5.4.1]
at org.elasticsearch.action.bulk.BulkProcessor.access$200(BulkProcessor.java:50) [elasticsearch-5.4.1.jar:5.4.1]
at org.elasticsearch.action.bulk.BulkProcessor$Flush.run(BulkProcessor.java:380) [elasticsearch-5.4.1.jar:5.4.1]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_121]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_121]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_121]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_121]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121]
Caused by: java.io.IOException: can not write type [class java.math.BigDecimal]
at org.elasticsearch.common.io.stream.StreamOutput.writeGenericValue(StreamOutput.java:655) ~[elasticsearch-5.4.1.jar:5.4.1]
at org.elasticsearch.common.io.stream.StreamOutput.lambda$static$11(StreamOutput.java:570) ~[elasticsearch-5.4.1.jar:5.4.1]
at org.elasticsearch.common.io.stream.StreamOutput.writeGenericValue(StreamOutput.java:653) ~[elasticsearch-5.4.1.jar:5.4.1]
at org.elasticsearch.common.io.stream.StreamOutput.lambda$static$9(StreamOutput.java:548) ~[elasticsearch-5.4.1.jar:5.4.1]
at org.elasticsearch.common.io.stream.StreamOutput.writeGenericValue(StreamOutput.java:653) ~[elasticsearch-5.4.1.jar:5.4.1]
at org.elasticsearch.common.io.stream.StreamOutput.lambda$static$11(StreamOutput.java:570) ~[elasticsearch-5.4.1.jar:5.4.1]
at org.elasticsearch.common.io.stream.StreamOutput.writeGenericValue(StreamOutput.java:653) ~[elasticsearch-5.4.1.jar:5.4.1]
at org.elasticsearch.common.io.stream.StreamOutput.writeMap(StreamOutput.java:443) ~[elasticsearch-5.4.1.jar:5.4.1]
at org.elasticsearch.script.Script.writeTo(Script.java:566) ~[elasticsearch-5.4.1.jar:5.4.1]
at org.elasticsearch.action.update.UpdateRequest.writeTo(UpdateRequest.java:886) ~[elasticsearch-5.4.1.jar:5.4.1]
at org.elasticsearch.action.DocWriteRequest.writeDocumentRequest(DocWriteRequest.java:198) ~[elasticsearch-5.4.1.jar:5.4.1]
at org.elasticsearch.action.bulk.BulkRequest.writeTo(BulkRequest.java:632) ~[elasticsearch-5.4.1.jar:5.4.1]
at org.elasticsearch.transport.TcpTransport.buildMessage(TcpTransport.java:1219) ~[elasticsearch-5.4.1.jar:5.4.1]
at org.elasticsearch.transport.TcpTransport.sendRequestToChannel(TcpTransport.java:1071) ~[elasticsearch-5.4.1
[logger.info] 2018-12-17 21:48:37,572 - - org.elasticsearch.action.bulk.BulkRequestHandler$SyncBulkRequestHandler.execute -16611 [elasticsearch[_client_][bulk_processor][T#1]] WARN [] - Failed to execute bulk request 1.
org.elasticsearch.common.util.concurrent.UncategorizedExecutionException: Failed execution
at org.elasticsearch.action.support.AdapterActionFuture.rethrowExecutionException(AdapterActionFuture.java:89) ~[elasticsearch-5.4.1.jar:5.4.1]
at org.elasticsearch.action.support.AdapterActionFuture.actionGet(AdapterActionFuture.java:47) ~[elasticsearch-5.4.1.jar:5.4.1]
at org.elasticsearch.action.bulk.Retry.withSyncBackoff(Retry.java:88) ~[elasticsearch-5.4.1.jar:5.4.1]
at org.elasticsearch.action.bulk.BulkRequestHandler$SyncBulkRequestHandler.execute(BulkRequestHandler.java:76) [elasticsearch-5.4.1.jar:5.4.1]
at org.elasticsearch.action.bulk.BulkProcessor.execute(BulkProcessor.java:346) [elasticsearch-5.4.1.jar:5.4.1]
at org.elasticsearch.action.bulk.BulkProcessor.access$200(BulkProcessor.java:50) [elasticsearch-5.4.1.jar:5.4.1]
at org.elasticsearch.action.bulk.BulkProcessor$Flush.run(BulkProcessor.java:380) [elasticsearch-5.4.1.jar:5.4.1]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_121]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_121]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_121]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_121]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121]
Caused by: java.io.IOException: can not write type [class java.math.BigDecimal]
at org.elasticsearch.common.io.stream.StreamOutput.writeGenericValue(StreamOutput.java:655) ~[elasticsearch-5.4.1.jar:5.4.1]
at org.elasticsearch.common.io.stream.StreamOutput.lambda$static$11(StreamOutput.java:570) ~[elasticsearch-5.4.1.jar:5.4.1]
at org.elasticsearch.common.io.stream.StreamOutput.writeGenericValue(StreamOutput.java:653) ~[elasticsearch-5.4.1.jar:5.4.1]
at org.elasticsearch.common.io.stream.StreamOutput.lambda$static$9(StreamOutput.java:548) ~[elasticsearch-5.4.1.jar:5.4.1]
at org.elasticsearch.common.io.stream.StreamOutput.writeGenericValue(StreamOutput.java:653) ~[elasticsearch-5.4.1.jar:5.4.1]
at org.elasticsearch.common.io.stream.StreamOutput.lambda$static$11(StreamOutput.java:570) ~[elasticsearch-5.4.1.jar:5.4.1]
at org.elasticsearch.common.io.stream.StreamOutput.writeGenericValue(StreamOutput.java:653) ~[elasticsearch-5.4.1.jar:5.4.1]
at org.elasticsearch.common.io.stream.StreamOutput.writeMap(StreamOutput.java:443) ~[elasticsearch-5.4.1.jar:5.4.1]
at org.elasticsearch.script.Script.writeTo(Script.java:566) ~[elasticsearch-5.4.1.jar:5.4.1]
at org.elasticsearch.action.update.UpdateRequest.writeTo(UpdateRequest.java:886) ~[elasticsearch-5.4.1.jar:5.4.1]
at org.elasticsearch.action.DocWriteRequest.writeDocumentRequest(DocWriteRequest.java:198) ~[elasticsearch-5.4.1.jar:5.4.1]
at org.elasticsearch.action.bulk.BulkRequest.writeTo(BulkRequest.java:632) ~[elasticsearch-5.4.1.jar:5.4.1]
at org.elasticsearch.transport.TcpTransport.buildMessage(TcpTransport.java:1219) ~[elasticsearch-5.4.1.jar:5.4.1]
at org.elasticsearch.transport.TcpTransport.sendRequestToChannel(TcpTransport.java:1071) ~[elasticsearch-5.4.1
1 个回复
rochy - rochy_he
赞同来自: