简体   繁体   English

使用 java 在 elasticsearch 中索引 geojson 文件

[英]Indexing geojson file in elasticsearch with java

I got geojson file about 80mb size, when i am trying to index this document to ES in java method, ES stops respond and service is stopped until reboot.我得到了大约 80mb 大小的 geojson 文件,当我试图在 java 方法中将此文档索引到 ES 时,ES 停止响应并且服务停止,直到重新启动。 If i try to index this file via Kibana GUI everything works fine.如果我尝试通过 Kibana GUI 索引该文件,一切正常。

IndexRequest indexRequest = new IndexRequest(indexName)
        .id(id)
        .source(content, XContentType.JSON);
    try {
      IndexResponse indexResponse = restHighLevelClient.index(indexRequest, RequestOptions.DEFAULT);

and there is piece of log from ES并且有来自 ES 的日志

stacktrace": ["org.elasticsearch.action.search.SearchPhaseExecutionException: all shards failed",
"at org.elasticsearch.action.search.AbstractSearchAsyncAction.onPhaseFailure(AbstractSearchAsyncAction.java:568) [elasticsearch-7.10.1.jar:7.10.1]",
"at org.elasticsearch.action.search.AbstractSearchAsyncAction.executeNextPhase(AbstractSearchAsyncAction.java:324) [elasticsearch-7.10.1.jar:7.10.1]",

any suggestions how to fix it??任何建议如何解决它? Thanks!谢谢!

Fixed issue, my elasticsearch has been running in docker container, and memory preferences in Docker were the same, 4gb as memory settings in elasticsearch. Fixed issue, my elasticsearch has been running in docker container, and memory preferences in Docker were the same, 4gb as memory settings in elasticsearch.

So, ES was killed by Docker, when ES memory usage grew up所以,ES被Docker杀死,当ES memory使用量增长

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM