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 interface
DataRoutingService.DataImportServiceConfig
For use by DIS instance.static interface
DataRoutingService.DataImportServiceEndpoint
For use by consumer of DIS as a data sink.static class
DataRoutingService.Delegating
Delegate method calls to an implementation object.static interface
DataRoutingService.Endpoint
static interface
DataRoutingService.Filter
Unified interface for filtering tables and locations together.static class
DataRoutingService.ListFilter
Treat a list of filters as an "or" filter.static interface
DataRoutingService.LocationFilter
Determine whether the full table location (TableKey + LocationKey) should be accepted by the filter owner.static interface
DataRoutingService.LogAggregatorConfig
static interface
DataRoutingService.LogAggregatorEndpoint
static class
DataRoutingService.NullFilter
This represents "no filter" or "pass everything".static class
DataRoutingService.NullPropertyProvider
Implementation of "no properties".static interface
DataRoutingService.PropertyProvider
Provides access to "other" configuration properties for several interfaces.static interface
DataRoutingService.TableDataServiceConfig
Configuration for a TableDataService provider.static interface
DataRoutingService.TableFilter
Determine whether theTableKey
orTableIdentifier
should be accepted by the filter owner. -
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_LOCAL_TABLE_DATA_SERVICE
This TableDataService name is guaranteed to exist if storage is configured on the requesting host.static String
DEFAULT_QUERY_SERVER_TABLE_DATA_SERVICE
This TableDataService name represents the default TableDataService configuration name for (remote) query servers.static String
DEFAULT_SELECTION_TAG
Default configuration entrystatic String
MERGE_QUERY_TDS_TAG
Table data services marked with this tag will be presented as choices in the the Merge Persistent Query Configuration editor.static DataRoutingService.NullFilter
NULL_FILTER
Singleton instance of NullFilter.static DataRoutingService.NullPropertyProvider
NULL_PROPERTY_PROVIDER
Singleton "no properties" provider.static String
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).static String
TABLE_DATA_SERVICE_CONFIG_PROP
This property will override the table data service configuration name requested by most processes.static String[]
TABLE_DATA_SERVICE_CONFIG_PROPS_WITH_LEGACY
This array of property names can be used to bridge between previous and current property names.static String
VALIDATE_QUERY_TDS_TAG
Table 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 String
about()
Information about a SchemaService instance.String
asYamlString()
Serialize the data routing as a YAML string.default boolean
authenticate()
Authenticate using default authentication.default boolean
authenticate(String user, String password)
Authenticate using the given user and password.default boolean
authenticate(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.DataImportServiceConfig
getDataImportServiceConfig(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.LogAggregatorConfig
getLogAggregatorConfig(String configName)
DataRoutingService.LogAggregatorEndpoint
getLogAggregatorDestination(TableIdentifier tableIdentifier)
Get the single LAS destination for the given table key.default TableDataService
getTableDataService(String tdsName)
Get the named TableDataService for an interactive RemoteQueryProcessor.TableDataService
getTableDataService(String tdsName, boolean allowIOMessageFlush)
Get the named TableDataService, specifying the message flush behavior for RemoteTableDataService connections.DataRoutingService.TableDataServiceConfig
getTableDataServiceConfig(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.DEFAULT
has 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
-