Package org.apache.solr.handler
Class SnapShooter
java.lang.Object
org.apache.solr.handler.SnapShooter
Provides functionality equivalent to the snapshooter script This is no longer used in standard
replication.
- Since:
- solr 1.4
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSnapShooter(BackupRepository backupRepo, SolrCore core, URI location, String snapshotName, String commitName) SnapShooter(SolrCore core, String location, String snapshotName) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateSnapAsync(int numberToKeep, Consumer<org.apache.solr.common.util.NamedList<?>> result) protected SnapShooter.CoreSnapshotResponsecreateSnapshot(org.apache.lucene.index.IndexCommit indexCommit) Handles the logic of creating a snapshotprotected voiddeleteNamedSnapshot(ReplicationHandler replicationHandler) protected voiddeleteSnapAsync(ReplicationHandler replicationHandler) static org.apache.lucene.index.IndexCommitgetAndSaveNamedIndexCommit(SolrCore solrCore, String commitName) Gets the parent directory of the snapshots.voidvoid
-
Field Details
-
DATE_FMT
- See Also:
-
-
Constructor Details
-
SnapShooter
Deprecated. -
SnapShooter
public SnapShooter(BackupRepository backupRepo, SolrCore core, URI location, String snapshotName, String commitName)
-
-
Method Details
-
getBackupRepository
-
getLocation
Gets the parent directory of the snapshots. This is thelocationgiven in the constructor. -
validateDeleteSnapshot
public void validateDeleteSnapshot() -
deleteSnapAsync
-
validateCreateSnapshot
- Throws:
IOException
-
createSnapshot
- Throws:
Exception
-
getAndSaveNamedIndexCommit
public static org.apache.lucene.index.IndexCommit getAndSaveNamedIndexCommit(SolrCore solrCore, String commitName) throws IOException - Throws:
IOException
-
createSnapAsync
public void createSnapAsync(int numberToKeep, Consumer<org.apache.solr.common.util.NamedList<?>> result) throws IOException - Throws:
IOException
-
createSnapshot
protected SnapShooter.CoreSnapshotResponse createSnapshot(org.apache.lucene.index.IndexCommit indexCommit) throws Exception Handles the logic of creating a snapshotNOTE: The caller MUST ensure that the
IndexCommitis saved prior to calling this method, and released after calling this method, or there is no no garuntee that the method will function correctly.- Throws:
Exception- See Also:
-
deleteNamedSnapshot
-