Package org.apache.solr.hdfs.snapshots
Class SolrSnapshotsTool
java.lang.Object
org.apache.solr.hdfs.snapshots.SolrSnapshotsTool
- All Implemented Interfaces:
Closeable,AutoCloseable,CLIO
This class provides utility functions required for Solr snapshots functionality.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbackupCollectionMetaData(String collectionName, String snapshotName, String backupLoc) voidbuildCopyListings(String collectionName, String snapshotName, String localFsPath, String pathPrefix) voidclose()voidcreateSnapshot(String collectionName, String snapshotName) Deprecated.voiddeleteSnapshot(String collectionName, String snapshotName) Deprecated.use equivalent snapshot related tool inSnapshotDeleteToolvoiddescribeSnapshot(String collectionName, String snapshotName) Deprecated.use equivalent snapshot related tool inSnapshotDescribeToolvoidexportSnapshot(String collectionName, String snapshotName, String destPath, Optional<String> backupRepo, Optional<String> asyncReqId) Deprecated.use equivalent snapshot related tool inSnapshotExportToolgetIndexFilesPathForSnapshot(String collectionName, String snapshotName, String pathPrefix) voidlistSnapshots(String collectionName) Deprecated.use equivalent snapshot related tool inSnapshotListToolstatic voidvoidprepareForExport(String collectionName, String snapshotName, String localFsPath, String pathPrefix, String destPath) HDFS specific step required before exporting a snapshot
-
Constructor Details
-
SolrSnapshotsTool
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
createSnapshot
Deprecated.use equivalent snapshot related tool inSnapshotCreateTool -
deleteSnapshot
Deprecated.use equivalent snapshot related tool inSnapshotDeleteTool -
listSnapshots
Deprecated.use equivalent snapshot related tool inSnapshotListTool -
describeSnapshot
Deprecated.use equivalent snapshot related tool inSnapshotDescribeTool -
getIndexFilesPathForSnapshot
public Map<String,List<String>> getIndexFilesPathForSnapshot(String collectionName, String snapshotName, String pathPrefix) throws org.apache.solr.client.solrj.SolrServerException, IOException - Parameters:
pathPrefix- optional- Throws:
org.apache.solr.client.solrj.SolrServerExceptionIOException
-
buildCopyListings
public void buildCopyListings(String collectionName, String snapshotName, String localFsPath, String pathPrefix) throws org.apache.solr.client.solrj.SolrServerException, IOException - Parameters:
pathPrefix- optional- Throws:
org.apache.solr.client.solrj.SolrServerExceptionIOException
-
backupCollectionMetaData
public void backupCollectionMetaData(String collectionName, String snapshotName, String backupLoc) throws org.apache.solr.client.solrj.SolrServerException, IOException - Throws:
org.apache.solr.client.solrj.SolrServerExceptionIOException
-
prepareForExport
public void prepareForExport(String collectionName, String snapshotName, String localFsPath, String pathPrefix, String destPath) HDFS specific step required before exporting a snapshot- Parameters:
pathPrefix- optional
-
exportSnapshot
@Deprecated(since="9.8.0") public void exportSnapshot(String collectionName, String snapshotName, String destPath, Optional<String> backupRepo, Optional<String> asyncReqId) Deprecated.use equivalent snapshot related tool inSnapshotExportTool -
main
- Throws:
IOException
-
SnapshotCreateTool