ES5.4.0 记录

ES记录

ES5.4.0 记录_第1张图片
转自 祝威廉ES

ES优化

11

ES5.4.0 记录_第2张图片

12

1问题记录

这些属性在ES5.x中被移除了
discovery.zen.ping.multicast.enabled: false
index.number_of_shards: 20
index.number_of_replicas: 1

报错日志


*************************************************************************************
Found index level settings on node level configuration.

Since elasticsearch 5.x index level settings can NOT be set on the nodes 
configuration like the elasticsearch.yaml, in system properties or command line 
arguments.In order to upgrade all indices the settings must be updated via the 
/${index}/_settings API. Unless all settings are dynamic all indices must be closed 
in order to apply the upgradeIndices created in the future should use index templates 
to set default values. 

Please ensure all required values are updated on all indices by executing: 

curl -XPUT 'http://localhost:9200/_all/_settings?preserve_existing=true' -d '{
  "index.number_of_replicas" : "1",
  "index.number_of_shards" : "20"
}'
*************************************************************************************

[2017-06-12T17:06:09,942][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [es-xxx-07-node3] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalArgumentException: node settings must not contain any index level settings
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:127) ~[elasticsearch-5.4.0.jar:5.4.0]
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:114) ~[elasticsearch-5.4.0.jar:5.4.0]
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:67) ~[elasticsearch-5.4.0.jar:5.4.0]
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122) ~[elasticsearch-5.4.0.jar:5.4.0]
        at org.elasticsearch.cli.Command.main(Command.java:88) ~[elasticsearch-5.4.0.jar:5.4.0]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91) ~[elasticsearch-5.4.0.jar:5.4.0]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:84) ~[elasticsearch-5.4.0.jar:5.4.0]
Caused by: java.lang.IllegalArgumentException: node settings must not contain any index level settings
        at org.elasticsearch.common.settings.SettingsModule.(SettingsModule.java:132) ~[elasticsearch-5.4.0.jar:5.4.0]
        at org.elasticsearch.node.Node.(Node.java:342) ~[elasticsearch-5.4.0.jar:5.4.0]
        at org.elasticsearch.node.Node.(Node.java:242) ~[elasticsearch-5.4.0.jar:5.4.0]
        at org.elasticsearch.bootstrap.Bootstrap$6.(Bootstrap.java:242) ~[elasticsearch-5.4.0.jar:5.4.0]
        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:242) ~[elasticsearch-5.4.0.jar:5.4.0]
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:360) ~[elasticsearch-5.4.0.jar:5.4.0]
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:123) ~[elasticsearch-5.4.0.jar:5.4.0]
        ... 6 more

2 修改vm.max_map_count

问题:
max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
解决:
vi /etc/sysctl.conf
添加下面配置:
vm.max_map_count=655360

命令行执行sysctl -p

ES 压缩

curl -XPOST ‘es_ip:8080/index_in_es5_1/1?pretty’ -d’ {
“first_name” : “John22”,
“last_name” : “Smith”,
“age” : 25,
“about” : “I love to go rock climbing”,
“interests”: [ “sports”, “music” ]
}’

curl -XPUT “es_ip:8080/index_in_es5_1/_settings” -d ’ {
“number_of_replicas” : 1
}’

curl -XPUT “es_ip:8080/index_in_es5_1/_settings?pretty” -d ’ {
“index.codec” : “best_compression”
}’

curl -XPUT ‘http://localhost:9200/example_index/_settings’ -d ‘{“index”:{“codec”:”best_compression”}}’

参考:
https://stackoverflow.com/questions/38343499/compression-to-elasticsearch-indexes
https://www.elastic.co/blog/elasticsearch-storage-the-true-story-2.0
https://www.elastic.co/blog/store-compression-in-lucene-and-elasticsearch

你可能感兴趣的:(ES5.4.0 记录)