Package org.apache.solr.hdfs.snapshots
Class SolrSnapshotsTool
- java.lang.Object
-
- org.apache.solr.hdfs.snapshots.SolrSnapshotsTool
-
-
Constructor Summary
Constructors Constructor Description SolrSnapshotsTool(String solrZkEnsemble)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbackupCollectionMetaData(String collectionName, String snapshotName, String backupLoc)voidbuildCopyListings(String collectionName, String snapshotName, String localFsPath, String pathPrefix)voidclose()voidcreateSnapshot(String collectionName, String snapshotName)voiddeleteSnapshot(String collectionName, String snapshotName)voiddescribeSnapshot(String collectionName, String snapshotName)voidexportSnapshot(String collectionName, String snapshotName, String destPath, Optional<String> backupRepo, Optional<String> asyncReqId)Map<String,List<String>>getIndexFilesPathForSnapshot(String collectionName, String snapshotName, String pathPrefix)voidlistSnapshots(String collectionName)static voidmain(String[] args)voidprepareForExport(String collectionName, String snapshotName, String localFsPath, String pathPrefix, String destPath)
-
-
-
Constructor Detail
-
SolrSnapshotsTool
public SolrSnapshotsTool(String solrZkEnsemble)
-
-
Method Detail
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
listSnapshots
public void listSnapshots(String collectionName)
-
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)
- Parameters:
pathPrefix- optional
-
exportSnapshot
public void exportSnapshot(String collectionName, String snapshotName, String destPath, Optional<String> backupRepo, Optional<String> asyncReqId)
-
main
public static void main(String[] args) throws IOException
- Throws:
IOException
-
-