public class BrokerVersionFilter extends Object implements BrokerFilter
| Constructor and Description |
|---|
BrokerVersionFilter() |
| Modifier and Type | Method and Description |
|---|---|
void |
filter(Set<String> brokers,
BundleData bundleToAssign,
LoadData loadData,
ServiceConfiguration conf)
From the given set of available broker candidates, filter those using the version numbers.
|
com.github.zafarkhaja.semver.Version |
getLatestVersionNumber(Set<String> brokers,
LoadData loadData)
Get the most recent broker version number from the load reports of all the running brokers.
|
public com.github.zafarkhaja.semver.Version getLatestVersionNumber(Set<String> brokers, LoadData loadData) throws BrokerFilterBadVersionException
brokers - The brokers to choose the latest version string from.loadData - The load data from the leader broker (contains the load reports which in turn contain the version string).BrokerFilterBadVersionException - If the most recent version is undefined (e.g., a bad broker version was encountered or a broker
does not have a version string in its load report.public void filter(Set<String> brokers, BundleData bundleToAssign, LoadData loadData, ServiceConfiguration conf) throws BrokerFilterBadVersionException
filter in interface BrokerFilterbrokers - The currently available brokers that have not already been filtered.bundleToAssign - The data for the bundle to assign.loadData - The load data from the leader broker.conf - The service configuration.BrokerFilterBadVersionExceptionCopyright © 2017–2021 Apache Software Foundation. All rights reserved.