Data stream support for indices shard stores API
This commit is contained in:
parent
34c50c045c
commit
c26d2b5fa5
|
@ -80,3 +80,59 @@
|
|||
- match: { indices.index2.shards.0.stores.0.allocation: "primary" }
|
||||
- match: { indices.index2.shards.1.stores.0.allocation: "primary" }
|
||||
|
||||
---
|
||||
"Data streams test":
|
||||
- skip:
|
||||
version: " - 7.99.99"
|
||||
reason: "change to 7.8.99 after backport"
|
||||
features: allowed_warnings
|
||||
|
||||
- do:
|
||||
allowed_warnings:
|
||||
- "index template [my-template1] has index patterns [simple-data-stream1] matching patterns from existing older templates [global] with patterns (global => [*]); this template [my-template1] will take precedence during new index creation"
|
||||
indices.put_index_template:
|
||||
name: my-template1
|
||||
body:
|
||||
index_patterns: [simple-data-stream1]
|
||||
template:
|
||||
mappings:
|
||||
properties:
|
||||
'@timestamp':
|
||||
type: date
|
||||
settings:
|
||||
number_of_shards: "1"
|
||||
number_of_replicas: "0"
|
||||
data_stream:
|
||||
timestamp_field: '@timestamp'
|
||||
|
||||
- do:
|
||||
indices.create_data_stream:
|
||||
name: simple-data-stream1
|
||||
- is_true: acknowledged
|
||||
|
||||
# rollover data stream to create new backing index
|
||||
- do:
|
||||
indices.rollover:
|
||||
alias: "simple-data-stream1"
|
||||
|
||||
- match: { old_index: .ds-simple-data-stream1-000001 }
|
||||
- match: { new_index: .ds-simple-data-stream1-000002 }
|
||||
- match: { rolled_over: true }
|
||||
- match: { dry_run: false }
|
||||
|
||||
- do:
|
||||
cluster.health:
|
||||
wait_for_status: green
|
||||
|
||||
- do:
|
||||
indices.shard_stores:
|
||||
index: simple-data-stream1
|
||||
status: "green"
|
||||
|
||||
- match: { indices.\.ds-simple-data-stream1-000001.shards.0.stores.0.allocation: "primary" }
|
||||
- match: { indices.\.ds-simple-data-stream1-000002.shards.0.stores.0.allocation: "primary" }
|
||||
|
||||
- do:
|
||||
indices.delete_data_stream:
|
||||
name: simple-data-stream1
|
||||
- is_true: acknowledged
|
||||
|
|
|
@ -421,6 +421,7 @@ public class DataStreamIT extends ESIntegTestCase {
|
|||
verifyResolvability(dataStreamName, client().admin().indices().prepareGetIndex().addIndices(dataStreamName), false);
|
||||
verifyResolvability(dataStreamName, client().admin().cluster().prepareSearchShards(dataStreamName), false);
|
||||
verifyResolvability(dataStreamName, client().admin().indices().prepareOpen(dataStreamName), false);
|
||||
verifyResolvability(dataStreamName, client().admin().indices().prepareShardStores(dataStreamName), false);
|
||||
|
||||
request = new CreateDataStreamAction.Request("logs-barbaz");
|
||||
client().admin().indices().createDataStream(request).actionGet();
|
||||
|
@ -456,6 +457,7 @@ public class DataStreamIT extends ESIntegTestCase {
|
|||
verifyResolvability(wildcardExpression, client().admin().indices().prepareGetIndex().addIndices(wildcardExpression), false);
|
||||
verifyResolvability(wildcardExpression, client().admin().cluster().prepareSearchShards(wildcardExpression), false);
|
||||
verifyResolvability(wildcardExpression, client().admin().indices().prepareOpen(wildcardExpression), false);
|
||||
verifyResolvability(wildcardExpression, client().admin().indices().prepareShardStores(wildcardExpression), false);
|
||||
}
|
||||
|
||||
public void testCannotDeleteComposableTemplateUsedByDataStream() throws Exception {
|
||||
|
|
|
@ -107,6 +107,11 @@ public class IndicesShardStoresRequest extends MasterNodeReadRequest<IndicesShar
|
|||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean includeDataStreams() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the shard criteria to get store information on
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue