In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces the relevant knowledge of "what are the main functions of elasticsearch cluster cluster". The editor shows you the operation process through an actual case, and the operation method is simple, fast and practical. I hope this article "what are the main functions of elasticsearch cluster cluster" can help you solve the problem.
The cluster function code of elasticsearch is exposed through the ClusterService interface in the cluster package.
Cluster mainly includes the following functions:
Discovery (Discovery), routing (routing), transport function (transport), cluster status (clusterstates), etc.
The discovery function is mainly used to discover the cluster after the node starts, master publishes the cluster status to all nodes, elects the master node and causes the cluster node to become an event.
Routing records the location of each shard in the cluster and provides data information for nodes.
Transport is the main channel for communication between nodes. Elasticsearch uses the netty framework to achieve powerful transport functions.
Cluster state (clusterstates) implements some cluster state and provides methods so that each time the cluster becomes, the master node reconstructs the clusterstates and sends the cluster state to each node.
The node determines whether certain operations can be performed based on the cluster status.
The following figure shows the main Fields of clusterstate
The version of clusterstate is the version of clusterstate that increases every time it is updated. RoutingTables contains the location information of all indexes in the cluster, nodes is all nodes in the current cluster, metaData is some metadata of the index, and blocks contains the blocking state of the cluster.
There are three levels of blocking in the cluster: read,write and matedata
There are four states of a status cluster: unknown,RECEIVED,BEING_APPLIED,APPLIED.
The inheritance relationship of the clusterservice interface of the cluster feature is as follows:
All implementations are in InternalClusterService, which inherits both the AutoCloseAble interface and the LifecycleComponent interface.
The picture above shows the method of clusterservice, which includes the startup and shutdown of the cluster, the modification and release of the cluster state and the ping communication between nodes, etc. These methods just look from the inside that there is no entity in the cluster, and its function is realized by each node. So the operation for the cluster is ultimately the operation for each node. Some operations can only be done by master, while others are required by all nodes. Each time you join the cluster, clusterstatelistener and localmasterlisener will be added, but the release of clusterstate can only be implemented by master nodes.
This is the end of the content about "what are the main functions of elasticsearch cluster cluster". Thank you for reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.