Class DataStreamTestHelper
java.lang.Object
org.opensearch.cluster.DataStreamTestHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.opensearch.cluster.metadata.IndexMetadata.BuildercreateBackingIndex(String dataStreamName, int generation) static org.opensearch.cluster.metadata.IndexMetadata.BuildercreateFirstBackingIndex(String dataStreamName) static org.opensearch.cluster.metadata.DataStream.TimestampFieldcreateTimestampField(String fieldName) static StringgenerateMapping(String timestampFieldName) static StringgenerateMapping(String timestampFieldName, String type) static org.opensearch.cluster.ClusterStategetClusterStateWithDataStreams(List<org.opensearch.common.collect.Tuple<String, Integer>> dataStreams, List<String> indexNames) ConstructsClusterStatewith the specified data streams and indices.static org.opensearch.cluster.metadata.IndexMetadata.BuildergetIndexMetadataBuilderForIndex(org.opensearch.core.index.Index index) static List<org.opensearch.core.index.Index> static org.opensearch.cluster.metadata.DataStream
-
Constructor Details
-
DataStreamTestHelper
public DataStreamTestHelper()
-
-
Method Details
-
createFirstBackingIndex
public static org.opensearch.cluster.metadata.IndexMetadata.Builder createFirstBackingIndex(String dataStreamName) -
createBackingIndex
public static org.opensearch.cluster.metadata.IndexMetadata.Builder createBackingIndex(String dataStreamName, int generation) -
getIndexMetadataBuilderForIndex
public static org.opensearch.cluster.metadata.IndexMetadata.Builder getIndexMetadataBuilderForIndex(org.opensearch.core.index.Index index) -
createTimestampField
public static org.opensearch.cluster.metadata.DataStream.TimestampField createTimestampField(String fieldName) -
generateMapping
-
generateMapping
-
randomIndexInstances
-
randomInstance
public static org.opensearch.cluster.metadata.DataStream randomInstance() -
getClusterStateWithDataStreams
public static org.opensearch.cluster.ClusterState getClusterStateWithDataStreams(List<org.opensearch.common.collect.Tuple<String, Integer>> dataStreams, List<String> indexNames) ConstructsClusterStatewith the specified data streams and indices.- Parameters:
dataStreams- The names of the data streams to create with their respective number of backing indicesindexNames- The names of indices to create that do not back any data streams
-