HealthCheckController extends AbstractConsoleController { @RequestMapping(value = "/redis/health/hickwall/" + CLUSTER_NAME_PATH_VARIABLE + "/" + SHARD_NAME_PATH_VARIABLE + "/{redisIp}/{redisPort}", method = RequestMethod.GET) public Map<String, String> getHickwallAddress(@PathVariable String clusterName, @PathVariable String shardName, @PathVariable String redisIp, @PathVariable int redisPort) { HickwallMetricInfo info = config.getHickwallMetricInfo(); if (Strings.isEmpty(info.getDomain())) { return ImmutableMap.of("addr", ""); } String template = null; try { template = String.format(INSTANCE_DELAY_TEMPLATE, info.getDelayPanelId(), clusterName, shardName, redisIp, redisPort); } catch (Exception e) { logger.error("[getHickwallAddress]", e); return ImmutableMap.of("addr", ""); } String url = info.getDomain() + template; return ImmutableMap.of("addr", url); }  @RequestMapping(value = "/redis/health/{redisIp}/{redisPort}", method = RequestMethod.GET) Map<String, Boolean> isRedisHealth(@PathVariable String redisIp, @PathVariable int redisPort); @RequestMapping(value = "/redis/delay/{redisIp}/{redisPort}", method = RequestMethod.GET) Map<String, Long> getReplDelayMillis(@PathVariable String redisIp, @PathVariable int redisPort); @RequestMapping(value = "/redis/delay/{clusterType}/{redisIp}/{redisPort}", method = RequestMethod.GET) Map<String, Long> getReplDelayMillis(@PathVariable String clusterType, @PathVariable String redisIp, @PathVariable int redisPort); @RequestMapping(value = "/cross-master/delay/{dcId}/" + CLUSTER_ID_PATH_VARIABLE + "/" + SHARD_ID_PATH_VARIABLE, method = RequestMethod.GET) Map<String, Pair<HostPort, Long>> getCrossMasterReplHealthStatus(@PathVariable String dcId, @PathVariable String clusterId, @PathVariable String shardId); @RequestMapping(value = "/cross-master/delay/{clusterType}/{dcId}/" + CLUSTER_ID_PATH_VARIABLE + "/" + SHARD_ID_PATH_VARIABLE, method = RequestMethod.GET) Map<String, Pair<HostPort, Long>> getCrossMasterReplHealthStatus(@PathVariable String clusterType, @PathVariable String dcId,
                                                                            @PathVariable String clusterId, @PathVariable String shardId); @RequestMapping(value = "/redis/health/hickwall/" + CLUSTER_NAME_PATH_VARIABLE + "/" + SHARD_NAME_PATH_VARIABLE + "/{redisIp}/{redisPort}", method = RequestMethod.GET) Map<String, String> getHickwallAddress(@PathVariable String clusterName, @PathVariable String shardName, @PathVariable String redisIp, @PathVariable int redisPort); @RequestMapping(value = "/cross-master/health/hickwall/" + CLUSTER_NAME_PATH_VARIABLE + "/" + SHARD_NAME_PATH_VARIABLE + "/{sourceDc}/{destDc}", method = RequestMethod.GET) Map<String, String> getCrossDcDelayHickwallAddress(@PathVariable String clusterName, @PathVariable String shardName, @PathVariable String sourceDc, @PathVariable String destDc);  }
@Test public void testGetHickwallAddress() { String cluster = "xpipe_function", shard = "shard1", redisIp = "10.2.55.174"; int port = 6379; Map<String, String> map = controller.getHickwallAddress(cluster, shard, redisIp, port); logger.info("[map] {}", map); }