mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-24 15:17:30 -04:00
Merge remote-tracking branch 'upstream-main/main' into merge-main-16-01-25
This commit is contained in:
commit
5a70623d8d
870 changed files with 12069 additions and 7949 deletions
|
@ -242,7 +242,7 @@ public class DownsampleTransportFailureIT extends ESIntegTestCase {
|
|||
private void assertIndexExists(final String nodeName, final String indexName) {
|
||||
final GetIndexResponse getIndexResponse = client(nodeName).admin()
|
||||
.indices()
|
||||
.prepareGetIndex()
|
||||
.prepareGetIndex(TEST_REQUEST_TIMEOUT)
|
||||
.addIndices(indexName)
|
||||
.addFeatures(GetIndexRequest.Feature.values())
|
||||
.get();
|
||||
|
@ -255,7 +255,7 @@ public class DownsampleTransportFailureIT extends ESIntegTestCase {
|
|||
"Index [" + indexName + "] was not deleted",
|
||||
() -> client(nodeName).admin()
|
||||
.indices()
|
||||
.prepareGetIndex()
|
||||
.prepareGetIndex(TEST_REQUEST_TIMEOUT)
|
||||
.addIndices(indexName)
|
||||
.addFeatures(GetIndexRequest.Feature.values())
|
||||
.get()
|
||||
|
|
|
@ -203,7 +203,7 @@ public class ILMDownsampleDisruptionIT extends ESIntegTestCase {
|
|||
final GetIndexResponse getIndexResponse = cluster.client()
|
||||
.admin()
|
||||
.indices()
|
||||
.getIndex(new GetIndexRequest().indices(targetIndex))
|
||||
.getIndex(new GetIndexRequest(TEST_REQUEST_TIMEOUT).indices(targetIndex))
|
||||
.actionGet();
|
||||
assertEquals(1, getIndexResponse.indices().length);
|
||||
assertResponse(
|
||||
|
|
|
@ -287,7 +287,7 @@ public class TransportDownsampleAction extends AcknowledgedTransportMasterNodeAc
|
|||
// At any point if there is an issue, delete the downsample index
|
||||
|
||||
// 1. Extract source index mappings
|
||||
final GetMappingsRequest getMappingsRequest = new GetMappingsRequest().indices(sourceIndexName);
|
||||
final GetMappingsRequest getMappingsRequest = new GetMappingsRequest(request.masterNodeTimeout()).indices(sourceIndexName);
|
||||
getMappingsRequest.setParentTask(parentTask);
|
||||
client.admin().indices().getMappings(getMappingsRequest, listener.delegateFailureAndWrap((delegate, getMappingsResponse) -> {
|
||||
final Map<String, Object> sourceIndexMappings = getMappingsResponse.mappings()
|
||||
|
|
|
@ -449,7 +449,9 @@ public class DownsampleActionSingleNodeTests extends ESSingleNodeTestCase {
|
|||
prepareSourceIndex(sourceIndex, true);
|
||||
downsample(sourceIndex, downsampleIndex, config);
|
||||
|
||||
GetIndexResponse indexSettingsResp = indicesAdmin().prepareGetIndex().addIndices(sourceIndex, downsampleIndex).get();
|
||||
GetIndexResponse indexSettingsResp = indicesAdmin().prepareGetIndex(TEST_REQUEST_TIMEOUT)
|
||||
.addIndices(sourceIndex, downsampleIndex)
|
||||
.get();
|
||||
assertDownsampleIndexSettings(sourceIndex, downsampleIndex, indexSettingsResp);
|
||||
for (String key : settings.keySet()) {
|
||||
if (LifecycleSettings.LIFECYCLE_NAME_SETTING.getKey().equals(key)) {
|
||||
|
@ -605,7 +607,7 @@ public class DownsampleActionSingleNodeTests extends ESSingleNodeTestCase {
|
|||
);
|
||||
assertBusy(() -> {
|
||||
try {
|
||||
assertEquals(indicesAdmin().prepareGetIndex().addIndices(downsampleIndex).get().getIndices().length, 1);
|
||||
assertEquals(indicesAdmin().prepareGetIndex(TEST_REQUEST_TIMEOUT).addIndices(downsampleIndex).get().getIndices().length, 1);
|
||||
} catch (IndexNotFoundException e) {
|
||||
fail("downsample index has not been created");
|
||||
}
|
||||
|
@ -1179,7 +1181,7 @@ public class DownsampleActionSingleNodeTests extends ESSingleNodeTestCase {
|
|||
@SuppressWarnings("unchecked")
|
||||
private void assertDownsampleIndex(String sourceIndex, String downsampleIndex, DownsampleConfig config) throws Exception {
|
||||
// Retrieve field information for the metric fields
|
||||
final GetMappingsResponse getMappingsResponse = indicesAdmin().prepareGetMappings(sourceIndex).get();
|
||||
final GetMappingsResponse getMappingsResponse = indicesAdmin().prepareGetMappings(TEST_REQUEST_TIMEOUT, sourceIndex).get();
|
||||
final Map<String, Object> sourceIndexMappings = getMappingsResponse.mappings()
|
||||
.entrySet()
|
||||
.stream()
|
||||
|
@ -1212,7 +1214,9 @@ public class DownsampleActionSingleNodeTests extends ESSingleNodeTestCase {
|
|||
|
||||
assertDownsampleIndexAggregations(sourceIndex, downsampleIndex, config, metricFields, labelFields);
|
||||
|
||||
GetIndexResponse indexSettingsResp = indicesAdmin().prepareGetIndex().addIndices(sourceIndex, downsampleIndex).get();
|
||||
GetIndexResponse indexSettingsResp = indicesAdmin().prepareGetIndex(TEST_REQUEST_TIMEOUT)
|
||||
.addIndices(sourceIndex, downsampleIndex)
|
||||
.get();
|
||||
assertDownsampleIndexSettings(sourceIndex, downsampleIndex, indexSettingsResp);
|
||||
|
||||
Map<String, Map<String, Object>> mappings = (Map<String, Map<String, Object>>) indexSettingsResp.getMappings()
|
||||
|
@ -1222,8 +1226,9 @@ public class DownsampleActionSingleNodeTests extends ESSingleNodeTestCase {
|
|||
|
||||
assertFieldMappings(config, metricFields, mappings);
|
||||
|
||||
GetMappingsResponse indexMappings = indicesAdmin().getMappings(new GetMappingsRequest().indices(downsampleIndex, sourceIndex))
|
||||
.actionGet();
|
||||
GetMappingsResponse indexMappings = indicesAdmin().getMappings(
|
||||
new GetMappingsRequest(TEST_REQUEST_TIMEOUT).indices(downsampleIndex, sourceIndex)
|
||||
).actionGet();
|
||||
Map<String, String> downsampleIndexProperties = (Map<String, String>) indexMappings.mappings()
|
||||
.get(downsampleIndex)
|
||||
.sourceAsMap()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue