From aa022ffa00f712788d2087f0d81585f1152e1113 Mon Sep 17 00:00:00 2001 From: kezhenxu94 Date: Wed, 4 Dec 2019 00:20:10 +0800 Subject: [PATCH] Remove unused ES7 config (#3998) --- apm-dist/src/main/assembly/application.yml | 1 - docs/en/setup/backend/backend-storage.md | 17 ++--------------- .../src/main/resources/application.yml | 4 ---- .../StorageModuleElasticsearch7Config.java | 9 --------- .../base/StorageEs7Installer.java | 13 ------------- 5 files changed, 2 insertions(+), 42 deletions(-) diff --git a/apm-dist/src/main/assembly/application.yml b/apm-dist/src/main/assembly/application.yml index e0b725794..828d15f4f 100644 --- a/apm-dist/src/main/assembly/application.yml +++ b/apm-dist/src/main/assembly/application.yml @@ -116,7 +116,6 @@ storage: # resultWindowMaxSize: ${SW_STORAGE_ES_QUERY_MAX_WINDOW_SIZE:10000} # metadataQueryMaxSize: ${SW_STORAGE_ES_QUERY_MAX_SIZE:5000} # segmentQueryMaxSize: ${SW_STORAGE_ES_QUERY_SEGMENT_SIZE:200} -# indexMaxResultWindow: ${SW_STORAGE_ES_INDEX_MAX_RESULT_WINDOW:5000} h2: driver: ${SW_STORAGE_H2_DRIVER:org.h2.jdbcx.JdbcDataSource} url: ${SW_STORAGE_H2_URL:jdbc:h2:mem:skywalking-oap-db} diff --git a/docs/en/setup/backend/backend-storage.md b/docs/en/setup/backend/backend-storage.md index 3b4150dd7..6693ca151 100644 --- a/docs/en/setup/backend/backend-storage.md +++ b/docs/en/setup/backend/backend-storage.md @@ -35,7 +35,7 @@ storage: - For ElasticSearch 6.3.2 ~ 7.0.0 (excluded), please download the `apache-skywalking-bin.tar.gz` or `apache-skywalking-bin.zip`, - For ElasticSearch 7.0.0 ~ 8.0.0 (excluded), please download the `apache-skywalking-bin-es7.tar.gz` or `apache-skywalking-bin-es7.zip`. -ElasticSearch 6 and ElasticSearch 7 share most of the configurations, as follows: +For now, ElasticSearch 6 and ElasticSearch 7 share the same configurations, as follows: Setting fragment example @@ -66,19 +66,6 @@ storage: advanced: ${SW_STORAGE_ES_ADVANCED:""} ``` -and there're also some configurations that are ES7 specific, as follows: - -```yaml -storage: - elasticsearch7: - # ... the configurations shared with ES6 that are listed above ... - - # Index max result window, for segment deep pagination, usually we don't recommend to scroll too many pages, - # instead, give more query criteria (e.g. service id or time range), to narrow the query results. - # see https://www.elastic.co/guide/en/elasticsearch/guide/current/pagination.html for more information - indexMaxResultWindow: ${SW_STORAGE_ES_INDEX_MAX_RESULT_WINDOW:5000} -``` - ### ElasticSearch 6 With Https SSL Encrypting communications. example: @@ -132,7 +119,7 @@ thread_pool.index.queue_size: 1000 # Only suitable for ElasticSearch 6 thread_pool.write.queue_size: 1000 # Suitable for ElasticSearch 6 and 7 # When you face query error at trace page, remember to check this. -index.max_result_window: 1000000 # Only suitable for ElasticSearch 6. For ES 7, set `indexMaxResultWindow` under `storage`-`elasticsearch7` section in application.yml +index.max_result_window: 1000000 ``` We strongly advice you to read more about these configurations from ElasticSearch official document. diff --git a/oap-server/server-bootstrap/src/main/resources/application.yml b/oap-server/server-bootstrap/src/main/resources/application.yml index 122f92534..52279ca8b 100755 --- a/oap-server/server-bootstrap/src/main/resources/application.yml +++ b/oap-server/server-bootstrap/src/main/resources/application.yml @@ -116,10 +116,6 @@ storage: resultWindowMaxSize: ${SW_STORAGE_ES_QUERY_MAX_WINDOW_SIZE:10000} metadataQueryMaxSize: ${SW_STORAGE_ES_QUERY_MAX_SIZE:5000} segmentQueryMaxSize: ${SW_STORAGE_ES_QUERY_SEGMENT_SIZE:200} - # Index max result window, for segment deep pagination, usually we don't recommend to scroll too many pages, - # instead, give more query criteria (e.g. service id or time range), to narrow the query results. - # see https://www.elastic.co/guide/en/elasticsearch/guide/current/pagination.html for more information - indexMaxResultWindow: ${SW_STORAGE_ES_INDEX_MAX_RESULT_WINDOW:5000} advanced: ${SW_STORAGE_ES_ADVANCED:""} # h2: # driver: ${SW_STORAGE_H2_DRIVER:org.h2.jdbcx.JdbcDataSource} diff --git a/oap-server/server-storage-plugin/storage-elasticsearch7-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch7/StorageModuleElasticsearch7Config.java b/oap-server/server-storage-plugin/storage-elasticsearch7-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch7/StorageModuleElasticsearch7Config.java index 9999ea3da..40fbf4dce 100644 --- a/oap-server/server-storage-plugin/storage-elasticsearch7-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch7/StorageModuleElasticsearch7Config.java +++ b/oap-server/server-storage-plugin/storage-elasticsearch7-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch7/StorageModuleElasticsearch7Config.java @@ -24,13 +24,4 @@ import org.apache.skywalking.oap.server.storage.plugin.elasticsearch.StorageModu * @author kezhenxu94 */ public class StorageModuleElasticsearch7Config extends StorageModuleElasticsearchConfig { - private int indexMaxResultWindow; - - public int getIndexMaxResultWindow() { - return indexMaxResultWindow; - } - - public void setIndexMaxResultWindow(final int indexMaxResultWindow) { - this.indexMaxResultWindow = indexMaxResultWindow; - } } diff --git a/oap-server/server-storage-plugin/storage-elasticsearch7-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch7/base/StorageEs7Installer.java b/oap-server/server-storage-plugin/storage-elasticsearch7-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch7/base/StorageEs7Installer.java index 6b8a8a0e7..beda8a0e2 100644 --- a/oap-server/server-storage-plugin/storage-elasticsearch7-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch7/base/StorageEs7Installer.java +++ b/oap-server/server-storage-plugin/storage-elasticsearch7-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch7/base/StorageEs7Installer.java @@ -34,12 +34,9 @@ public class StorageEs7Installer extends StorageEsInstaller { private static final Logger logger = LoggerFactory.getLogger(StorageEs7Installer.class); - private final StorageModuleElasticsearch7Config config; - public StorageEs7Installer(final ModuleManager moduleManager, final StorageModuleElasticsearch7Config config) { super(moduleManager, config); - this.config = config; } @SuppressWarnings("unchecked") @@ -52,14 +49,4 @@ public class StorageEs7Installer extends StorageEsInstaller { return mapping; } - - protected Map createSetting(boolean record) { - Map setting = super.createSetting(record); - - if (config.getIndexMaxResultWindow() > 0) { - setting.put("index.max_result_window", config.getIndexMaxResultWindow()); - } - - return setting; - } }