Class SystemDataStreamDescriptor

java.lang.Object
org.elasticsearch.indices.SystemDataStreamDescriptor

public class SystemDataStreamDescriptor extends Object
Describes a 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.

  • Constructor Details

  • Method Details

    • getDataStreamName

      public String getDataStreamName()
    • getBackingIndexNames

      public List<String> getBackingIndexNames(Metadata metadata)
      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

      public String getDescription()
    • getComposableIndexTemplate

      public ComposableIndexTemplate getComposableIndexTemplate()
    • isExternal

      public boolean isExternal()
    • getBackingIndexPattern

      public String getBackingIndexPattern()
    • getAllowedElasticProductOrigins

      public List<String> getAllowedElasticProductOrigins()
    • getComponentTemplates

      public Map<String,ComponentTemplate> getComponentTemplates()
    • getThreadPoolNames

      public ExecutorNames 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.