Interface ScanServerSelector
- All Known Implementing Classes:
ConfigurableScanServerHostSelector,ConfigurableScanServerSelector
public interface ScanServerSelector
A client side plugin that determines what scan servers to use for eventually consistent scans.
When a scanner sets
ScannerBase.setConsistencyLevel(ScannerBase.ConsistencyLevel)
to ScannerBase.ConsistencyLevel.EVENTUAL then this plugin
is used to determine which scan servers to use for a given tablet. To configure a class to use
for this plugin, set its name using the client config scan.server.selector.impl- Since:
- 2.1.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceThis interface exists so that is easier to evolve what is passed toinit(InitParameters)without having to make breaking changes.static interfaceThis interface exists so that is easier to evolve what is passed toselectServers(SelectorParameters)without having to make breaking changes. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe scan server group name that will be used when one is not specified. -
Method Summary
Modifier and TypeMethodDescriptiondefault voidThis method is called once after aScanServerSelectoris instantiated.Uses theScanServerSelector.SelectorParametersto determine which, if any, ScanServer should be used for scanning a tablet.
-
Field Details
-
DEFAULT_SCAN_SERVER_GROUP_NAME
The scan server group name that will be used when one is not specified.- See Also:
-
-
Method Details
-
init
This method is called once after aScanServerSelectoris instantiated. -
selectServers
Uses the
ScanServerSelector.SelectorParametersto determine which, if any, ScanServer should be used for scanning a tablet.In the case where there are zero scan servers available and an implementation does not want to fall back to tablet servers, its ok to wait and poll for scan servers. When waiting its best to use
ScanServerSelector.SelectorParameters.waitUntil(Supplier, Duration, String)as this allows Accumulo to know about the wait and cancel it via exceptions when it no longer makes sense to wait.- Parameters:
params- parameters for the calculation- Returns:
- results
-