栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 大数据系统

Windows下ES集群创建

Windows下ES集群创建

1、复制3份ES文件:

2、分别对node1、node2、node3修改config/elasticsearch.yml

node1:

cluster.name: my-application
network.host: localhost
http.port: 9201
transport.tcp.port: 9301
node.name: node-1
node.master: true
node.data: true
http.cors.enabled: true
http.cors.allow-origin: "*"

node2:

cluster.name: my-application
network.host: localhost
http.port: 9202
transport.tcp.port: 9302
node.name: node-2
node.master: true
node.data: true
http.cors.enabled: true
http.cors.allow-origin: "*"
discovery.seed_hosts: ["localhost:9301"]
discovery.zen.fd.ping_timeout: 1m
discovery.zen.fd.ping_retries: 5

node3:

cluster.name: my-application
network.host: localhost
http.port: 9203
transport.tcp.port: 9303
node.name: node-3
node.master: true
node.data: true
http.cors.enabled: true
http.cors.allow-origin: "*"
discovery.seed_hosts: ["localhost:9301","localhost:9302"]
discovery.zen.fd.ping_timeout: 1m
discovery.zen.fd.ping_retries: 5

3、分别启动node1、node2、node3

启动bin/elasticsearch.bat

4、启动完成后,可以查看集群状态:

访问:http://localhost:9201/_cluster/health

{
    "cluster_name": "my-application",
    "status": "green",
    "timed_out": false,
    "number_of_nodes": 3,
    "number_of_data_nodes": 3,
    "active_primary_shards": 2,
    "active_shards": 4,
    "relocating_shards": 0,
    "initializing_shards": 0,
    "unassigned_shards": 0,
    "delayed_unassigned_shards": 0,
    "number_of_pending_tasks": 0,
    "number_of_in_flight_fetch": 0,
    "task_max_waiting_in_queue_millis": 0,
    "active_shards_percent_as_number": 100.0
}

    "status": "green",

    "number_of_data_nodes": 3,

表示集群配置成功。

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/699770.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号