diff --git a/src/com/platform/http/gfs/RemoveData.java b/src/com/platform/http/gfs/RemoveData.java index 0633a544..64217929 100644 --- a/src/com/platform/http/gfs/RemoveData.java +++ b/src/com/platform/http/gfs/RemoveData.java @@ -62,18 +62,25 @@ public class RemoveData { Map map = new HashMap(); map.put("sourcePath", sourceFolderName); map.put("destPath", destFolderName); - //请求web - String rest = ht.sendPost("data/abortCopyData", map); - if (null == rest || "".equals(rest)) { - log.error(" --- gluster is disconnect ! \n"); - return 0; + String rest =""; + try { + //请求web + rest = ht.sendPost("data/abortCopyData", map); + if (null == rest || "".equals(rest)) { + log.error(" --- gluster is disconnect ! \n"); + return 0; + } + Gson gs = new Gson(); + PostData data = gs.fromJson(rest, PostData.class); + // 1 : 成功 + double copyResult = (double) data.getData(); + reslut = (int) copyResult; + getExcept(data); + } catch (Exception e) { + log.error(rest); + log.error(e); + throw new CustomException("请求gfs服务异常 -- data/removeData ", e, rest); } - Gson gs = new Gson(); - PostData data = gs.fromJson(rest, PostData.class); - // 1 : 成功 - double copyResult = (double) data.getData(); - reslut = (int) copyResult; - getExcept(data); return reslut; }