(Recommended) Changing the Collection Data Storage Mode from HDFS to Local Disk
Scenario
Solr supports collection data to be stored in local disks and HDFS. In most cases, local disk storage provides higher read and write performance and is recommended.
Before changing the storage mode, delete the historical collections stored in HDFS one by one. Then, perform the following steps to change the storage mode to local disk storage. This way, new collections will be stored on the local disk.
Prerequisites
The Solr service has been installed. To ensure read and write performance, prepare a separate disk for each instance of the Solr node.
Procedure
Assume that some collections, such as collectionTest, are stored in HDFS. To change the storage mode to local disk storage, perform the following steps:
- Delete all collections that are stored in HDFS. The collectionTest is used as an example.
solrctl collection --delete collectionTest
The collection name collectionTest is used as an example. Change the collection name based on the site requirements until all collections stored in the HDFS are deleted.
- On the Solr web page, change the service parameter INDEX_STORED_ON_HDFS to FALSE.
After modifying the parameters, synchronize the configurations and restart the cluster. In this case, the collection storage mode is changed to local disk storage.
- Create collections as required. New collection data is stored on the local disk.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot