DataStream
that is reserved for use by a system feature.
A system data stream is managed by the system and protected by the system against user modifications so that system features are not broken by inadvertent user operations.
Unlike a SystemIndexDescriptor
, a SystemDataStreamDescriptor does not take an index pattern. Rather, it derives the expected
backing index pattern from the data stream name.
A SystemDataStreamDescriptor defines a list of allowed product origins. If that list is empty, only system operations can read, write to, or modify the system data stream. If there are entries in the list, then a special request header must be used in any request that accesses the system data stream, either through plugin-provided APIs or through data stream APIs.
A SystemDataStreamDescriptor may be internal or external. If internal, the system feature must define APIs for interacting with the system data stream. If external, the system feature will allow use of the data stream API, assuming the correct permissions and product origin flag.
One interesting implementation detail is that the SystemDataStreamDescriptor manages its own templates for the data stream, so although they have names, they are never listed in the index template or component template APIs.
The descriptor also provides names for the thread pools that Elasticsearch should use to read, search, or modify the descriptor’s indices.
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionSystemDataStreamDescriptor
(String dataStreamName, String description, SystemDataStreamDescriptor.Type type, ComposableIndexTemplate composableIndexTemplate, Map<String, ComponentTemplate> componentTemplates, List<String> allowedElasticProductOrigins, ExecutorNames executorNames) Creates a new descriptor for a system data descriptor -
Method Summary
Modifier and TypeMethodDescriptiongetBackingIndexNames
(Metadata metadata) Retrieve backing indices for this system data streamGet the names of the thread pools that should be used for operations on this data stream.boolean
-
Constructor Details
-
SystemDataStreamDescriptor
public SystemDataStreamDescriptor(String dataStreamName, String description, SystemDataStreamDescriptor.Type type, ComposableIndexTemplate composableIndexTemplate, Map<String, ComponentTemplate> componentTemplates, List<String> allowedElasticProductOrigins, ExecutorNames executorNames) Creates a new descriptor for a system data descriptor- Parameters:
dataStreamName
- the name of the data stream. Must not benull
description
- a brief description of what the data stream is used for. Must not benull
type
- theSystemDataStreamDescriptor.Type
of the data stream which determines how the data stream can be accessed. Must not benull
composableIndexTemplate
- theComposableIndexTemplate
that contains the mappings and settings for the data stream. Must not benull
componentTemplates
- a map that containsComponentTemplate
instances corresponding to those references in theComposableIndexTemplate
allowedElasticProductOrigins
- a list of product origin values that are allowed to access this data stream if the type isSystemDataStreamDescriptor.Type.EXTERNAL
. Must not benull
executorNames
- thread pools that should be used for operations on the system data stream
-
-
Method Details
-
getDataStreamName
-
getBackingIndexNames
Retrieve backing indices for this system data stream- Parameters:
metadata
- Metadata in which to look for indices- Returns:
- List of names of backing indices
-
getDescription
-
getComposableIndexTemplate
-
isExternal
public boolean isExternal() -
getBackingIndexPattern
-
getAllowedElasticProductOrigins
-
getComponentTemplates
-
getThreadPoolNames
Get the names of the thread pools that should be used for operations on this data stream.- Returns:
- Names for get, search, and write executors.
-