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 024bcb9  fix
024bcb9 is described below

commit 024bcb97ea9371ef566d62d43b8626ccd274f82e
Author: Jared.Tan <[email protected]>
AuthorDate: Fri Apr 26 22:43:54 2019 +0800

    fix
---
 .../plugin/elasticsearch/StorageModuleElasticsearchConfig.java | 10 +++++-----
 .../elasticsearch/StorageModuleElasticsearchProvider.java      |  2 +-
 .../storage/plugin/elasticsearch/query/TraceQueryEsDAO.java    |  8 ++++----
 3 files changed, 10 insertions(+), 10 deletions(-)

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 f7259a9..dffce36 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 maxQuerySegmentSize = 200;
+    private int segmentQueryMaxSize = 200;
 
     public String getUser() {
         return user;
@@ -166,11 +166,11 @@ public class StorageModuleElasticsearchConfig extends 
ModuleConfig {
         this.metadataQueryMaxSize = metadataQueryMaxSize;
     }
 
-    public int getMaxQuerySegmentSize() {
-        return maxQuerySegmentSize;
+    public int getSegmentQueryMaxSize() {
+        return segmentQueryMaxSize;
     }
 
-    public void setMaxQuerySegmentSize(int maxQuerySegmentSize) {
-        this.maxQuerySegmentSize = maxQuerySegmentSize;
+    public void setSegmentQueryMaxSize(int segmentQueryMaxSize) {
+        this.segmentQueryMaxSize = segmentQueryMaxSize;
     }
 }
diff --git 
a/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/StorageModuleElasticsearchProvider.java
 
b/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/StorageModuleElasticsearchProvider.java
index de9ee53..a779921 100644
--- 
a/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/StorageModuleElasticsearchProvider.java
+++ 
b/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/StorageModuleElasticsearchProvider.java
@@ -115,7 +115,7 @@ public class StorageModuleElasticsearchProvider extends 
ModuleProvider {
 
         this.registerServiceImplementation(ITopologyQueryDAO.class, new 
TopologyQueryEsDAO(elasticSearchClient));
         this.registerServiceImplementation(IMetricQueryDAO.class, new 
MetricQueryEsDAO(elasticSearchClient));
-        this.registerServiceImplementation(ITraceQueryDAO.class, new 
TraceQueryEsDAO(elasticSearchClient, config.getSpanQueryMaxSize()));
+        this.registerServiceImplementation(ITraceQueryDAO.class, new 
TraceQueryEsDAO(elasticSearchClient, config.getSegmentQueryMaxSize()));
         this.registerServiceImplementation(IMetadataQueryDAO.class, new 
MetadataQueryEsDAO(elasticSearchClient, config.getMetadataQueryMaxSize()));
         this.registerServiceImplementation(IAggregationQueryDAO.class, new 
AggregationQueryEsDAO(elasticSearchClient));
         this.registerServiceImplementation(IAlarmQueryDAO.class, new 
AlarmQueryEsDAO(elasticSearchClient));
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 404f00b..8a31bf7 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 maxQuerySegmentSize;
+    private int segmentQueryMaxSize;
 
-    public TraceQueryEsDAO(ElasticSearchClient client, int 
maxQuerySegmentSize) {
+    public TraceQueryEsDAO(ElasticSearchClient client, int 
segmentQueryMaxSize) {
         super(client);
-        this.maxQuerySegmentSize = maxQuerySegmentSize;
+        this.segmentQueryMaxSize = segmentQueryMaxSize;
     }
 
     @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(maxQuerySegmentSize);
+        sourceBuilder.size(segmentQueryMaxSize);
 
         SearchResponse response = getClient().search(SegmentRecord.INDEX_NAME, 
sourceBuilder);
 

Reply via email to