Class AbstractCloudBackupRestoreTestCase


  • public abstract class AbstractCloudBackupRestoreTestCase
    extends SolrCloudTestCase
    Used to test the traditional (now deprecated) 'full-snapshot' method of backup/restoration.

    For a similar test harness for incremental backup/restoration see AbstractIncrementalBackupTest

    • Constructor Detail

      • AbstractCloudBackupRestoreTestCase

        public AbstractCloudBackupRestoreTestCase()
    • Method Detail

      • getCollectionNamePrefix

        public abstract String getCollectionNamePrefix()
        Returns:
        The name of the collection to use.
      • getBackupRepoName

        public abstract String getBackupRepoName()
        Returns:
        The name of the backup repository to use.
      • getBackupLocation

        public abstract String getBackupLocation()
        Returns:
        The absolute path for the backup location. Could return null.
      • getCollectionName

        public String getCollectionName()
      • setTestSuffix

        public void setTestSuffix​(String testSuffix)
      • testRestoreFailure

        public void testRestoreFailure()
                                throws Exception
        Throws:
        Exception
      • testConfigBackupOnly

        protected void testConfigBackupOnly​(String configName,
                                            String collectionName)
                                     throws Exception
        This test validates the backup of collection configuration using CollectionAdminParams.NO_INDEX_BACKUP_STRATEGY.
        Parameters:
        configName - The config name for the collection to be backed up.
        collectionName - The name of the collection to be backed up.
        Throws:
        Exception - in case of errors.
      • getShardToDocCountMap

        public static Map<String,​Integer> getShardToDocCountMap​(org.apache.solr.client.solrj.impl.CloudSolrClient client,
                                                                      org.apache.solr.common.cloud.DocCollection docCollection)
                                                               throws org.apache.solr.client.solrj.SolrServerException,
                                                                      IOException
        Throws:
        org.apache.solr.client.solrj.SolrServerException
        IOException