Commit eb037c963c34d061f9808ae4eb5682dbe2477ecd
1 parent
e52a966b
fix: redis7.0 监控查询calls数值过大转Intger异常
Showing
2 changed files
with
2 additions
and
2 deletions
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/vo/RedisMonitorRespVO.java
| ... | ... | @@ -34,7 +34,7 @@ public class RedisMonitorRespVO { |
| 34 | 34 | private String command; |
| 35 | 35 | |
| 36 | 36 | @ApiModelProperty(value = "调用次数", required = true, example = "1024") |
| 37 | - private Integer calls; | |
| 37 | + private Long calls; | |
| 38 | 38 | |
| 39 | 39 | @ApiModelProperty(value = "消耗 CPU 秒数", required = true, example = "666") |
| 40 | 40 | private Long usec; | ... | ... |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/convert/redis/RedisConvert.java
| ... | ... | @@ -22,7 +22,7 @@ public interface RedisConvert { |
| 22 | 22 | commandStats.forEach((key, value) -> { |
| 23 | 23 | respVO.getCommandStats().add(RedisMonitorRespVO.CommandStat.builder() |
| 24 | 24 | .command(StrUtil.subAfter((String) key, "cmdstat_", false)) |
| 25 | - .calls(Integer.valueOf(StrUtil.subBetween((String) value, "calls=", ","))) | |
| 25 | + .calls(Long.valueOf(StrUtil.subBetween((String) value, "calls=", ","))) | |
| 26 | 26 | .usec(Long.valueOf(StrUtil.subBetween((String) value, "usec=", ","))) |
| 27 | 27 | .build()); |
| 28 | 28 | }); | ... | ... |