Elasticsearch2.2.0配置文件说明

本文详细介绍了Elasticsearch的配置参数及其作用,包括集群、节点、路径、内存、网络、发现及网关等配置项,有助于理解并优化Elasticsearch集群。

官方配置文档

      https://www.elastic.co/guide/en/elasticsearch/reference/current/setup.html

配置详解

# ---------------------------------- Cluster (集群配置)-----------------------------------
#
# cluster.name: my-application   (自定义集群名称,相同集群该名称相同  my-application)
#
# ------------------------------------ Node ------------------------------------
#
 node.name: node-1     (当前节点名称,同一个集群中不能重复)

#
# Add custom attributes to the node:
#
# node.rack: r1
#
# ----------------------------------- Paths (数据,日志路径配合)------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
 path.data: /home/yang/elasticsearch-2.2.0/data  (数据存储路径,支持多路径)
#
# Path to log files:
#
 path.logs: /home/yang/elasticsearch-2.2.0/logs  (日志文件存储路径)
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
# bootstrap.mlockall: true   (是否锁住内存,指长期占用该内存,不产生内存交换,防止内存交换导致性能降低,配合内存设置使用)
#
# Make sure that the `ES_HEAP_SIZE` environment variable is set to about half the memory
# available on the system and that the owner of the process is allowed to use this limit.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network(网络配置) -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
# network.host: 192.168.0.1      (IP地址,url访问的ip)
#
# Set a custom port for HTTP:
#
# http.port: 9200       (http访问端口)
#
# For more information, see the documentation at:
# <http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html>
#
# --------------------------------- Discovery (节点发现配置)----------------------------------
#
# Pass an initial list of hosts to perform discovery when new node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
# discovery.zen.ping.unicast.hosts: ["host1", "host2"]    (初始主节点列表,默认启动是按照这个初始化master节点)
#
# Prevent the "split brain" by configuring the majority of nodes (total number of nodes / 2 + 1):
#
# discovery.zen.minimum_master_nodes: 3(集群中主节点数,默认 节点数/2 + 1)
#
# For more information, see the documentation at:
# <http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery.html>
#
# ---------------------------------- Gateway-------------------------
#
# Block initial recovery after a full cluster restart until N nodes are started:
#
# gateway.recover_after_nodes: 3   (n个节点启动后开始数据恢复)
#
# For more information, see the documentation at:
# <http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-gateway.html>
#
# ---------------------------------- Various -----------------------------------
#
# Disable starting multiple nodes on a single system:
#
# node.max_local_storage_nodes: 1  (禁用多节点从同一个位置启动)
#
# Require explicit names when deleting indices:
#
# action.destructive_requires_name: true  (设置是否可以通过正则或者_all删除或者关闭索引

转载于:https://my.oschina.net/UpBoy/blog/618175

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值