mirror of
https://github.com/didi/KnowStreaming.git
synced 2025-12-24 03:42:07 +08:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -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)|||
|
||||
|
||||
|
||||
|
||||
@@ -67,4 +67,8 @@ public interface BrokerService {
|
||||
* 获取总的Broker数
|
||||
*/
|
||||
Integer countAllBrokers();
|
||||
|
||||
boolean allServerDown(Long clusterPhyId);
|
||||
|
||||
boolean existServerDown(Long clusterPhyId);
|
||||
}
|
||||
|
||||
@@ -262,14 +262,32 @@ public class BrokerServiceImpl extends BaseVersionControlService implements Brok
|
||||
return version;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public Integer countAllBrokers() {
|
||||
LambdaQueryWrapper<BrokerPO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
return brokerDAO.selectCount(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean allServerDown(Long clusterPhyId) {
|
||||
List<BrokerPO> 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<BrokerPO> 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<Broker> listAllBrokersAndUpdateCache(Long clusterPhyId) {
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
|
||||
@@ -10,13 +10,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"term": {
|
||||
"brokerId": {
|
||||
"value": %d
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"range": {
|
||||
"timestamp": {
|
||||
|
||||
Reference in New Issue
Block a user