最终结果

优化es索引模版
1.索引模板改成这个了,去掉了所有分词,增加了一些配置项:{
"order": 0, "template": "tenants_*", "settings": { "index": { "translog": { "flush_threshold_size": "5g" }, "number_of_replicas": "0", "refresh_interval": "120s" } }, "mappings": {}, "aliases": {}
}
扩容flink处理程序
2、flink程序增加到两个,目前已经增加到了3个。
优化flink批量写入
3.flink写es增加优化配置:
esConfig.put("bulk.flush.max.actions", "2000"); //ES批量提交,最大写入日志存储量 esConfig.put("bulk.flush.max.size.mb", "500"); // 3、进行重试的时间间隔。对于指数型则表示起始的基数 esConfig.put("bulk.flush.backoff.delay", "2"); // 4、失败重试的次数 esConfig.put("bulk.flush.backoff.retries", "3"); //5.强行刷入批量提交时间 esConfig.put("bulk.flush.interval.ms", "5000");

