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)
异常显示elasticsearch的负载过高,处理方案具体如下(参考):
a. 增加Es重试次数及等待时间: es.batch.write.retry.count
和 es.batch.write.retry.wait
b. 减少hadoop或spark的任务数或作业数
c. 减少文档/大小的数量(这是每个任务的方式 - 因此具有100个任务的作业将导致每个连接100x(docs))。