码迷,mamicode.com
首页 > 其他好文 > 详细

工作采坑札记:3. Spark中es-hadoop插件异常解决

时间:2018-08-28 23:56:52      阅读:1510      评论:0      收藏:0      [点我收藏+]

标签:hba   ast   pre   http   cse   技术   OLE   schedule   次数   

1. Es-Hadoop异常:

技术分享图片
org.elasticsearch.hadoop.EsHadoopException: Could not write all entries [615/300864] (maybe ES was overloaded?). Bailing out...
    at org.elasticsearch.hadoop.rest.RestRepository.flush(RestRepository.java:235)
    at org.elasticsearch.hadoop.rest.RestRepository.doWriteToIndex(RestRepository.java:186)
    at org.elasticsearch.hadoop.rest.RestRepository.writeToIndex(RestRepository.java:149)
    at org.elasticsearch.spark.rdd.EsRDDWriter.write(EsRDDWriter.scala:49)
    at org.elasticsearch.spark.rdd.EsSpark$$anonfun$saveToEs$1.apply(EsSpark.scala:67)
    at org.elasticsearch.spark.rdd.EsSpark$$anonfun$saveToEs$1.apply(EsSpark.scala:67)
    at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:66)
    at org.apache.spark.scheduler.Task.run(Task.scala:88)
    at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:214)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
View Code

 

  异常显示elasticsearch的负载过高,处理方案具体如下(参考):

  a. 增加Es重试次数及等待时间: es.batch.write.retry.count 和 es.batch.write.retry.wait

  b. 减少hadoop或spark的任务数或作业数

  c. 减少文档/大小的数量(这是每个任务的方式 - 因此具有100个任务的作业将导致每个连接100x(docs))。

工作采坑札记:3. Spark中es-hadoop插件异常解决

标签:hba   ast   pre   http   cse   技术   OLE   schedule   次数   

原文地址:https://www.cnblogs.com/mengrennwpu/p/9364007.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!