diff --git a/docs/contributer_guide/开发者名单.md b/docs/contributer_guide/开发者名单.md index 704ffc5c..ea147bdc 100644 --- a/docs/contributer_guide/开发者名单.md +++ b/docs/contributer_guide/开发者名单.md @@ -9,9 +9,12 @@ |姓名|Github|角色|发放日期| |--|--|--|--| |张亮 | [@zhangliangboy](https://github.com/zhangliangboy)||| +|赵情融 | [@zqrferrari](https://github.com/zqrferrari)||| |谢鹏|[@PenceXie](https://github.com/PenceXie)||| +|孙超|[@lucasun](https://github.com/lucasun)||| +|许喆 | [@potaaaaaato](https://github.com/potaaaaaato)||| |石臻臻 | [@shirenchuang](https://github.com/shirenchuang)||| -|周宇航|[@GraceWalk](https://github.com/GraceWalk)||| +|郭宇航|[@GraceWalk](https://github.com/GraceWalk)||| |曾巧|[@ZQKC](https://github.com/ZQKC)||| |赵寅锐|[@ZHAOYINRUI](https://github.com/ZHAOYINRUI)||| |王东方|[@wangdongfang-aden](https://github.com/wangdongfang-aden)||| @@ -20,7 +23,7 @@ |Huyueeer|[@Huyueeer](https://github.com/Huyueeer)||| |杨光|[@yaangvipguang](https://github.com/yangvipguang)| |王亚聪|[@wangyacongi](https://github.com/wangyacongi)| -|WYAOBO|[@WYAOBO](https://github.com/WYAOBO) +|王耀波|[@WYAOBO](https://github.com/WYAOBO) | Super .Wein(星痕)| [@superspeedone](https://github.com/superspeedone)||| | Yang Jing| [@yangbajing](https://github.com/yangbajing)||| | 刘新元 Liu XinYuan| [@Liu-XinYuan](https://github.com/Liu-XinYuan)||| @@ -34,8 +37,8 @@ | 谢晓东| [@Strangevy](https://github.com/Strangevy)||| | ZhaoXinlong| [@ZhaoXinlong](https://github.com/ZhaoXinlong)||| |xuehaipeng | [@xuehaipeng](https://github.com/xuehaipeng)||| -|mrazkong | [@mrazkong](https://github.com/mrazkong)||| -|xuzhengxi | [@hyper-xx)](https://github.com/hyper-xx)||| +|孔令续 | [@mrazkong](https://github.com/mrazkong)||| +|徐正熙 | [@hyper-xx)](https://github.com/hyper-xx)||| |pierre xiong | [@pierre94](https://github.com/pierre94)||| diff --git a/km-core/src/main/java/com/xiaojukeji/know/streaming/km/core/service/broker/BrokerService.java b/km-core/src/main/java/com/xiaojukeji/know/streaming/km/core/service/broker/BrokerService.java index 62f03e65..c8c300a0 100644 --- a/km-core/src/main/java/com/xiaojukeji/know/streaming/km/core/service/broker/BrokerService.java +++ b/km-core/src/main/java/com/xiaojukeji/know/streaming/km/core/service/broker/BrokerService.java @@ -67,4 +67,8 @@ public interface BrokerService { * 获取总的Broker数 */ Integer countAllBrokers(); + + boolean allServerDown(Long clusterPhyId); + + boolean existServerDown(Long clusterPhyId); } diff --git a/km-core/src/main/java/com/xiaojukeji/know/streaming/km/core/service/broker/impl/BrokerServiceImpl.java b/km-core/src/main/java/com/xiaojukeji/know/streaming/km/core/service/broker/impl/BrokerServiceImpl.java index 7fc4f4f2..3fd74ee5 100644 --- a/km-core/src/main/java/com/xiaojukeji/know/streaming/km/core/service/broker/impl/BrokerServiceImpl.java +++ b/km-core/src/main/java/com/xiaojukeji/know/streaming/km/core/service/broker/impl/BrokerServiceImpl.java @@ -262,14 +262,32 @@ public class BrokerServiceImpl extends BaseVersionControlService implements Brok return version; } - - @Override public Integer countAllBrokers() { LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); return brokerDAO.selectCount(lambdaQueryWrapper); } + @Override + public boolean allServerDown(Long clusterPhyId) { + List poList = this.getAllBrokerPOsFromDB(clusterPhyId); + if (ValidateUtils.isEmptyList(poList)) { + return false; + } + + return poList.stream().filter(elem -> elem.getStatus().equals(Constant.DOWN)).count() == poList.size(); + } + + @Override + public boolean existServerDown(Long clusterPhyId) { + List poList = this.getAllBrokerPOsFromDB(clusterPhyId); + if (ValidateUtils.isEmptyList(poList)) { + return false; + } + + return poList.stream().filter(elem -> elem.getStatus().equals(Constant.DOWN)).count() > 0; + } + /**************************************************** private method ****************************************************/ private List listAllBrokersAndUpdateCache(Long clusterPhyId) { diff --git a/km-persistence/src/main/java/com/xiaojukeji/know/streaming/km/persistence/es/dsls/DslsConstant.java b/km-persistence/src/main/java/com/xiaojukeji/know/streaming/km/persistence/es/dsls/DslsConstant.java index 94a8698e..f15fe7a8 100644 --- a/km-persistence/src/main/java/com/xiaojukeji/know/streaming/km/persistence/es/dsls/DslsConstant.java +++ b/km-persistence/src/main/java/com/xiaojukeji/know/streaming/km/persistence/es/dsls/DslsConstant.java @@ -81,5 +81,5 @@ public class DslsConstant { public static final String COUNT_GROUP_NOT_METRIC_VALUE = "GroupMetricESDAO/countGroupNotMetricValue"; /**************************************************** Zookeeper ****************************************************/ - public static final String GET_ZOOKEEPER_AGG_LIST_METRICS = "ZookeeperMetricESDAO/getAggListZookeeperMetrics"; + public static final String GET_ZOOKEEPER_AGG_LIST_METRICS = "ZookeeperMetricESDAO/getAggListZookeeperMetrics"; } diff --git a/km-persistence/src/main/resources/dsl/ZookeeperMetricESDAO/getAggListZookeeperMetrics b/km-persistence/src/main/resources/dsl/ZookeeperMetricESDAO/getAggListZookeeperMetrics index c05c221d..c498368b 100644 --- a/km-persistence/src/main/resources/dsl/ZookeeperMetricESDAO/getAggListZookeeperMetrics +++ b/km-persistence/src/main/resources/dsl/ZookeeperMetricESDAO/getAggListZookeeperMetrics @@ -10,13 +10,6 @@ } } }, - { - "term": { - "brokerId": { - "value": %d - } - } - }, { "range": { "timestamp": {