Class SnapshotBackupAPI
- java.lang.Object
-
- org.apache.solr.api.JerseyResource
-
- org.apache.solr.handler.admin.api.SnapshotBackupAPI
-
- All Implemented Interfaces:
ReplicationBackupApis
public class SnapshotBackupAPI extends JerseyResource implements ReplicationBackupApis
v2 API implementation for replication-handler based backup creation.This is the main backup functionality available to 'standalone' users.
-
-
Field Summary
-
Fields inherited from class org.apache.solr.api.JerseyResource
containerRequestContext
-
-
Constructor Summary
Constructors Constructor Description SnapshotBackupAPI(SolrCore solrCore, ReplicationHandler.ReplicationHandlerConfig replicationHandlerConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ReplicationBackupResponse
createBackup(ReplicationBackupRequestBody backupReplicationPayload)
This API (POST /api/cores/coreName/replication/backups {...}) is analogous to the v1 /solr/coreName/replication?command=backupprotected void
doSnapShoot(int numberToKeep, int numberBackupsToKeep, String location, String repoName, String commitName, String name, SolrCore solrCore, Consumer<org.apache.solr.common.util.NamedList<?>> resultConsumer)
Separate method helps with testing-
Methods inherited from class org.apache.solr.api.JerseyResource
ensureRequiredParameterProvided, ensureRequiredRequestBodyProvided, instantiateJerseyResponse, instantiateJerseyResponse
-
-
-
-
Constructor Detail
-
SnapshotBackupAPI
@Inject public SnapshotBackupAPI(SolrCore solrCore, ReplicationHandler.ReplicationHandlerConfig replicationHandlerConfig)
-
-
Method Detail
-
createBackup
public ReplicationBackupResponse createBackup(ReplicationBackupRequestBody backupReplicationPayload)
This API (POST /api/cores/coreName/replication/backups {...}) is analogous to the v1 /solr/coreName/replication?command=backup- Specified by:
createBackup
in interfaceReplicationBackupApis
-
doSnapShoot
protected void doSnapShoot(int numberToKeep, int numberBackupsToKeep, String location, String repoName, String commitName, String name, SolrCore solrCore, Consumer<org.apache.solr.common.util.NamedList<?>> resultConsumer) throws IOException
Separate method helps with testing- Throws:
IOException
-
-