This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
The following commit(s) were added to refs/heads/master by this push: new 1cc9e16 [Doris On ES] Add UT test for all search phase (#4035) 1cc9e16 is described below commit 1cc9e1606fc1211ff8bf1e1381ef5ee47b1ab855 Author: Yunfeng,Wu <wuyunfen...@baidu.com> AuthorDate: Tue Jul 7 23:05:02 2020 +0800 [Doris On ES] Add UT test for all search phase (#4035) I forget push some UT test in this PR #4012. Also remove `_cluster/state` resource because DOE does not rely the full ES cluster state meta. --- .../org/apache/doris/catalog/CatalogTestUtil.java | 2 +- .../elasticsearch/EsShardPartitionsTest.java | 43 ++ .../doris/external/elasticsearch/EsTestCase.java | 87 +++ .../external/elasticsearch/MappingPhaseTest.java | 105 +++ .../external/elasticsearch/PartitionPhaseTest.java | 80 +++ .../external/elasticsearch/VersionPhaseTest.java | 58 ++ fe/src/test/resources/data/es/clusterstate1.json | 752 --------------------- fe/src/test/resources/data/es/clusterstate2.json | 722 -------------------- fe/src/test/resources/data/es/clusterstate3.json | 747 -------------------- fe/src/test/resources/data/es/clusterstate4.json | 747 -------------------- fe/src/test/resources/data/es/clusterstate5.json | 751 -------------------- fe/src/test/resources/data/es/search_shards.json | 213 ------ .../test/resources/data/es/test_index_mapping.json | 24 + .../data/es/test_index_mapping_after_7x.json | 22 + fe/src/test/resources/data/es/test_main_info.json | 18 + fe/src/test/resources/data/es/test_nodes_http.json | 29 + .../test/resources/data/es/test_search_shards.json | 80 +++ 17 files changed, 547 insertions(+), 3933 deletions(-) diff --git a/fe/src/test/java/org/apache/doris/catalog/CatalogTestUtil.java b/fe/src/test/java/org/apache/doris/catalog/CatalogTestUtil.java index e799352..4932476 100644 --- a/fe/src/test/java/org/apache/doris/catalog/CatalogTestUtil.java +++ b/fe/src/test/java/org/apache/doris/catalog/CatalogTestUtil.java @@ -256,7 +256,7 @@ public class CatalogTestUtil { RangePartitionInfo partitionInfo = new RangePartitionInfo(partitionColumns); Map<String, String> properties = Maps.newHashMap(); properties.put(EsTable.HOSTS, "xxx"); - properties.put(EsTable.INDEX, "indexa"); + properties.put(EsTable.INDEX, "doe"); properties.put(EsTable.TYPE, "doc"); properties.put(EsTable.PASSWORD, ""); properties.put(EsTable.USER, "root"); diff --git a/fe/src/test/java/org/apache/doris/external/elasticsearch/EsShardPartitionsTest.java b/fe/src/test/java/org/apache/doris/external/elasticsearch/EsShardPartitionsTest.java new file mode 100644 index 0000000..46ea20d --- /dev/null +++ b/fe/src/test/java/org/apache/doris/external/elasticsearch/EsShardPartitionsTest.java @@ -0,0 +1,43 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +package org.apache.doris.external.elasticsearch; + +import org.apache.doris.catalog.Catalog; +import org.apache.doris.catalog.CatalogTestUtil; +import org.apache.doris.catalog.EsTable; + +import org.junit.Test; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; + +public class EsShardPartitionsTest extends EsTestCase { + + @Test + public void testPartition() throws Exception { + EsTable esTable = (EsTable) Catalog.getCurrentCatalog() + .getDb(CatalogTestUtil.testDb1) + .getTable(CatalogTestUtil.testEsTableId1); + EsShardPartitions esShardPartitions = EsShardPartitions.findShardPartitions("doe", + loadJsonFromFile("data/es/test_search_shards.json")); + EsTablePartitions esTablePartitions = EsTablePartitions.fromShardPartitions(esTable, esShardPartitions); + assertNotNull(esTablePartitions); + assertEquals(1, esTablePartitions.getUnPartitionedIndexStates().size()); + assertEquals(5, esTablePartitions.getEsShardPartitions("doe").getShardRoutings().size()); + } +} diff --git a/fe/src/test/java/org/apache/doris/external/elasticsearch/EsTestCase.java b/fe/src/test/java/org/apache/doris/external/elasticsearch/EsTestCase.java new file mode 100644 index 0000000..1d7b989 --- /dev/null +++ b/fe/src/test/java/org/apache/doris/external/elasticsearch/EsTestCase.java @@ -0,0 +1,87 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +package org.apache.doris.external.elasticsearch; + +import org.apache.doris.catalog.Catalog; +import org.apache.doris.catalog.CatalogTestUtil; +import org.apache.doris.catalog.Column; +import org.apache.doris.catalog.EsTable; +import org.apache.doris.catalog.FakeCatalog; +import org.apache.doris.catalog.FakeEditLog; +import org.apache.doris.common.DdlException; +import org.apache.doris.common.FeMetaVersion; +import org.apache.doris.meta.MetaContext; + +import org.junit.Before; +import org.junit.BeforeClass; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.net.URISyntaxException; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Random; + +public class EsTestCase { + + protected static FakeEditLog fakeEditLog; + protected static FakeCatalog fakeCatalog; + protected static Catalog masterCatalog; + protected static String mappingsStr = ""; + + @BeforeClass + public static void init() throws Exception { + fakeEditLog = new FakeEditLog(); + fakeCatalog = new FakeCatalog(); + masterCatalog = CatalogTestUtil.createTestCatalog(); + MetaContext metaContext = new MetaContext(); + metaContext.setMetaVersion(FeMetaVersion.VERSION_40); + metaContext.setThreadLocalInfo(); + // masterCatalog.setJournalVersion(FeMetaVersion.VERSION_40); + FakeCatalog.setCatalog(masterCatalog); + } + + protected String loadJsonFromFile(String fileName) throws IOException, URISyntaxException { + File file = new File(MappingPhaseTest.class.getClassLoader().getResource(fileName).toURI()); + InputStream is = new FileInputStream(file); + BufferedReader br = new BufferedReader(new InputStreamReader(is)); + StringBuilder jsonStr = new StringBuilder(); + String line = ""; + while ((line = br.readLine()) != null) { + jsonStr.append(line); + } + br.close(); + is.close(); + return jsonStr.toString(); + } + + public EsTable fakeEsTable(String table, String index, String type, List<Column> columns) throws DdlException { + Map<String, String> props = new HashMap<>(); + props.put(EsTable.HOSTS, "127.0.0.1:8200"); + props.put(EsTable.INDEX, index); + props.put(EsTable.TYPE, type); + props.put(EsTable.VERSION, "6.5.3"); + return new EsTable(new Random().nextLong(), table, columns, props, null); + + } +} diff --git a/fe/src/test/java/org/apache/doris/external/elasticsearch/MappingPhaseTest.java b/fe/src/test/java/org/apache/doris/external/elasticsearch/MappingPhaseTest.java new file mode 100644 index 0000000..9c9c5ad --- /dev/null +++ b/fe/src/test/java/org/apache/doris/external/elasticsearch/MappingPhaseTest.java @@ -0,0 +1,105 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +package org.apache.doris.external.elasticsearch; + +import org.apache.doris.catalog.Column; +import org.apache.doris.catalog.EsTable; +import org.apache.doris.catalog.PrimitiveType; +import org.apache.doris.common.ExceptionChecker; + +import org.junit.Before; +import org.junit.Test; + +import java.util.ArrayList; +import java.util.List; + +import mockit.Expectations; +import mockit.Injectable; + +import static org.junit.Assert.assertEquals; + +public class MappingPhaseTest extends EsTestCase { + + + List<Column> columns = new ArrayList<>(); + + @Before + public void setUp() { + Column k1 = new Column("k1", PrimitiveType.BIGINT); + Column k2 = new Column("k2", PrimitiveType.VARCHAR); + Column k3 = new Column("k3", PrimitiveType.VARCHAR); + columns.add(k1); + columns.add(k2); + columns.add(k3); + } + + @Test + public void testExtractFieldsNormal() throws Exception { + + MappingPhase mappingPhase = new MappingPhase(null); + // ES version < 7.0 + EsTable esTableBefore7X = fakeEsTable("fake", "test", "doc", columns); + SearchContext searchContext = new SearchContext(esTableBefore7X); + mappingPhase.resolveFields(searchContext, loadJsonFromFile("data/es/test_index_mapping.json")); + assertEquals("k3.keyword", searchContext.fetchFieldsContext().get("k3")); + assertEquals("k3.keyword", searchContext.docValueFieldsContext().get("k3")); + assertEquals("k1", searchContext.docValueFieldsContext().get("k1")); + assertEquals("k2", searchContext.docValueFieldsContext().get("k2")); + + // ES version >= 7.0 + EsTable esTableAfter7X = fakeEsTable("fake", "test", "_doc", columns); + SearchContext searchContext1 = new SearchContext(esTableAfter7X); + mappingPhase.resolveFields(searchContext1, loadJsonFromFile("data/es/test_index_mapping_after_7x.json")); + assertEquals("k3.keyword", searchContext1.fetchFieldsContext().get("k3")); + assertEquals("k3.keyword", searchContext1.docValueFieldsContext().get("k3")); + assertEquals("k1", searchContext1.docValueFieldsContext().get("k1")); + assertEquals("k2", searchContext1.docValueFieldsContext().get("k2")); + } + + @Test + public void testTypeNotExist() throws Exception { + MappingPhase mappingPhase = new MappingPhase(null); + EsTable table = fakeEsTable("fake", "test", "not_exists", columns); + SearchContext searchContext = new SearchContext(table); + // type not exists + ExceptionChecker.expectThrows(DorisEsException.class, + () -> mappingPhase.resolveFields(searchContext, loadJsonFromFile("data/es/test_index_mapping.json"))); + } + + @Test + public void testWorkFlow(@Injectable EsRestClient client) throws Exception{ + EsTable table = fakeEsTable("fake", "test", "doc", columns); + SearchContext searchContext1 = new SearchContext(table); + String jsonMapping = loadJsonFromFile("data/es/test_index_mapping.json"); + new Expectations(client) { + { + client.getMapping(anyString, anyBoolean); + minTimes = 0; + result = jsonMapping; + } + }; + MappingPhase mappingPhase = new MappingPhase(client); + ExceptionChecker.expectThrowsNoException(() -> mappingPhase.execute(searchContext1)); + ExceptionChecker.expectThrowsNoException(() -> mappingPhase.postProcess(searchContext1)); + assertEquals("k3.keyword", searchContext1.fetchFieldsContext().get("k3")); + assertEquals("k3.keyword", searchContext1.docValueFieldsContext().get("k3")); + assertEquals("k1", searchContext1.docValueFieldsContext().get("k1")); + assertEquals("k2", searchContext1.docValueFieldsContext().get("k2")); + + } +} \ No newline at end of file diff --git a/fe/src/test/java/org/apache/doris/external/elasticsearch/PartitionPhaseTest.java b/fe/src/test/java/org/apache/doris/external/elasticsearch/PartitionPhaseTest.java new file mode 100644 index 0000000..aa82dff --- /dev/null +++ b/fe/src/test/java/org/apache/doris/external/elasticsearch/PartitionPhaseTest.java @@ -0,0 +1,80 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +package org.apache.doris.external.elasticsearch; + +import org.apache.doris.catalog.Column; +import org.apache.doris.catalog.EsTable; +import org.apache.doris.catalog.PrimitiveType; +import org.apache.doris.common.ExceptionChecker; + +import org.codehaus.jackson.JsonParser; +import org.codehaus.jackson.map.ObjectMapper; +import org.junit.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import mockit.Expectations; +import mockit.Injectable; + +import static org.junit.Assert.assertNotNull; + +public class PartitionPhaseTest extends EsTestCase { + + @Test + public void testWorkFlow(@Injectable EsRestClient client) throws Exception { + final EsShardPartitions[] esShardPartitions = {null}; + ExceptionChecker.expectThrowsNoException(() -> + esShardPartitions[0] = EsShardPartitions.findShardPartitions("doe", + loadJsonFromFile("data/es/test_search_shards.json"))); + assertNotNull(esShardPartitions[0]); + ObjectMapper mapper = new ObjectMapper(); + JsonParser jsonParser = mapper.getJsonFactory().createJsonParser(loadJsonFromFile("data/es/test_nodes_http.json")); + Map<String, Map<String, Object>> nodesData = (Map<String, Map<String, Object>>) mapper.readValue(jsonParser, Map.class).get("nodes"); + Map<String, EsNodeInfo> nodesMap = new HashMap<>(); + for (Map.Entry<String, Map<String, Object>> entry : nodesData.entrySet()) { + EsNodeInfo node = new EsNodeInfo(entry.getKey(), entry.getValue()); + if (node.hasHttp()) { + nodesMap.put(node.getId(), node); + } + } + + new Expectations(client) { + { + client.getHttpNodes(); + minTimes = 0; + result = nodesMap; + + client.searchShards("doe"); + minTimes = 0; + result = esShardPartitions[0]; + } + }; + List<Column> columns = new ArrayList<>(); + Column k1 = new Column("k1", PrimitiveType.BIGINT); + columns.add(k1); + EsTable esTableBefore7X = fakeEsTable("doe", "doe", "doc", columns); + SearchContext context = new SearchContext(esTableBefore7X); + PartitionPhase partitionPhase = new PartitionPhase(client); + ExceptionChecker.expectThrowsNoException(() -> partitionPhase.execute(context)); + ExceptionChecker.expectThrowsNoException(() -> partitionPhase.postProcess(context)); + assertNotNull(context.tablePartitions()); + } +} diff --git a/fe/src/test/java/org/apache/doris/external/elasticsearch/VersionPhaseTest.java b/fe/src/test/java/org/apache/doris/external/elasticsearch/VersionPhaseTest.java new file mode 100644 index 0000000..1fb43be --- /dev/null +++ b/fe/src/test/java/org/apache/doris/external/elasticsearch/VersionPhaseTest.java @@ -0,0 +1,58 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +package org.apache.doris.external.elasticsearch; + +import org.apache.doris.catalog.Column; +import org.apache.doris.catalog.EsTable; +import org.apache.doris.catalog.PrimitiveType; +import org.apache.doris.common.ExceptionChecker; + +import org.junit.Test; + +import java.util.ArrayList; +import java.util.List; + +import mockit.Expectations; +import mockit.Injectable; + +import static org.junit.Assert.assertTrue; + +public class VersionPhaseTest extends EsTestCase { + + @Test + public void testWorkFlow(@Injectable EsRestClient client) throws Exception { + List<Column> columns = new ArrayList<>(); + Column k1 = new Column("k1", PrimitiveType.BIGINT); + columns.add(k1); + EsTable esTableBefore7X = fakeEsTable("fake", "test", "doc", columns); + SearchContext context = new SearchContext(esTableBefore7X); + + new Expectations(client) { + { + client.version(); + minTimes = 0; + result = EsMajorVersion.V_6_X; + } + }; + VersionPhase versionPhase = new VersionPhase(client); + ExceptionChecker.expectThrowsNoException(() -> versionPhase.preProcess(context)); + ExceptionChecker.expectThrowsNoException(() -> versionPhase.execute(context)); + assertTrue(context.version().on(EsMajorVersion.V_6_X)); + } + +} diff --git a/fe/src/test/resources/data/es/clusterstate1.json b/fe/src/test/resources/data/es/clusterstate1.json deleted file mode 100644 index 3473ae2..0000000 --- a/fe/src/test/resources/data/es/clusterstate1.json +++ /dev/null @@ -1,752 +0,0 @@ -{ - "cluster_name": "elasticsearch", - "version": 28, - "state_uuid": "C6WNazFPSPyZcQlE-cNw1g", - "master_node": "ejy2E2sMTg6nqnjhF9KfsQ", - "blocks": {}, - "nodes": { - "ejy2E2sMTg6nqnjhF9KfsQ": { - "name": "ejy2E2s", - "ephemeral_id": "HO-_F6BLSqedHuv7-yhkNQ", - "transport_address": "192.168.0.1:9209", - "attributes": { - "thrift_port": "9210" - } - } - }, - "metadata": { - "cluster_uuid": "_na_", - "templates": {}, - "indices": { - "index2": { - "state": "open", - "settings": { - "index": { - "bpack": { - "partition": { - "upperbound": "2018-10-02" - } - }, - "number_of_shards": "5", - "provided_name": "index2", - "creation_date": "1539592090322", - "number_of_replicas": "1", - "uuid": "T-Kg83WaTOSIXmiO0ZANzg", - "version": { - "created": "5050099" - } - } - }, - "mappings": {}, - "aliases": [ - "indexa" - ], - "primary_terms": { - "0": 1, - "1": 1, - "2": 1, - "3": 1, - "4": 1 - }, - "in_sync_allocations": { - "0": [ - "gbBnb3KFQOyXHl3eaVV6nA" - ], - "1": [ - "sNsOyQBnSdKQuFETNtRYng" - ], - "2": [ - "4UZfdxQeT7CMUxI9Fl5tYA" - ], - "3": [ - "70TzfLRxQ_KL-tT81-QO4w" - ], - "4": [ - "GhBM4mIdTAG-IVjGYFazkQ" - ] - } - }, - "index1": { - "state": "open", - "settings": { - "index": { - "bpack": { - "partition": { - "upperbound": "2018-10-01" - } - }, - "number_of_shards": "5", - "provided_name": "index1", - "creation_date": "1539592085059", - "number_of_replicas": "1", - "uuid": "hjbl6RxaTyCYFfAJwaSjCA", - "version": { - "created": "5050099" - } - } - }, - "mappings": {}, - "aliases": [ - "indexa" - ], - "primary_terms": { - "0": 1, - "1": 1, - "2": 1, - "3": 1, - "4": 1 - }, - "in_sync_allocations": { - "0": [ - "WFVdvk1eQrmOfemq6UoBIw" - ], - "1": [ - "_ASJYn1bRO2MnCN0HKH5BA" - ], - "2": [ - "o5kBd295ReKi2g4g1bpjyA" - ], - "3": [ - "orpHABU0S8eJ0Nd82U_SQA" - ], - "4": [ - "6I6OQ1QfTgCvHigkIdmuPA" - ] - } - } - }, - "index-graveyard": { - "tombstones": [] - } - }, - "routing_table": { - "indices": { - "index2": { - "shards": { - "0": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 0, - "index": "index2", - "allocation_id": { - "id": "gbBnb3KFQOyXHl3eaVV6nA" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 0, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "1": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 1, - "index": "index2", - "allocation_id": { - "id": "sNsOyQBnSdKQuFETNtRYng" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 1, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "2": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 2, - "index": "index2", - "allocation_id": { - "id": "4UZfdxQeT7CMUxI9Fl5tYA" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 2, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "3": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 3, - "index": "index2", - "allocation_id": { - "id": "70TzfLRxQ_KL-tT81-QO4w" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 3, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "4": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 4, - "index": "index2", - "allocation_id": { - "id": "GhBM4mIdTAG-IVjGYFazkQ" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 4, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "5": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 4, - "index": "index2", - "allocation_id": { - "id": "GhBM4mIdTAG-IVjGYFazkQ" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 4, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ] - } - }, - "index1": { - "shards": { - "0": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 0, - "index": "index1", - "allocation_id": { - "id": "WFVdvk1eQrmOfemq6UoBIw" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 0, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "1": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 1, - "index": "index1", - "allocation_id": { - "id": "_ASJYn1bRO2MnCN0HKH5BA" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 1, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "2": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 2, - "index": "index1", - "allocation_id": { - "id": "o5kBd295ReKi2g4g1bpjyA" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 2, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "3": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 3, - "index": "index1", - "allocation_id": { - "id": "orpHABU0S8eJ0Nd82U_SQA" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 3, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "4": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 4, - "index": "index1", - "allocation_id": { - "id": "6I6OQ1QfTgCvHigkIdmuPA" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 4, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ] - } - } - } - }, - "routing_nodes": { - "unassigned": [ - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 2, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 1, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 4, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 3, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 0, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 2, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 1, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 4, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 3, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 0, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "nodes": { - "ejy2E2sMTg6nqnjhF9KfsQ": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 2, - "index": "index2", - "allocation_id": { - "id": "4UZfdxQeT7CMUxI9Fl5tYA" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 1, - "index": "index2", - "allocation_id": { - "id": "sNsOyQBnSdKQuFETNtRYng" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 4, - "index": "index2", - "allocation_id": { - "id": "GhBM4mIdTAG-IVjGYFazkQ" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 3, - "index": "index2", - "allocation_id": { - "id": "70TzfLRxQ_KL-tT81-QO4w" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 0, - "index": "index2", - "allocation_id": { - "id": "gbBnb3KFQOyXHl3eaVV6nA" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 2, - "index": "index1", - "allocation_id": { - "id": "o5kBd295ReKi2g4g1bpjyA" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 1, - "index": "index1", - "allocation_id": { - "id": "_ASJYn1bRO2MnCN0HKH5BA" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 4, - "index": "index1", - "allocation_id": { - "id": "6I6OQ1QfTgCvHigkIdmuPA" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 3, - "index": "index1", - "allocation_id": { - "id": "orpHABU0S8eJ0Nd82U_SQA" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 0, - "index": "index1", - "allocation_id": { - "id": "WFVdvk1eQrmOfemq6UoBIw" - } - } - ] - } - } - } diff --git a/fe/src/test/resources/data/es/clusterstate2.json b/fe/src/test/resources/data/es/clusterstate2.json deleted file mode 100644 index a743c05..0000000 --- a/fe/src/test/resources/data/es/clusterstate2.json +++ /dev/null @@ -1,722 +0,0 @@ -{ - "cluster_name": "elasticsearch", - "version": 28, - "state_uuid": "C6WNazFPSPyZcQlE-cNw1g", - "master_node": "ejy2E2sMTg6nqnjhF9KfsQ", - "blocks": {}, - "nodes": { - "ejy2E2sMTg6nqnjhF9KfsQ": { - "name": "ejy2E2s", - "ephemeral_id": "HO-_F6BLSqedHuv7-yhkNQ", - "transport_address": "192.168.0.1:9209", - "attributes": { - "thrift_port": "9210" - } - } - }, - "metadata": { - "cluster_uuid": "_na_", - "templates": {}, - "indices": { - "index2": { - "state": "open", - "settings": { - "index": { - "bpack": { - "partition": { - "upperbound": "2018" - } - }, - "number_of_shards": "5", - "provided_name": "index2", - "creation_date": "1539592090322", - "number_of_replicas": "1", - "uuid": "T-Kg83WaTOSIXmiO0ZANzg", - "version": { - "created": "5050099" - } - } - }, - "mappings": {}, - "aliases": [ - "indexa" - ], - "primary_terms": { - "0": 1, - "1": 1, - "2": 1, - "3": 1, - "4": 1 - }, - "in_sync_allocations": { - "0": [ - "gbBnb3KFQOyXHl3eaVV6nA" - ], - "1": [ - "sNsOyQBnSdKQuFETNtRYng" - ], - "2": [ - "4UZfdxQeT7CMUxI9Fl5tYA" - ], - "3": [ - "70TzfLRxQ_KL-tT81-QO4w" - ], - "4": [ - "GhBM4mIdTAG-IVjGYFazkQ" - ] - } - }, - "index1": { - "state": "open", - "settings": { - "index": { - "bpack": { - "partition": { - "upperbound": "2018-10-01" - } - }, - "number_of_shards": "5", - "provided_name": "index1", - "creation_date": "1539592085059", - "number_of_replicas": "1", - "uuid": "hjbl6RxaTyCYFfAJwaSjCA", - "version": { - "created": "5050099" - } - } - }, - "mappings": {}, - "aliases": [ - "indexa" - ], - "primary_terms": { - "0": 1, - "1": 1, - "2": 1, - "3": 1, - "4": 1 - }, - "in_sync_allocations": { - "0": [ - "WFVdvk1eQrmOfemq6UoBIw" - ], - "1": [ - "_ASJYn1bRO2MnCN0HKH5BA" - ], - "2": [ - "o5kBd295ReKi2g4g1bpjyA" - ], - "3": [ - "orpHABU0S8eJ0Nd82U_SQA" - ], - "4": [ - "6I6OQ1QfTgCvHigkIdmuPA" - ] - } - } - }, - "index-graveyard": { - "tombstones": [] - } - }, - "routing_table": { - "indices": { - "index2": { - "shards": { - "0": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 0, - "index": "index2", - "allocation_id": { - "id": "gbBnb3KFQOyXHl3eaVV6nA" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 0, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "1": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 1, - "index": "index2", - "allocation_id": { - "id": "sNsOyQBnSdKQuFETNtRYng" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 1, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "2": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 2, - "index": "index2", - "allocation_id": { - "id": "4UZfdxQeT7CMUxI9Fl5tYA" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 2, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "3": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 3, - "index": "index2", - "allocation_id": { - "id": "70TzfLRxQ_KL-tT81-QO4w" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 3, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "4": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 4, - "index": "index2", - "allocation_id": { - "id": "GhBM4mIdTAG-IVjGYFazkQ" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 4, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ] - } - }, - "index1": { - "shards": { - "0": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 0, - "index": "index1", - "allocation_id": { - "id": "WFVdvk1eQrmOfemq6UoBIw" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 0, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "1": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 1, - "index": "index1", - "allocation_id": { - "id": "_ASJYn1bRO2MnCN0HKH5BA" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 1, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "2": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 2, - "index": "index1", - "allocation_id": { - "id": "o5kBd295ReKi2g4g1bpjyA" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 2, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "3": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 3, - "index": "index1", - "allocation_id": { - "id": "orpHABU0S8eJ0Nd82U_SQA" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 3, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "4": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 4, - "index": "index1", - "allocation_id": { - "id": "6I6OQ1QfTgCvHigkIdmuPA" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 4, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ] - } - } - } - }, - "routing_nodes": { - "unassigned": [ - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 2, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 1, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 4, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 3, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 0, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 2, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 1, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 4, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 3, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 0, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "nodes": { - "ejy2E2sMTg6nqnjhF9KfsQ": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 2, - "index": "index2", - "allocation_id": { - "id": "4UZfdxQeT7CMUxI9Fl5tYA" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 1, - "index": "index2", - "allocation_id": { - "id": "sNsOyQBnSdKQuFETNtRYng" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 4, - "index": "index2", - "allocation_id": { - "id": "GhBM4mIdTAG-IVjGYFazkQ" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 3, - "index": "index2", - "allocation_id": { - "id": "70TzfLRxQ_KL-tT81-QO4w" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 0, - "index": "index2", - "allocation_id": { - "id": "gbBnb3KFQOyXHl3eaVV6nA" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 2, - "index": "index1", - "allocation_id": { - "id": "o5kBd295ReKi2g4g1bpjyA" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 1, - "index": "index1", - "allocation_id": { - "id": "_ASJYn1bRO2MnCN0HKH5BA" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 4, - "index": "index1", - "allocation_id": { - "id": "6I6OQ1QfTgCvHigkIdmuPA" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 3, - "index": "index1", - "allocation_id": { - "id": "orpHABU0S8eJ0Nd82U_SQA" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 0, - "index": "index1", - "allocation_id": { - "id": "WFVdvk1eQrmOfemq6UoBIw" - } - } - ] - } - } - } diff --git a/fe/src/test/resources/data/es/clusterstate3.json b/fe/src/test/resources/data/es/clusterstate3.json deleted file mode 100644 index 6a0bdd1..0000000 --- a/fe/src/test/resources/data/es/clusterstate3.json +++ /dev/null @@ -1,747 +0,0 @@ -{ - "cluster_name": "elasticsearch", - "version": 28, - "state_uuid": "C6WNazFPSPyZcQlE-cNw1g", - "master_node": "ejy2E2sMTg6nqnjhF9KfsQ", - "blocks": {}, - "nodes": { - "ejy2E2sMTg6nqnjhF9KfsQ": { - "name": "ejy2E2s", - "ephemeral_id": "HO-_F6BLSqedHuv7-yhkNQ", - "transport_address": "192.168.0.1:9209", - "attributes": { - "thrift_port": "9210" - } - } - }, - "metadata": { - "cluster_uuid": "_na_", - "templates": {}, - "indices": { - "index2": { - "state": "open", - "settings": { - "index": { - "number_of_shards": "5", - "provided_name": "index2", - "creation_date": "1539592090322", - "number_of_replicas": "1", - "uuid": "T-Kg83WaTOSIXmiO0ZANzg", - "version": { - "created": "5050099" - } - } - }, - "mappings": {}, - "aliases": [ - "indexa" - ], - "primary_terms": { - "0": 1, - "1": 1, - "2": 1, - "3": 1, - "4": 1 - }, - "in_sync_allocations": { - "0": [ - "gbBnb3KFQOyXHl3eaVV6nA" - ], - "1": [ - "sNsOyQBnSdKQuFETNtRYng" - ], - "2": [ - "4UZfdxQeT7CMUxI9Fl5tYA" - ], - "3": [ - "70TzfLRxQ_KL-tT81-QO4w" - ], - "4": [ - "GhBM4mIdTAG-IVjGYFazkQ" - ] - } - }, - "index1": { - "state": "open", - "settings": { - "index": { - "bpack": { - "partition": { - "upperbound": "2018-10-01" - } - }, - "number_of_shards": "5", - "provided_name": "index1", - "creation_date": "1539592085059", - "number_of_replicas": "1", - "uuid": "hjbl6RxaTyCYFfAJwaSjCA", - "version": { - "created": "5050099" - } - } - }, - "mappings": {}, - "aliases": [ - "indexa" - ], - "primary_terms": { - "0": 1, - "1": 1, - "2": 1, - "3": 1, - "4": 1 - }, - "in_sync_allocations": { - "0": [ - "WFVdvk1eQrmOfemq6UoBIw" - ], - "1": [ - "_ASJYn1bRO2MnCN0HKH5BA" - ], - "2": [ - "o5kBd295ReKi2g4g1bpjyA" - ], - "3": [ - "orpHABU0S8eJ0Nd82U_SQA" - ], - "4": [ - "6I6OQ1QfTgCvHigkIdmuPA" - ] - } - } - }, - "index-graveyard": { - "tombstones": [] - } - }, - "routing_table": { - "indices": { - "index2": { - "shards": { - "0": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 0, - "index": "index2", - "allocation_id": { - "id": "gbBnb3KFQOyXHl3eaVV6nA" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 0, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "1": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 1, - "index": "index2", - "allocation_id": { - "id": "sNsOyQBnSdKQuFETNtRYng" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 1, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "2": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 2, - "index": "index2", - "allocation_id": { - "id": "4UZfdxQeT7CMUxI9Fl5tYA" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 2, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "3": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 3, - "index": "index2", - "allocation_id": { - "id": "70TzfLRxQ_KL-tT81-QO4w" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 3, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "4": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 4, - "index": "index2", - "allocation_id": { - "id": "GhBM4mIdTAG-IVjGYFazkQ" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 4, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "5": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 4, - "index": "index2", - "allocation_id": { - "id": "GhBM4mIdTAG-IVjGYFazkQ" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 4, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ] - } - }, - "index1": { - "shards": { - "0": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 0, - "index": "index1", - "allocation_id": { - "id": "WFVdvk1eQrmOfemq6UoBIw" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 0, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "1": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 1, - "index": "index1", - "allocation_id": { - "id": "_ASJYn1bRO2MnCN0HKH5BA" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 1, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "2": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 2, - "index": "index1", - "allocation_id": { - "id": "o5kBd295ReKi2g4g1bpjyA" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 2, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "3": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 3, - "index": "index1", - "allocation_id": { - "id": "orpHABU0S8eJ0Nd82U_SQA" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 3, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "4": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 4, - "index": "index1", - "allocation_id": { - "id": "6I6OQ1QfTgCvHigkIdmuPA" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 4, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ] - } - } - } - }, - "routing_nodes": { - "unassigned": [ - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 2, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 1, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 4, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 3, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 0, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 2, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 1, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 4, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 3, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 0, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "nodes": { - "ejy2E2sMTg6nqnjhF9KfsQ": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 2, - "index": "index2", - "allocation_id": { - "id": "4UZfdxQeT7CMUxI9Fl5tYA" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 1, - "index": "index2", - "allocation_id": { - "id": "sNsOyQBnSdKQuFETNtRYng" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 4, - "index": "index2", - "allocation_id": { - "id": "GhBM4mIdTAG-IVjGYFazkQ" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 3, - "index": "index2", - "allocation_id": { - "id": "70TzfLRxQ_KL-tT81-QO4w" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 0, - "index": "index2", - "allocation_id": { - "id": "gbBnb3KFQOyXHl3eaVV6nA" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 2, - "index": "index1", - "allocation_id": { - "id": "o5kBd295ReKi2g4g1bpjyA" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 1, - "index": "index1", - "allocation_id": { - "id": "_ASJYn1bRO2MnCN0HKH5BA" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 4, - "index": "index1", - "allocation_id": { - "id": "6I6OQ1QfTgCvHigkIdmuPA" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 3, - "index": "index1", - "allocation_id": { - "id": "orpHABU0S8eJ0Nd82U_SQA" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 0, - "index": "index1", - "allocation_id": { - "id": "WFVdvk1eQrmOfemq6UoBIw" - } - } - ] - } - } - } diff --git a/fe/src/test/resources/data/es/clusterstate4.json b/fe/src/test/resources/data/es/clusterstate4.json deleted file mode 100644 index 6a0bdd1..0000000 --- a/fe/src/test/resources/data/es/clusterstate4.json +++ /dev/null @@ -1,747 +0,0 @@ -{ - "cluster_name": "elasticsearch", - "version": 28, - "state_uuid": "C6WNazFPSPyZcQlE-cNw1g", - "master_node": "ejy2E2sMTg6nqnjhF9KfsQ", - "blocks": {}, - "nodes": { - "ejy2E2sMTg6nqnjhF9KfsQ": { - "name": "ejy2E2s", - "ephemeral_id": "HO-_F6BLSqedHuv7-yhkNQ", - "transport_address": "192.168.0.1:9209", - "attributes": { - "thrift_port": "9210" - } - } - }, - "metadata": { - "cluster_uuid": "_na_", - "templates": {}, - "indices": { - "index2": { - "state": "open", - "settings": { - "index": { - "number_of_shards": "5", - "provided_name": "index2", - "creation_date": "1539592090322", - "number_of_replicas": "1", - "uuid": "T-Kg83WaTOSIXmiO0ZANzg", - "version": { - "created": "5050099" - } - } - }, - "mappings": {}, - "aliases": [ - "indexa" - ], - "primary_terms": { - "0": 1, - "1": 1, - "2": 1, - "3": 1, - "4": 1 - }, - "in_sync_allocations": { - "0": [ - "gbBnb3KFQOyXHl3eaVV6nA" - ], - "1": [ - "sNsOyQBnSdKQuFETNtRYng" - ], - "2": [ - "4UZfdxQeT7CMUxI9Fl5tYA" - ], - "3": [ - "70TzfLRxQ_KL-tT81-QO4w" - ], - "4": [ - "GhBM4mIdTAG-IVjGYFazkQ" - ] - } - }, - "index1": { - "state": "open", - "settings": { - "index": { - "bpack": { - "partition": { - "upperbound": "2018-10-01" - } - }, - "number_of_shards": "5", - "provided_name": "index1", - "creation_date": "1539592085059", - "number_of_replicas": "1", - "uuid": "hjbl6RxaTyCYFfAJwaSjCA", - "version": { - "created": "5050099" - } - } - }, - "mappings": {}, - "aliases": [ - "indexa" - ], - "primary_terms": { - "0": 1, - "1": 1, - "2": 1, - "3": 1, - "4": 1 - }, - "in_sync_allocations": { - "0": [ - "WFVdvk1eQrmOfemq6UoBIw" - ], - "1": [ - "_ASJYn1bRO2MnCN0HKH5BA" - ], - "2": [ - "o5kBd295ReKi2g4g1bpjyA" - ], - "3": [ - "orpHABU0S8eJ0Nd82U_SQA" - ], - "4": [ - "6I6OQ1QfTgCvHigkIdmuPA" - ] - } - } - }, - "index-graveyard": { - "tombstones": [] - } - }, - "routing_table": { - "indices": { - "index2": { - "shards": { - "0": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 0, - "index": "index2", - "allocation_id": { - "id": "gbBnb3KFQOyXHl3eaVV6nA" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 0, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "1": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 1, - "index": "index2", - "allocation_id": { - "id": "sNsOyQBnSdKQuFETNtRYng" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 1, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "2": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 2, - "index": "index2", - "allocation_id": { - "id": "4UZfdxQeT7CMUxI9Fl5tYA" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 2, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "3": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 3, - "index": "index2", - "allocation_id": { - "id": "70TzfLRxQ_KL-tT81-QO4w" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 3, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "4": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 4, - "index": "index2", - "allocation_id": { - "id": "GhBM4mIdTAG-IVjGYFazkQ" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 4, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "5": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 4, - "index": "index2", - "allocation_id": { - "id": "GhBM4mIdTAG-IVjGYFazkQ" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 4, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ] - } - }, - "index1": { - "shards": { - "0": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 0, - "index": "index1", - "allocation_id": { - "id": "WFVdvk1eQrmOfemq6UoBIw" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 0, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "1": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 1, - "index": "index1", - "allocation_id": { - "id": "_ASJYn1bRO2MnCN0HKH5BA" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 1, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "2": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 2, - "index": "index1", - "allocation_id": { - "id": "o5kBd295ReKi2g4g1bpjyA" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 2, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "3": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 3, - "index": "index1", - "allocation_id": { - "id": "orpHABU0S8eJ0Nd82U_SQA" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 3, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "4": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 4, - "index": "index1", - "allocation_id": { - "id": "6I6OQ1QfTgCvHigkIdmuPA" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 4, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ] - } - } - } - }, - "routing_nodes": { - "unassigned": [ - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 2, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 1, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 4, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 3, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 0, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 2, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 1, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 4, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 3, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 0, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "nodes": { - "ejy2E2sMTg6nqnjhF9KfsQ": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 2, - "index": "index2", - "allocation_id": { - "id": "4UZfdxQeT7CMUxI9Fl5tYA" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 1, - "index": "index2", - "allocation_id": { - "id": "sNsOyQBnSdKQuFETNtRYng" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 4, - "index": "index2", - "allocation_id": { - "id": "GhBM4mIdTAG-IVjGYFazkQ" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 3, - "index": "index2", - "allocation_id": { - "id": "70TzfLRxQ_KL-tT81-QO4w" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 0, - "index": "index2", - "allocation_id": { - "id": "gbBnb3KFQOyXHl3eaVV6nA" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 2, - "index": "index1", - "allocation_id": { - "id": "o5kBd295ReKi2g4g1bpjyA" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 1, - "index": "index1", - "allocation_id": { - "id": "_ASJYn1bRO2MnCN0HKH5BA" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 4, - "index": "index1", - "allocation_id": { - "id": "6I6OQ1QfTgCvHigkIdmuPA" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 3, - "index": "index1", - "allocation_id": { - "id": "orpHABU0S8eJ0Nd82U_SQA" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 0, - "index": "index1", - "allocation_id": { - "id": "WFVdvk1eQrmOfemq6UoBIw" - } - } - ] - } - } - } diff --git a/fe/src/test/resources/data/es/clusterstate5.json b/fe/src/test/resources/data/es/clusterstate5.json deleted file mode 100644 index 8c110ad..0000000 --- a/fe/src/test/resources/data/es/clusterstate5.json +++ /dev/null @@ -1,751 +0,0 @@ -{ - "cluster_name": "elasticsearch", - "version": 28, - "state_uuid": "C6WNazFPSPyZcQlE-cNw1g", - "master_node": "ejy2E2sMTg6nqnjhF9KfsQ", - "blocks": {}, - "nodes": { - "ejy2E2sMTg6nqnjhF9KfsQ": { - "name": "ejy2E2s", - "ephemeral_id": "HO-_F6BLSqedHuv7-yhkNQ", - "transport_address": "192.168.0.1:9209", - "attributes": { - } - } - }, - "metadata": { - "cluster_uuid": "_na_", - "templates": {}, - "indices": { - "index2": { - "state": "open", - "settings": { - "index": { - "bpack": { - "partition": { - "upperbound": "2018-10-02" - } - }, - "number_of_shards": "5", - "provided_name": "index2", - "creation_date": "1539592090322", - "number_of_replicas": "1", - "uuid": "T-Kg83WaTOSIXmiO0ZANzg", - "version": { - "created": "5050099" - } - } - }, - "mappings": {}, - "aliases": [ - "indexa" - ], - "primary_terms": { - "0": 1, - "1": 1, - "2": 1, - "3": 1, - "4": 1 - }, - "in_sync_allocations": { - "0": [ - "gbBnb3KFQOyXHl3eaVV6nA" - ], - "1": [ - "sNsOyQBnSdKQuFETNtRYng" - ], - "2": [ - "4UZfdxQeT7CMUxI9Fl5tYA" - ], - "3": [ - "70TzfLRxQ_KL-tT81-QO4w" - ], - "4": [ - "GhBM4mIdTAG-IVjGYFazkQ" - ] - } - }, - "index1": { - "state": "open", - "settings": { - "index": { - "bpack": { - "partition": { - "upperbound": "2018-10-01" - } - }, - "number_of_shards": "5", - "provided_name": "index1", - "creation_date": "1539592085059", - "number_of_replicas": "1", - "uuid": "hjbl6RxaTyCYFfAJwaSjCA", - "version": { - "created": "5050099" - } - } - }, - "mappings": {}, - "aliases": [ - "indexa" - ], - "primary_terms": { - "0": 1, - "1": 1, - "2": 1, - "3": 1, - "4": 1 - }, - "in_sync_allocations": { - "0": [ - "WFVdvk1eQrmOfemq6UoBIw" - ], - "1": [ - "_ASJYn1bRO2MnCN0HKH5BA" - ], - "2": [ - "o5kBd295ReKi2g4g1bpjyA" - ], - "3": [ - "orpHABU0S8eJ0Nd82U_SQA" - ], - "4": [ - "6I6OQ1QfTgCvHigkIdmuPA" - ] - } - } - }, - "index-graveyard": { - "tombstones": [] - } - }, - "routing_table": { - "indices": { - "index2": { - "shards": { - "0": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 0, - "index": "index2", - "allocation_id": { - "id": "gbBnb3KFQOyXHl3eaVV6nA" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 0, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "1": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 1, - "index": "index2", - "allocation_id": { - "id": "sNsOyQBnSdKQuFETNtRYng" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 1, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "2": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 2, - "index": "index2", - "allocation_id": { - "id": "4UZfdxQeT7CMUxI9Fl5tYA" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 2, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "3": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 3, - "index": "index2", - "allocation_id": { - "id": "70TzfLRxQ_KL-tT81-QO4w" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 3, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "4": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 4, - "index": "index2", - "allocation_id": { - "id": "GhBM4mIdTAG-IVjGYFazkQ" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 4, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "5": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 4, - "index": "index2", - "allocation_id": { - "id": "GhBM4mIdTAG-IVjGYFazkQ" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 4, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ] - } - }, - "index1": { - "shards": { - "0": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 0, - "index": "index1", - "allocation_id": { - "id": "WFVdvk1eQrmOfemq6UoBIw" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 0, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "1": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 1, - "index": "index1", - "allocation_id": { - "id": "_ASJYn1bRO2MnCN0HKH5BA" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 1, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "2": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 2, - "index": "index1", - "allocation_id": { - "id": "o5kBd295ReKi2g4g1bpjyA" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 2, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "3": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 3, - "index": "index1", - "allocation_id": { - "id": "orpHABU0S8eJ0Nd82U_SQA" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 3, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "4": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 4, - "index": "index1", - "allocation_id": { - "id": "6I6OQ1QfTgCvHigkIdmuPA" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 4, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ] - } - } - } - }, - "routing_nodes": { - "unassigned": [ - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 2, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 1, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 4, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 3, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 0, - "index": "index2", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:10.325Z", - "delayed": false, - "allocation_status": "no_attempt" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 2, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 1, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 4, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 3, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - }, - { - "state": "UNASSIGNED", - "primary": false, - "node": null, - "relocating_node": null, - "shard": 0, - "index": "index1", - "recovery_source": { - "type": "PEER" - }, - "unassigned_info": { - "reason": "INDEX_CREATED", - "at": "2018-10-15T08:28:05.063Z", - "delayed": false, - "allocation_status": "no_attempt" - } - } - ], - "nodes": { - "ejy2E2sMTg6nqnjhF9KfsQ": [ - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 2, - "index": "index2", - "allocation_id": { - "id": "4UZfdxQeT7CMUxI9Fl5tYA" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 1, - "index": "index2", - "allocation_id": { - "id": "sNsOyQBnSdKQuFETNtRYng" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 4, - "index": "index2", - "allocation_id": { - "id": "GhBM4mIdTAG-IVjGYFazkQ" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 3, - "index": "index2", - "allocation_id": { - "id": "70TzfLRxQ_KL-tT81-QO4w" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 0, - "index": "index2", - "allocation_id": { - "id": "gbBnb3KFQOyXHl3eaVV6nA" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 2, - "index": "index1", - "allocation_id": { - "id": "o5kBd295ReKi2g4g1bpjyA" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 1, - "index": "index1", - "allocation_id": { - "id": "_ASJYn1bRO2MnCN0HKH5BA" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 4, - "index": "index1", - "allocation_id": { - "id": "6I6OQ1QfTgCvHigkIdmuPA" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 3, - "index": "index1", - "allocation_id": { - "id": "orpHABU0S8eJ0Nd82U_SQA" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "ejy2E2sMTg6nqnjhF9KfsQ", - "relocating_node": null, - "shard": 0, - "index": "index1", - "allocation_id": { - "id": "WFVdvk1eQrmOfemq6UoBIw" - } - } - ] - } - } - } diff --git a/fe/src/test/resources/data/es/search_shards.json b/fe/src/test/resources/data/es/search_shards.json deleted file mode 100644 index 0a0446c..0000000 --- a/fe/src/test/resources/data/es/search_shards.json +++ /dev/null @@ -1,213 +0,0 @@ -{ - "nodes": { - "yoBi15gPSFe7BKDDOhI-0g": { - "name": "test239-9220-9320", - "ephemeral_id": "Th56FehQT36Zda2l0FQewg", - "transport_address": "192.168.0.1:9320", - "attributes": { - "disk": "hdd", - "ml.max_open_jobs": "10", - "ml.enabled": "true" - } - }, - "PTrurLShRN6POIuNe8WnFg": { - "name": "test057-29210-29310", - "ephemeral_id": "KyIWi165QVa9sqHYvjeJxw", - "transport_address": "192.168.0.1:29310", - "attributes": { - "disk": "hdd", - "ml.max_open_jobs": "10", - "ml.enabled": "true" - } - }, - "7mjpC74LQkGEgcGks3-dYQ": { - "name": "test239-9230-9330", - "ephemeral_id": "g821RcAARpy3hIOnboqnHA", - "transport_address": "192.168.0.1:9330", - "attributes": { - "disk": "hdd", - "ml.max_open_jobs": "10", - "ml.enabled": "true" - } - }, - "_DigEpF0SPmV32lPTzZ_QA": { - "name": "test240-9210-9310", - "ephemeral_id": "sgKUhJ59QuyzUvKXxNnzww", - "transport_address": "192.168.0.1:9310", - "attributes": { - "disk": "hdd", - "ml.max_open_jobs": "10", - "ml.enabled": "true" - } - }, - "zMH8NhsdTy63mnTeNgGILw": { - "name": "test240-9230-9330", - "ephemeral_id": "OEvljKbCSPaQpU3SPavBvQ", - "transport_address": "192.168.0.1:9330", - "attributes": { - "disk": "hdd", - "ml.max_open_jobs": "10", - "ml.enabled": "true" - } - }, - "5D_18rKKRzOnAlnbZUdSRw": { - "name": "test239-9210-9310", - "ephemeral_id": "ECEwuqcvTY-qAlT5OcWz2Q", - "transport_address": "192.168.0.1:9310", - "attributes": { - "disk": "hdd", - "ml.max_open_jobs": "10", - "ml.enabled": "true" - } - }, - "8F5Wip4-Qb6og3jhepn5sg": { - "name": "test058-29210-29310", - "ephemeral_id": "QU24dPM_T-S-OPGoDH9VGA", - "transport_address": "192.168.0.1:29310", - "attributes": { - "disk": "hdd", - "ml.max_open_jobs": "10", - "ml.enabled": "true" - } - }, - "7k1HfDdMQ1G8Ob4vUDRl1Q": { - "name": "test240-9220-9320", - "ephemeral_id": "IzSWsgStRriKFdYvBz9hNw", - "transport_address": "192.168.0.1:9320", - "attributes": { - "disk": "hdd", - "ml.max_open_jobs": "10", - "ml.enabled": "true" - } - } - }, - "indices": { - "indexa_2020.05.02": { - "aliases": [ - "indexa" - ] - } - }, - "shards": [ - [ - { - "state": "STARTED", - "primary": true, - "node": "7mjpC74LQkGEgcGks3-dYQ", - "relocating_node": null, - "shard": 0, - "index": "indexa_2020.05.02", - "allocation_id": { - "id": "Q77NsOEYR0SlzOSOQsyixQ" - } - }, - { - "state": "STARTED", - "primary": false, - "node": "8F5Wip4-Qb6og3jhepn5sg", - "relocating_node": null, - "shard": 0, - "index": "indexa_2020.05.02", - "allocation_id": { - "id": "nKsg32sPSyinydeaRyUA8w" - } - } - ], - [ - { - "state": "STARTED", - "primary": false, - "node": "_DigEpF0SPmV32lPTzZ_QA", - "relocating_node": null, - "shard": 1, - "index": "indexa_2020.05.02", - "allocation_id": { - "id": "2L5soNwQTDaNz7EdxNV9yQ" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "yoBi15gPSFe7BKDDOhI-0g", - "relocating_node": null, - "shard": 1, - "index": "indexa_2020.05.02", - "allocation_id": { - "id": "FJKsGnYyRniK0BexSdJCiQ" - } - } - ], - [ - { - "state": "STARTED", - "primary": false, - "node": "zMH8NhsdTy63mnTeNgGILw", - "relocating_node": null, - "shard": 2, - "index": "indexa_2020.05.02", - "allocation_id": { - "id": "qyTTlZYCQ4y0hQPL5uLIaQ" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "5D_18rKKRzOnAlnbZUdSRw", - "relocating_node": null, - "shard": 2, - "index": "indexa_2020.05.02", - "allocation_id": { - "id": "SxFS7Vz_S-yxCCgsU4n52g" - } - } - ], - [ - { - "state": "STARTED", - "primary": false, - "node": "8F5Wip4-Qb6og3jhepn5sg", - "relocating_node": null, - "shard": 3, - "index": "indexa_2020.05.02", - "allocation_id": { - "id": "TL2QDmCLQCO51MCLAVmBOA" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "PTrurLShRN6POIuNe8WnFg", - "relocating_node": null, - "shard": 3, - "index": "indexa_2020.05.02", - "allocation_id": { - "id": "9Mvuikm_RomoWi7020F48A" - } - } - ], - [ - { - "state": "STARTED", - "primary": false, - "node": "7k1HfDdMQ1G8Ob4vUDRl1Q", - "relocating_node": null, - "shard": 4, - "index": "indexa_2020.05.02", - "allocation_id": { - "id": "aE4DvgpkQXut2FN-Skv-sw" - } - }, - { - "state": "STARTED", - "primary": true, - "node": "5D_18rKKRzOnAlnbZUdSRw", - "relocating_node": null, - "shard": 4, - "index": "indexa_2020.05.02", - "allocation_id": { - "id": "u8zHP-RwS1SiJD9ZXJL1yw" - } - } - ] - ] -} \ No newline at end of file diff --git a/fe/src/test/resources/data/es/test_index_mapping.json b/fe/src/test/resources/data/es/test_index_mapping.json new file mode 100644 index 0000000..297a7fb --- /dev/null +++ b/fe/src/test/resources/data/es/test_index_mapping.json @@ -0,0 +1,24 @@ +{ + "test": { + "mappings": { + "doc": { + "properties": { + "k1": { + "type": "long" + }, + "k2": { + "type": "keyword" + }, + "k3": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword" + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/fe/src/test/resources/data/es/test_index_mapping_after_7x.json b/fe/src/test/resources/data/es/test_index_mapping_after_7x.json new file mode 100644 index 0000000..d018360 --- /dev/null +++ b/fe/src/test/resources/data/es/test_index_mapping_after_7x.json @@ -0,0 +1,22 @@ +{ + "test": { + "mappings": { + "properties": { + "k1": { + "type": "long" + }, + "k2": { + "type": "keyword" + }, + "k3": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword" + } + } + } + } + } + } +} \ No newline at end of file diff --git a/fe/src/test/resources/data/es/test_main_info.json b/fe/src/test/resources/data/es/test_main_info.json new file mode 100644 index 0000000..3b2cdcd --- /dev/null +++ b/fe/src/test/resources/data/es/test_main_info.json @@ -0,0 +1,18 @@ +{ + "name": "cQ1QWte", + "cluster_name": "elasticsearch", + "cluster_uuid": "zukrJSFzR8ef9oyKrG4wSQ", + "version": { + "number": "6.5.3", + "baidu_version": "6.5.3.3", + "build_flavor": "default", + "build_type": "tar", + "build_hash": "5b5392ebacfbc1861405ecfc157cd687c647cb90", + "build_date": "06/10/2020 14:49:52:052 CST", + "build_snapshot": false, + "lucene_version": "7.5.0", + "minimum_wire_compatibility_version": "5.6.0", + "minimum_index_compatibility_version": "5.0.0" + }, + "tagline": "You Know, for Search" +} \ No newline at end of file diff --git a/fe/src/test/resources/data/es/test_nodes_http.json b/fe/src/test/resources/data/es/test_nodes_http.json new file mode 100644 index 0000000..cb95855 --- /dev/null +++ b/fe/src/test/resources/data/es/test_nodes_http.json @@ -0,0 +1,29 @@ +{ + "_nodes": { + "total": 1, + "successful": 1, + "failed": 0 + }, + "cluster_name": "elasticsearch", + "nodes": { + "node-A": { + "name": "node-A", + "transport_address": "10.0.0.1:9200", + "host": "10.0.4.1", + "ip": "10.0.4.1", + "version": "6.5.3", + "roles": [ + "master", + "data", + "ingest" + ], + "http": { + "bound_address": [ + "10.0.0.1:8200" + ], + "publish_address": "10.0.0.1:8200", + "max_content_length_in_bytes": 104857600 + } + } + } +} \ No newline at end of file diff --git a/fe/src/test/resources/data/es/test_search_shards.json b/fe/src/test/resources/data/es/test_search_shards.json new file mode 100644 index 0000000..8aab079 --- /dev/null +++ b/fe/src/test/resources/data/es/test_search_shards.json @@ -0,0 +1,80 @@ +{ + "nodes": { + "node-A": { + "name": "node", + "ephemeral_id": "node-A", + "transport_address": "10.0.0.1:9200", + "attributes": {} + } + }, + "indices": { + "doe": {} + }, + "shards": [ + [ + { + "state": "STARTED", + "primary": true, + "node": "node-A", + "relocating_node": null, + "shard": 0, + "index": "doe", + "allocation_id": { + "id": "doe-0" + } + } + ], + [ + { + "state": "STARTED", + "primary": true, + "node": "node-A", + "relocating_node": null, + "shard": 1, + "index": "doe", + "allocation_id": { + "id": "doe-1" + } + } + ], + [ + { + "state": "STARTED", + "primary": true, + "node": "node-A", + "relocating_node": null, + "shard": 2, + "index": "doe", + "allocation_id": { + "id": "doe-2" + } + } + ], + [ + { + "state": "STARTED", + "primary": true, + "node": "node-A", + "relocating_node": null, + "shard": 3, + "index": "doe", + "allocation_id": { + "id": "doe-3" + } + } + ], + [ + { + "state": "STARTED", + "primary": true, + "node": "node-A", + "relocating_node": null, + "shard": 4, + "index": "doe", + "allocation_id": { + "id": "doe-4" + } + } + ] + ] +} \ No newline at end of file --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org