Skip to content

Commit 357ce9d

Browse files
committed
format code
1 parent d58845d commit 357ce9d

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

cachecloud-open-web/src/main/java/com/sohu/cache/web/controller/AppManageController.java

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -277,32 +277,32 @@ public ModelAndView doHandleHorizontalScale(HttpServletRequest request,
277277
*/
278278
@RequestMapping(value = "/showReshardProcess")
279279
public ModelAndView doShowReshardProcess(HttpServletRequest request, HttpServletResponse response, Model model) {
280-
ConcurrentMap<Long, ReshardProcess> appScaleProcessMap = appDeployCenter.getHorizontalProcess();
281-
write(response, filterMapToJsonArray(appScaleProcessMap));
282-
return null;
280+
ConcurrentMap<Long, ReshardProcess> appScaleProcessMap = appDeployCenter.getHorizontalProcess();
281+
write(response, filterMapToJsonArray(appScaleProcessMap));
282+
return null;
283283
}
284284

285285
/**
286-
* 把Map组装成JsonArray
287-
*
288-
* @param appScaleProcessMap
289-
* @return
290-
*/
291-
private String filterMapToJsonArray(ConcurrentMap<Long, ReshardProcess> appScaleProcessMap) {
292-
if (MapUtils.isEmpty(appScaleProcessMap)) {
293-
return "[]";
294-
}
295-
List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
296-
for (Entry<Long, ReshardProcess> entry : appScaleProcessMap.entrySet()) {
297-
Map<String, Object> map = new HashMap<String, Object>();
298-
map.put("appId", entry.getKey());
299-
map.put("reshardSlot", entry.getValue().getReshardSlot());
300-
map.put("totalSlot", entry.getValue().getTotalSlot());
301-
map.put("status", entry.getValue().getStatus());
302-
list.add(map);
303-
}
304-
return JSONArray.fromObject(list).toString();
305-
}
286+
* 把Map组装成JsonArray
287+
*
288+
* @param appScaleProcessMap
289+
* @return
290+
*/
291+
private String filterMapToJsonArray(ConcurrentMap<Long, ReshardProcess> appScaleProcessMap) {
292+
if (MapUtils.isEmpty(appScaleProcessMap)) {
293+
return "[]";
294+
}
295+
List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
296+
for (Entry<Long, ReshardProcess> entry : appScaleProcessMap.entrySet()) {
297+
Map<String, Object> map = new HashMap<String, Object>();
298+
map.put("appId", entry.getKey());
299+
map.put("reshardSlot", entry.getValue().getReshardSlot());
300+
map.put("totalSlot", entry.getValue().getTotalSlot());
301+
map.put("status", entry.getValue().getStatus());
302+
list.add(map);
303+
}
304+
return JSONArray.fromObject(list).toString();
305+
}
306306

307307
/**
308308
* 水平扩容配置检查

0 commit comments

Comments
 (0)