zoukankan      html  css  js  c++  java
  • 在线elasticsearch集群批量写入变慢,导致kafka消息消费延迟

    写入报错如些:

    2018-08-22 18:04:24.166 [elasticsearch[_client_][listener][T#1]] INFO  com.mobanker.framework.es.ElasticsearchBulkTools - id=11749,failureMessage=failure in bulk execution:

    1.修改elasticsearch配置文件elasticsearch.yml,更改线程池相关配置:

    thread_pool.bulk.size: 8
    thread_pool.bulk.queue_size: 1000

    2.重启节点前关闭shard迁移:

    curl -XPUT "http://xxxxxxxxxxx:9200/_cluster/settings" -d '
    {
        "transient" : {
            "cluster.routing.allocation.enable" : "none"
        }
    }

    3.然后su -ef kill掉es进程;

    ps -ef|grep elasticsearch
    kill -9 pid

    4.重启es服务:

    curl -XPUT "http://xxxxxxxxxxxxx:9200/_cluster/settings" -d '
    {
        "transient" : {
            "cluster.routing.allocation.enable" : "all"
        }
    }

    5.开启shard迁移功能:

    curl -XPUT "http://xxxxxxxxxxxxxx:9200/_cluster/settings" -d '
    {
        "transient" : {
            "cluster.routing.allocation.enable" : "all"
        }
    }

    6.整个在线es集群共有23个节点,一批一批执行,每批重启五台,

       因为每做一次,集群状态就会处于yellow状态,会影响集群读写性能,待恢复到green;

      

       再执行第二批重启;

  • 相关阅读:
    简单有效 四招教你保护好WiFi网络安全
    WP8手机安装《神庙逃亡》的教程
    如何关闭iOS7中的iPhone广告跟踪系统
    如何隐藏任务栏图标
    MVC中Controller和Action讲解上篇
    node.js
    express
    node.js+socket.io安装
    自定义view文字垂直居中
    AndroidTouch事件总结
  • 原文地址:https://www.cnblogs.com/gxc2015/p/9518255.html
Copyright © 2011-2022 走看看