From 96ee18137ce0945a63fa036d713daf526d72107b Mon Sep 17 00:00:00 2001 From: githubname1024 Date: Wed, 28 Feb 2024 09:41:52 +0800 Subject: [PATCH] support redis cluster dynamic deploy, for example 1 pod with 1 instance --- .../com/sohu/cache/web/controller/AppManageController.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cachecloud-web/src/main/java/com/sohu/cache/web/controller/AppManageController.java b/cachecloud-web/src/main/java/com/sohu/cache/web/controller/AppManageController.java index 04f18c95..15bce22d 100644 --- a/cachecloud-web/src/main/java/com/sohu/cache/web/controller/AppManageController.java +++ b/cachecloud-web/src/main/java/com/sohu/cache/web/controller/AppManageController.java @@ -656,7 +656,10 @@ public ModelAndView doAddAppDeployTask(HttpServletRequest request, logger.info("pikaMachines:{} ,num:{} ", pikaMachines, pikaNum); logger.info("moduleinfos:{} ", moduleinfos); try { - List appDeployInfolist = Arrays.asList(appDeployInfo.split("\n")); + List appDeployInfolist = new ArrayList<>(); + if(StringUtils.isNotEmpty(appDeployInfo)){ + appDeployInfolist = Arrays.asList(appDeployInfo.split("\n")); + } List redisMachinelist = Arrays.asList(redisMachines.split(";")); List sentinelMachinelist = Arrays.asList(sentinelMachines.split(";")); List twemproxyMachinelist = Arrays.asList(twemproxyMachines.split(";"));