public class SnapShooter extends Object
Provides functionality equivalent to the snapshooter script
This is no longer used in standard replication.Constructor and Description |
---|
SnapShooter(BackupRepository backupRepo,
SolrCore core,
URI location,
String snapshotName,
String commitName) |
SnapShooter(SolrCore core,
String location,
String snapshotName)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
createSnapAsync(int numberToKeep,
Consumer<NamedList> result) |
NamedList |
createSnapshot() |
protected NamedList |
createSnapshot(IndexCommit indexCommit)
Handles the logic of creating a snapshot
|
protected void |
deleteNamedSnapshot(ReplicationHandler replicationHandler) |
protected void |
deleteSnapAsync(ReplicationHandler replicationHandler) |
static IndexCommit |
getAndSaveNamedIndexCommit(SolrCore solrCore,
String commitName) |
BackupRepository |
getBackupRepository() |
URI |
getLocation()
Gets the parent directory of the snapshots.
|
void |
validateCreateSnapshot() |
void |
validateDeleteSnapshot() |
public static final String DATE_FMT
@Deprecated public SnapShooter(SolrCore core, String location, String snapshotName)
public SnapShooter(BackupRepository backupRepo, SolrCore core, URI location, String snapshotName, String commitName)
public BackupRepository getBackupRepository()
public URI getLocation()
location
given in the constructor.public void validateDeleteSnapshot()
protected void deleteSnapAsync(ReplicationHandler replicationHandler)
public void validateCreateSnapshot() throws IOException
IOException
public static IndexCommit getAndSaveNamedIndexCommit(SolrCore solrCore, String commitName) throws IOException
IOException
public void createSnapAsync(int numberToKeep, Consumer<NamedList> result) throws IOException
IOException
protected NamedList createSnapshot(IndexCommit indexCommit) throws Exception
NOTE: The caller MUST ensure that the IndexCommit
is saved prior to
calling this method, and released after calling this method, or there is no no garuntee that the
method will function correctly.
protected void deleteNamedSnapshot(ReplicationHandler replicationHandler)
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.