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,
boolean shouldInstallClusterPlugins,
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
PackageLoader.LATEST ) |
SolrPackageInstance |
getPackageInstance(String packageName,
String version)
Get the installed instance of a specific version of a package.
|
Map<String,SolrPackageInstance> |
getPackagesDeployed(String collection) |
Map<String,SolrPackageInstance> |
getPackagesDeployedAsClusterLevelPlugins()
Get a map of packages (key: package name, value: package instance) that have their plugins deployed as cluster level plugins.
|
void |
undeploy(String packageName,
String[] collections,
boolean shouldUndeployClusterPlugins)
Undeploys a package from given collections.
|
void |
uninstall(String packageName,
String version) |
boolean |
verify(SolrPackageInstance pkg,
List<String> collections,
boolean shouldDeployClusterPlugins,
String[] overrides)
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 Map<String,SolrPackageInstance> getPackagesDeployedAsClusterLevelPlugins()
public boolean verify(SolrPackageInstance pkg, List<String> collections, boolean shouldDeployClusterPlugins, String[] overrides)
overrides
- are needed only when shouldDeployClusterPlugins is true, since collection level plugins will get their overrides from ZK (collection params API)public SolrPackageInstance getPackageInstance(String packageName, String version)
public void deploy(String packageName, String version, String[] collections, boolean shouldInstallClusterPlugins, 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, boolean shouldUndeployClusterPlugins) throws SolrException
SolrException
public Map<String,String> getDeployedCollections(String packageName)
PackageLoader.LATEST
)Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.