elasticsearch1.7.3 upgrade to 2.1.1 Records

Source: Internet
Author: User
Upgrade manual Refer directly to official documentation: Https://www.elastic.co/guide/en/elasticsearch/reference/current/restart-upgrade.html Before the upgrade can see what changes: https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-2.0.html

Step one: Close the slice auto assign put/_cluster/settings {"Persistent": {"cluster.routing.allocation.enable": "None"}} Step two: The data in the memory brush To the hard drive POST/_flush/synced
Step three: Turn off the old cluster and configure a new cluster step four: Start a new cluster step five: Wait for the cluster status to turn yellow, so the index master fragment starts complete step six: Open the slice auto assign put/_cluster/settings {"Persistent": {"cluster. Routing.allocation.enable ":" All "}}
Because of the large cluster index, a total of 100+ index, 5000+ a slice, upgrade after the start of the basic index upgrade operation. Before, we learned that es2.x and es1.x have different storage strategies for multiple directory indexing paths. Details can be read before an article. Therefore, during the upgrade process, all the original index files distributed across multiple disks are copied to a single disk. This is also more time-consuming and cost-io, basically equivalent to a copy of the index file. One of the main upgrade source code is: Org/elasticsearch/common/util/multidatapathupgrader.java this class. It is also simpler to choose the directory es for which the directory is a fragment of an index. If the available disk space for all directories is more than twice times that of an index fragment, select the partition index file as the largest directory for that fragment, and also to reduce file transfer io. If not all directories have more than twice times the available disk space for an index fragment, select the maximum available space for that use.
Note that the compatibility test must be carried out before the upgrade, plugin address: https://github.com/elastic/elasticsearch-migration/Otherwise there may be a mapping conflict caused the failure to start ES, Like I have an index there are multiple mapping, some mapping in the field name repeated, which is not allowed in the es2.0, startup will be reported the following error: Unable to upgrade the mappings for the index [IndexName], Reason: [Mapper for [fieldname] conflicts with existing mapping in the other types:
Reference: Click to open the link

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.