Interface DataRoutingService
- All Superinterfaces:
AutoCloseable,NamedImplementation
- All Known Subinterfaces:
WritableDataRoutingService,WritableDataRoutingServiceImpl
- All Known Implementing Classes:
DataRoutingService.Delegating,DataRoutingServiceK8sImpl,DataRoutingServiceYmlImpl,NonExistentDataRoutingService
public interface DataRoutingService extends NamedImplementation, AutoCloseable
Interfaces for a Data Routing Service. This service provides configuration for:
- DataImportService servers
- Tailers
- Loggers
- TableDataService Proxies
- Workers
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceDataRoutingService.DataImportServiceConfigFor use by DIS instance.static interfaceDataRoutingService.DataImportServiceEndpointFor use by consumer of DIS as a data sink.static classDataRoutingService.DelegatingDelegate method calls to an implementation object.static interfaceDataRoutingService.Endpointstatic interfaceDataRoutingService.FilterUnified interface for filtering tables and locations together.static classDataRoutingService.ListFilterTreat a list of filters as an "or" filter.static interfaceDataRoutingService.LocationFilterDetermine whether the full table location (TableKey + LocationKey) should be accepted by the filter owner.static interfaceDataRoutingService.LogAggregatorConfigstatic interfaceDataRoutingService.LogAggregatorEndpointstatic classDataRoutingService.NullFilterThis represents "no filter" or "pass everything".static classDataRoutingService.NullPropertyProviderImplementation of "no properties".static interfaceDataRoutingService.PropertyProviderProvides access to "other" configuration properties for several interfaces.static interfaceDataRoutingService.TableDataServiceConfigConfiguration for a TableDataService provider.static interfaceDataRoutingService.TableFilterDetermine whether theTableKeyorTableIdentifiershould be accepted by the filter owner. -
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_LOCAL_TABLE_DATA_SERVICEThis TableDataService name is guaranteed to exist if storage is configured on the requesting host.static StringDEFAULT_QUERY_SERVER_TABLE_DATA_SERVICEThis TableDataService name represents the default TableDataService configuration name for (remote) query servers.static StringDEFAULT_SELECTION_TAGDefault configuration entrystatic StringMERGE_QUERY_TDS_TAGTable data services marked with this tag will be presented as choices in the the Merge Persistent Query Configuration editor.static DataRoutingService.NullFilterNULL_FILTERSingleton instance of NullFilter.static DataRoutingService.NullPropertyProviderNULL_PROPERTY_PROVIDERSingleton "no properties" provider.static StringQUERY_QUERY_TDS_TAGTable data services marked with this tag are suitable as choices in query contexts (no UI tie-in at this point).static StringTABLE_DATA_SERVICE_CONFIG_PROPThis property will override the table data service configuration name requested by most processes.static String[]TABLE_DATA_SERVICE_CONFIG_PROPS_WITH_LEGACYThis array of property names can be used to bridge between previous and current property names.static StringVALIDATE_QUERY_TDS_TAGTable data services marked with this tag will be presented as choices in the the Validate Persistent Query Configuration editor. -
Method Summary
Modifier and Type Method Description Stringabout()Information about a SchemaService instance.StringasYamlString()Serialize the data routing as a YAML string.default booleanauthenticate()Authenticate using default authentication.default booleanauthenticate(String user, String password)Authenticate using the given user and password.default booleanauthenticate(String user, String password, String operateAs)Authenticate using the given user and password, operating as the operateAs user.Collection<? extends DataRoutingService.DataImportServiceEndpoint>getAllDataImportServiceDestinations()Get all known DIS destinations.Collection<? extends DataRoutingService.LogAggregatorConfig>getAllLogAggregatorServiceConfigs()DataRoutingService.DataImportServiceConfiggetDataImportServiceConfig(String name)Get DIS parameters for this named DIS instance.Collection<? extends DataRoutingService.DataImportServiceEndpoint>getDataImportServiceDestinations(TableIdentifier tableIdentifier)Get DIS destinations for a table key.DataRoutingService.LogAggregatorConfiggetLogAggregatorConfig(String configName)DataRoutingService.LogAggregatorEndpointgetLogAggregatorDestination(TableIdentifier tableIdentifier)Get the single LAS destination for the given table key.default TableDataServicegetTableDataService(String tdsName)Get the named TableDataService for an interactive RemoteQueryProcessor.TableDataServicegetTableDataService(String tdsName, boolean allowIOMessageFlush)Get the named TableDataService, specifying the message flush behavior for RemoteTableDataService connections.DataRoutingService.TableDataServiceConfiggetTableDataServiceConfig(String name)Information needed to configure a table data service server.Collection<? extends DataRoutingService.TableDataServiceConfig>getTableDataServiceConfigs()Get all known table data service configurations.
-
Field Details
-
DEFAULT_LOCAL_TABLE_DATA_SERVICE
This TableDataService name is guaranteed to exist if storage is configured on the requesting host.- See Also:
- Constant Field Values
-
DEFAULT_QUERY_SERVER_TABLE_DATA_SERVICE
This TableDataService name represents the default TableDataService configuration name for (remote) query servers.- See Also:
- Constant Field Values
-
TABLE_DATA_SERVICE_CONFIG_PROP
This property will override the table data service configuration name requested by most processes.- See Also:
- Constant Field Values
-
TABLE_DATA_SERVICE_CONFIG_PROPS_WITH_LEGACY
This array of property names can be used to bridge between previous and current property names. -
MERGE_QUERY_TDS_TAG
Table data services marked with this tag will be presented as choices in the the Merge Persistent Query Configuration editor.- See Also:
- Constant Field Values
-
VALIDATE_QUERY_TDS_TAG
Table data services marked with this tag will be presented as choices in the the Validate Persistent Query Configuration editor.- See Also:
- Constant Field Values
-
QUERY_QUERY_TDS_TAG
Table data services marked with this tag are suitable as choices in query contexts (no UI tie-in at this point).- See Also:
- Constant Field Values
-
DEFAULT_SELECTION_TAG
Default configuration entry- See Also:
- Constant Field Values
-
NULL_FILTER
Singleton instance of NullFilter. -
NULL_PROPERTY_PROVIDER
Singleton "no properties" provider.
-
-
Method Details
-
about
String about()Information about a SchemaService instance. Useful for debugging.- Returns:
- a string containing information about the instance
-
authenticate
default boolean authenticate()Authenticate using default authentication. This will be using the default private key or howeverWAuthenticationClientManager.DEFAULThas been authenticated.- Returns:
- true only if the authentication succeeded
-
authenticate
Authenticate using the given user and password. Implementations are not required to allow re-authentication.- Parameters:
user- the user to authenticatepassword- the password for the user- Returns:
- true only if the authentication succeeded
-
authenticate
default boolean authenticate(@NotNull String user, @NotNull String password, @NotNull String operateAs)Authenticate using the given user and password, operating as the operateAs user. Implementations are not required to allow re-authentication.- Parameters:
user- the user to authenticatepassword- the password for the useroperateAs- attempt to operate as this effective user- Returns:
- true only if the authentication succeeded
-
getDataImportServiceConfig
@Nullable DataRoutingService.DataImportServiceConfig getDataImportServiceConfig(@NotNull String name)Get DIS parameters for this named DIS instance. For consumption by a DIS instance or TableDataService consumer.- Parameters:
name- DIS configuration name- Returns:
- the configuration for the named DIS, or null if it does not exist.
-
getDataImportServiceDestinations
@NotNull Collection<? extends DataRoutingService.DataImportServiceEndpoint> getDataImportServiceDestinations(@NotNull TableIdentifier tableIdentifier)Get DIS destinations for a table key. For consumption by a Tailer.- Parameters:
tableIdentifier- the identifier of the data to be logged- Returns:
- a possibly empty collection of DIS destinations that should receive data for the given table.
-
getAllDataImportServiceDestinations
@NotNull Collection<? extends DataRoutingService.DataImportServiceEndpoint> getAllDataImportServiceDestinations()Get all known DIS destinations. For consumption by a Tailer.- Returns:
- a possibly null collection of all known DIS destinations.
-
getLogAggregatorConfig
-
getAllLogAggregatorServiceConfigs
Collection<? extends DataRoutingService.LogAggregatorConfig> getAllLogAggregatorServiceConfigs() -
getLogAggregatorDestination
@Nullable DataRoutingService.LogAggregatorEndpoint getLogAggregatorDestination(@NotNull TableIdentifier tableIdentifier)Get the single LAS destination for the given table key. Must support defaults (e.g. to localhost). TODO: it would be nice to make this a little more generic, so one config also toggles between LAS and direct-to-file options. e.g. a token to give to Logger Factory- Parameters:
tableIdentifier- the identifier of the data to be logged- Returns:
- the configured LogAggregatorEndpoint for the given tableIdentifier, or null if none match the key.
-
getTableDataService
@FinalDefault @Nullable default TableDataService getTableDataService(@NotNull String tdsName) throws IOExceptionGet the named TableDataService for an interactive RemoteQueryProcessor.- Parameters:
tdsName- the name of a configured TableDataService- Returns:
- the named TableDataService configuration, or null if not found.
- Throws:
IOException
-
getTableDataService
@Nullable TableDataService getTableDataService(@NotNull String tdsName, boolean allowIOMessageFlush) throws IOExceptionGet the named TableDataService, specifying the message flush behavior for RemoteTableDataService connections. allowIOMessageFlush == true is unsuitable for interactive or other applications where threads might be interrupted.- Parameters:
tdsName- the name of a configured TableDataServiceallowIOMessageFlush- value to be passed intoRemoteTableDataService's constructor- Returns:
- the named TableDataService, or null if not found.
- Throws:
IOException
-
getTableDataServiceConfig
@Nullable DataRoutingService.TableDataServiceConfig getTableDataServiceConfig(@NotNull String name)Information needed to configure a table data service server. For use by a TableDataService provider (LocalTableDataServer,TableDataCacheProxy).- Parameters:
name- configuration name- Returns:
- the named TableDataServiceConfig, or null if not found.
-
getTableDataServiceConfigs
@NotNull Collection<? extends DataRoutingService.TableDataServiceConfig> getTableDataServiceConfigs()Get all known table data service configurations. The data includes name description and tags.- Returns:
- all known TableDataServiceConfigs
-
asYamlString
Serialize the data routing as a YAML string. Internal use only.- Returns:
- YAML representation of the configuration
-