public class PackageManager extends Object implements Closeable
Constructor and Description |
---|
PackageManager(HttpSolrClient solrClient,
String solrBaseUrl,
String zkHost) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
deploy(String packageName,
String version,
String[] collections,
String[] parameters,
boolean isUpdate,
boolean noprompt)
Deploys a version of a package to a list of collections.
|
List<SolrPackageInstance> |
fetchInstalledPackageInstances() |
Map<String,String> |
getDeployedCollections(String packageName)
Given a package, return a map of collections where this package is
installed to the installed version (which can be
PackagePluginHolder.LATEST ) |
SolrPackageInstance |
getPackageInstance(String packageName,
String version)
Get the installed instance of a specific version of a package.
|
Map<String,SolrPackageInstance> |
getPackagesDeployed(String collection) |
void |
undeploy(String packageName,
String[] collections)
Undeploys a package from given collections.
|
boolean |
verify(SolrPackageInstance pkg,
List<String> collections)
Given a package and list of collections, verify if the package is installed
in those collections.
|
public PackageManager(HttpSolrClient solrClient, String solrBaseUrl, String zkHost)
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public List<SolrPackageInstance> fetchInstalledPackageInstances() throws SolrException
SolrException
public Map<String,SolrPackageInstance> getPackagesDeployed(String collection)
public boolean verify(SolrPackageInstance pkg, List<String> collections)
public SolrPackageInstance getPackageInstance(String packageName, String version)
public void deploy(String packageName, String version, String[] collections, String[] parameters, boolean isUpdate, boolean noprompt) throws SolrException
version
- If null, the most recent version is deployed.
EXPERT FEATURE: If version is PackageUtils.LATEST, this collection will be auto updated whenever a newer version of this package is installed.isUpdate
- Is this a fresh deployment or is it an update (i.e. there is already a version of this package deployed on this collection)noprompt
- If true, don't prompt before executing setup commands.SolrException
public void undeploy(String packageName, String[] collections) throws SolrException
SolrException
public Map<String,String> getDeployedCollections(String packageName)
PackagePluginHolder.LATEST
)Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.