You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ta...@apache.org on 2019/04/26 14:39:57 UTC

[skywalking] branch span_query_max_zie updated: refactoring segmentQueryMaxSize.

This is an automated email from the ASF dual-hosted git repository.

tanjian pushed a commit to branch span_query_max_zie
in repository https://gitbox.apache.org/repos/asf/skywalking.git


The following commit(s) were added to refs/heads/span_query_max_zie by this push:
     new aa4cab2  refactoring segmentQueryMaxSize.
aa4cab2 is described below

commit aa4cab2cd95c82074a5610eaaf0dff23f211d4b3
Author: Jared.Tan <ji...@daocloud.io>
AuthorDate: Fri Apr 26 22:39:09 2019 +0800

    refactoring segmentQueryMaxSize.
---
 docker/config/application.yml                                  |  2 +-
 oap-server/server-starter/src/main/assembly/application.yml    |  2 +-
 oap-server/server-starter/src/main/resources/application.yml   |  2 +-
 .../plugin/elasticsearch/StorageModuleElasticsearchConfig.java | 10 +++++-----
 .../storage/plugin/elasticsearch/query/TraceQueryEsDAO.java    |  8 ++++----
 5 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/docker/config/application.yml b/docker/config/application.yml
index 3143616..44d79be 100644
--- a/docker/config/application.yml
+++ b/docker/config/application.yml
@@ -68,7 +68,7 @@ storage:
     flushInterval: ${SW_STORAGE_ES_FLUSH_INTERVAL:10} # flush the bulk every 10 seconds whatever the number of requests
     concurrentRequests: ${SW_STORAGE_ES_CONCURRENT_REQUESTS:2} # the number of concurrent requests
     metadataQueryMaxSize: ${SW_STORAGE_ES_QUERY_MAX_SIZE:5000}
-    spanQueryMaxSize: ${SW_QUERY_GRAPHQL_SPAN_SIZE:200}
+    segmentQueryMaxSize: ${SW_QUERY_GRAPHQL_SEGMENT_SIZE:200}
 #  h2:
 #    driver: ${SW_STORAGE_H2_DRIVER:org.h2.jdbcx.JdbcDataSource}
 #    url: ${SW_STORAGE_H2_URL:jdbc:h2:mem:skywalking-oap-db}
diff --git a/oap-server/server-starter/src/main/assembly/application.yml b/oap-server/server-starter/src/main/assembly/application.yml
index 971809a..5b09ff6 100644
--- a/oap-server/server-starter/src/main/assembly/application.yml
+++ b/oap-server/server-starter/src/main/assembly/application.yml
@@ -68,7 +68,7 @@ storage:
 #    flushInterval: ${SW_STORAGE_ES_FLUSH_INTERVAL:10} # flush the bulk every 10 seconds whatever the number of requests
 #    concurrentRequests: ${SW_STORAGE_ES_CONCURRENT_REQUESTS:2} # the number of concurrent requests
 #    metadataQueryMaxSize: ${SW_STORAGE_ES_QUERY_MAX_SIZE:5000}
-#    spanQueryMaxSize: ${SW_QUERY_GRAPHQL_SPAN_SIZE:200}
+#    segmentQueryMaxSize: ${SW_QUERY_GRAPHQL_SEGMENT_SIZE:200}
   h2:
     driver: ${SW_STORAGE_H2_DRIVER:org.h2.jdbcx.JdbcDataSource}
     url: ${SW_STORAGE_H2_URL:jdbc:h2:mem:skywalking-oap-db}
diff --git a/oap-server/server-starter/src/main/resources/application.yml b/oap-server/server-starter/src/main/resources/application.yml
index 2a2fbfe..ed60ef2 100644
--- a/oap-server/server-starter/src/main/resources/application.yml
+++ b/oap-server/server-starter/src/main/resources/application.yml
@@ -68,7 +68,7 @@ storage:
     flushInterval: ${SW_STORAGE_ES_FLUSH_INTERVAL:10} # flush the bulk every 10 seconds whatever the number of requests
     concurrentRequests: ${SW_STORAGE_ES_CONCURRENT_REQUESTS:2} # the number of concurrent requests
     metadataQueryMaxSize: ${SW_STORAGE_ES_QUERY_MAX_SIZE:5000}
-    spanQueryMaxSize: ${SW_QUERY_GRAPHQL_SPAN_SIZE:200}
+    segmentQueryMaxSize: ${SW_QUERY_GRAPHQL_SEGMENT_SIZE:200}
 #  h2:
 #    driver: ${SW_STORAGE_H2_DRIVER:org.h2.jdbcx.JdbcDataSource}
 #    url: ${SW_STORAGE_H2_URL:jdbc:h2:mem:skywalking-oap-db}
diff --git a/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/StorageModuleElasticsearchConfig.java b/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/StorageModuleElasticsearchConfig.java
index d1b86bd..f7259a9 100644
--- a/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/StorageModuleElasticsearchConfig.java
+++ b/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/StorageModuleElasticsearchConfig.java
@@ -44,7 +44,7 @@ public class StorageModuleElasticsearchConfig extends ModuleConfig {
     private String user;
     private String password;
     private int metadataQueryMaxSize = 5000;
-    private int spanQueryMaxSize = 200;
+    private int maxQuerySegmentSize = 200;
 
     public String getUser() {
         return user;
@@ -166,11 +166,11 @@ public class StorageModuleElasticsearchConfig extends ModuleConfig {
         this.metadataQueryMaxSize = metadataQueryMaxSize;
     }
 
-    public int getSpanQueryMaxSize() {
-        return spanQueryMaxSize;
+    public int getMaxQuerySegmentSize() {
+        return maxQuerySegmentSize;
     }
 
-    public void setSpanQueryMaxSize(int spanQueryMaxSize) {
-        this.spanQueryMaxSize = spanQueryMaxSize;
+    public void setMaxQuerySegmentSize(int maxQuerySegmentSize) {
+        this.maxQuerySegmentSize = maxQuerySegmentSize;
     }
 }
diff --git a/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/query/TraceQueryEsDAO.java b/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/query/TraceQueryEsDAO.java
index a69c546..404f00b 100644
--- a/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/query/TraceQueryEsDAO.java
+++ b/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/query/TraceQueryEsDAO.java
@@ -48,11 +48,11 @@ import org.elasticsearch.search.sort.SortOrder;
  */
 public class TraceQueryEsDAO extends EsDAO implements ITraceQueryDAO {
 
-    private int maxQuerySpanSize;
+    private int maxQuerySegmentSize;
 
-    public TraceQueryEsDAO(ElasticSearchClient client, int maxQuerySpanSize) {
+    public TraceQueryEsDAO(ElasticSearchClient client, int maxQuerySegmentSize) {
         super(client);
-        this.maxQuerySpanSize = maxQuerySpanSize;
+        this.maxQuerySegmentSize = maxQuerySegmentSize;
     }
 
     @Override
@@ -136,7 +136,7 @@ public class TraceQueryEsDAO extends EsDAO implements ITraceQueryDAO {
     @Override public List<SegmentRecord> queryByTraceId(String traceId) throws IOException {
         SearchSourceBuilder sourceBuilder = SearchSourceBuilder.searchSource();
         sourceBuilder.query(QueryBuilders.termQuery(SegmentRecord.TRACE_ID, traceId));
-        sourceBuilder.size(maxQuerySpanSize);
+        sourceBuilder.size(maxQuerySegmentSize);
 
         SearchResponse response = getClient().search(SegmentRecord.INDEX_NAME, sourceBuilder);