Browse Source

upgrade elasticsearch version to 7.10.2

zhou-hao 4 năm trước cách đây
mục cha
commit
74084f057b

+ 3 - 4
jetlinks-components/elasticsearch-component/src/main/java/org/jetlinks/community/elastic/search/aggreation/DefaultAggregationService.java

@@ -7,7 +7,7 @@ import org.elasticsearch.action.ActionListener;
 import org.elasticsearch.action.search.SearchRequest;
 import org.elasticsearch.action.search.SearchResponse;
 import org.elasticsearch.client.RequestOptions;
-import org.elasticsearch.search.aggregations.bucket.histogram.ExtendedBounds;
+import org.elasticsearch.search.aggregations.bucket.histogram.LongBounds;
 import org.elasticsearch.search.builder.SearchSourceBuilder;
 import org.hswebframework.ezorm.core.param.QueryParam;
 import org.hswebframework.ezorm.core.param.TermType;
@@ -27,7 +27,6 @@ import org.jetlinks.community.elastic.search.utils.ElasticSearchConverter;
 import org.jetlinks.community.elastic.search.utils.ReactorActionListener;
 import org.jetlinks.community.timeseries.query.AggregationQueryParam;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
 import reactor.core.publisher.Flux;
 import reactor.core.publisher.Mono;
 import reactor.core.publisher.MonoSink;
@@ -240,8 +239,8 @@ public class DefaultAggregationService implements AggregationService {
         return structure;
     }
 
-    protected static ExtendedBounds getExtendedBounds(AggregationQueryParam param) {
-        return new ExtendedBounds(calculateStartWithTime(param), param.getEndWithTime());
+    protected static LongBounds getExtendedBounds(AggregationQueryParam param) {
+        return new LongBounds(calculateStartWithTime(param), param.getEndWithTime());
     }
 
     private static long calculateStartWithTime(AggregationQueryParam param) {

+ 2 - 2
jetlinks-components/elasticsearch-component/src/main/java/org/jetlinks/community/elastic/search/aggreation/bucket/BucketAggregationsStructure.java

@@ -1,7 +1,7 @@
 package org.jetlinks.community.elastic.search.aggreation.bucket;
 
 import lombok.*;
-import org.elasticsearch.search.aggregations.bucket.histogram.ExtendedBounds;
+import org.elasticsearch.search.aggregations.bucket.histogram.LongBounds;
 import org.hswebframework.utils.StringUtils;
 import org.jetlinks.community.elastic.search.aggreation.enums.BucketType;
 import org.jetlinks.community.elastic.search.aggreation.metrics.MetricsAggregationStructure;
@@ -37,7 +37,7 @@ public class BucketAggregationsStructure {
 
     private List<Ranges> ranges;
 
-    private ExtendedBounds extendedBounds;
+    private LongBounds extendedBounds;
 
     /**
      * 时间格式

+ 3 - 3
jetlinks-components/elasticsearch-component/src/main/java/org/jetlinks/community/elastic/search/service/reactive/ReactiveAggregationService.java

@@ -10,8 +10,8 @@ import org.elasticsearch.search.aggregations.Aggregations;
 import org.elasticsearch.search.aggregations.BucketOrder;
 import org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramAggregationBuilder;
 import org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramInterval;
-import org.elasticsearch.search.aggregations.bucket.histogram.ExtendedBounds;
 import org.elasticsearch.search.aggregations.bucket.histogram.Histogram;
+import org.elasticsearch.search.aggregations.bucket.histogram.LongBounds;
 import org.elasticsearch.search.aggregations.bucket.terms.Terms;
 import org.elasticsearch.search.aggregations.bucket.terms.TermsAggregationBuilder;
 import org.elasticsearch.search.aggregations.metrics.NumericMetricsAggregation;
@@ -293,9 +293,9 @@ public class ReactiveAggregationService implements AggregationService {
         return queryParam;
     }
 
-    protected static ExtendedBounds getExtendedBounds(AggregationQueryParam param) {
+    protected static LongBounds getExtendedBounds(AggregationQueryParam param) {
 
-        return new ExtendedBounds(calculateStartWithTime(param), param.getEndWithTime());
+        return new LongBounds(calculateStartWithTime(param), param.getEndWithTime());
     }
 
     //聚合查询默认的时间间隔

+ 1 - 7
pom.xml

@@ -26,7 +26,7 @@
         <r2dbc.version>Arabba-SR7</r2dbc.version>
         <vertx.version>3.8.5</vertx.version>
         <netty.version>4.1.51.Final</netty.version>
-        <elasticsearch.version>7.9.2</elasticsearch.version>
+        <elasticsearch.version>7.10.2</elasticsearch.version>
         <reactor.excel.version>1.0.0</reactor.excel.version>
         <reactor.ql.version>1.0.9</reactor.ql.version>
         <fastjson.version>1.2.70</fastjson.version>
@@ -259,12 +259,6 @@
                 <version>${jetlinks.version}</version>
             </dependency>
 
-            <dependency>
-                <groupId>com.google.guava</groupId>
-                <artifactId>guava</artifactId>
-                <version>29.0-jre</version>
-            </dependency>
-
             <dependency>
                 <groupId>io.vertx</groupId>
                 <artifactId>vertx-core</artifactId>