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;

      

       再执行第二批重启;

  • 相关阅读:
    【leetcode】ZigZag——easy
    联合
    AddChildViewController
    imageWithRender(图片的渲染模式)
    13.范型函数的使用:将字典合并到当前字典
    12.代码获取命名空间名称,并创建相应的类(anyClass 应用)
    13.static 面向对象
    11.swift 单例
    swift String 扩展
    swift UIView 扩展
  • 原文地址:https://www.cnblogs.com/gxc2015/p/9518255.html
Copyright © 2011-2022 走看看