Got it

In-depth understanding of the Elasitcsearch storage

Latest reply: Jul 30, 2019 01:06:32 596 2 10 0 0

This post provides an in-depth understanding of the Elasitcsearch storage. Please have a read below.


Elasticsearch path configuration


Elasticsearch has many path configurations.


path.home: home directory of the user who runs the Elasticsearch process. The default value is the JAVA system variable user.dir. The default value of this variable is the home directory of the process owner.


path.conf: contains the configuration file directory. The path is usually set by the JAVA system variable es.config because the value needs to be parsed before the configuration file is found.


path.plugins: contains the file directory of the Elasticsearch plug-in subdirectory. This directory supports symbolic links. When an executable program runs multiple Elasticsearch instances, the feature can selectively disable and enable a series of plug-ins for an Elasticsearch instance.


The path.work: has been used to store temporary files generated during the running of the Elasticsearch and has been discarded.


Directory for storing path.log: logs. You are advised to isolate the directory from the storage space of the data directory to prevent one space from being exhausted.


Directory for storing path.data: Elasticsearch data files.


In this article, we will look at the contents of the data directory (path.data) in detail and study the use of these files.


Where do these files come from?


Because the bottom layer of Elasticsearch uses Lucene to index and query data, files in the data directory are written by both Elasticseach and Lucene.


The division of labor is clear: Lucene writes and maintains the Lucene index file. Elasticsearch writes and maintains the metadata files of features built on Lucene, such as field mapping, index setting and other cluster metadata (the underlying Lucene does not support the user-side or supporting features supported by Elasticsearch).


Before studying the Lucene index file, let's look at the data directory outer structure created by Elasticsearch.


Node data


Let's start with the empty data directory of the Elasticsearch cluster. The directory structure is as follows:


174035slzrzctzyfrghctj.png?image.png


The node.lock file is used to ensure that only one Elasticsearch instance is reading and writing to the data directory at a time.


global-0.st is an interesting file. The global-prefix indicates that this is a global state file, and the .st suffix indicates that it is a state file containing metadata. 


As you can guess, the binary file contains the global metadata of the cluster and the numbers behind the prefix represent the version of the cluster metadata (a strict version mechanism provided by the cluster).


great
View more
  • x
  • convention:

Thanks
View more
  • x
  • convention:

Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.