如何确保从命令行运行elasticsearch只启动一次?

时间:2014-02-25 20:21:07

标签: elasticsearch

当我从命令行运行elasticsearch时,我得到一个这样的过程:

asdf  71356  0.0  1.9  3828644  160064  s004  S  11:34PM  1:16.39  /usr/bin/java -Xms256m -Xmx1g -Xss256k -Djava.awt.headless=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -Delasticsearch -Des.path.home=/usr/local/Cellar/elasticsearch/0.90.3 -cp :/usr/local/Cellar/elasticsearch/0.90.3/libexec/elasticsearch-0.90.3.jar:/usr/local/Cellar/elasticsearch/0.90.3/libexec/*:/usr/local/Cellar/elasticsearch/0.90.3/libexec/sigar/* org.elasticsearch.bootstrap.ElasticSearch

如果我再次运行elasticsearch或多次运行,我会获得此行的多个实例,从而获得该程序。无论我输入elasticsearch多少次,我怎样才能确保我只启动一个实例?

1 个答案:

答案 0 :(得分:0)

您可以将在该计算机上运行的最大本地节点数设置为1.在elasticsearch.yml配置文件中,您可以设置此行以限制它。

node.max_local_storage_nodes: 1