Class DataStreamTestHelper

java.lang.Object
org.elasticsearch.cluster.DataStreamTestHelper

public final class DataStreamTestHelper
extends java.lang.Object
  • Constructor Summary

    Constructors 
    Constructor Description
    DataStreamTestHelper()  
  • Method Summary

    Modifier and Type Method Description
    static org.elasticsearch.cluster.metadata.IndexMetadata.Builder createBackingIndex​(java.lang.String dataStreamName, int generation)  
    static org.elasticsearch.cluster.metadata.IndexMetadata.Builder createFirstBackingIndex​(java.lang.String dataStreamName)  
    static org.elasticsearch.cluster.metadata.DataStream.TimestampField createTimestampField​(java.lang.String fieldName)  
    static java.lang.String generateMapping​(java.lang.String timestampFieldName)  
    static java.lang.String generateMapping​(java.lang.String timestampFieldName, java.lang.String type)  
    static org.elasticsearch.cluster.ClusterState getClusterStateWithDataStreams​(java.util.List<org.elasticsearch.common.collect.Tuple<java.lang.String,​java.lang.Integer>> dataStreams, java.util.List<java.lang.String> indexNames)
    Constructs ClusterState with the specified data streams and indices.
    static org.elasticsearch.cluster.metadata.IndexMetadata.Builder getIndexMetadataBuilderForIndex​(org.elasticsearch.index.Index index)  
    static java.util.List<org.elasticsearch.index.Index> randomIndexInstances()  
    static org.elasticsearch.cluster.metadata.DataStream randomInstance()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • createFirstBackingIndex

      public static org.elasticsearch.cluster.metadata.IndexMetadata.Builder createFirstBackingIndex​(java.lang.String dataStreamName)
    • createBackingIndex

      public static org.elasticsearch.cluster.metadata.IndexMetadata.Builder createBackingIndex​(java.lang.String dataStreamName, int generation)
    • getIndexMetadataBuilderForIndex

      public static org.elasticsearch.cluster.metadata.IndexMetadata.Builder getIndexMetadataBuilderForIndex​(org.elasticsearch.index.Index index)
    • createTimestampField

      public static org.elasticsearch.cluster.metadata.DataStream.TimestampField createTimestampField​(java.lang.String fieldName)
    • generateMapping

      public static java.lang.String generateMapping​(java.lang.String timestampFieldName)
    • generateMapping

      public static java.lang.String generateMapping​(java.lang.String timestampFieldName, java.lang.String type)
    • randomIndexInstances

      public static java.util.List<org.elasticsearch.index.Index> randomIndexInstances()
    • randomInstance

      public static org.elasticsearch.cluster.metadata.DataStream randomInstance()
    • getClusterStateWithDataStreams

      public static org.elasticsearch.cluster.ClusterState getClusterStateWithDataStreams​(java.util.List<org.elasticsearch.common.collect.Tuple<java.lang.String,​java.lang.Integer>> dataStreams, java.util.List<java.lang.String> indexNames)
      Constructs ClusterState with the specified data streams and indices.
      Parameters:
      dataStreams - The names of the data streams to create with their respective number of backing indices
      indexNames - The names of indices to create that do not back any data streams