diff options
| author | lijinyang <[email protected]> | 2023-11-07 11:10:48 +0800 |
|---|---|---|
| committer | lijinyang <[email protected]> | 2023-11-07 11:10:48 +0800 |
| commit | d22f7b5e027a77bca829dc8b823c64b93f8ed85d (patch) | |
| tree | af74022a7a0af292b4139e2093aa695cc6e5f125 /src | |
| parent | c58de2f31a9b6d292aebae83a7c9ccdc16335bda (diff) | |
fix:优化log日志信息
Diffstat (limited to 'src')
5 files changed, 16 insertions, 16 deletions
diff --git a/src/main/java/com/mesa/reportservice/controller/ScheduledResultController.java b/src/main/java/com/mesa/reportservice/controller/ScheduledResultController.java index bb7ebf0..21aeeb5 100644 --- a/src/main/java/com/mesa/reportservice/controller/ScheduledResultController.java +++ b/src/main/java/com/mesa/reportservice/controller/ScheduledResultController.java @@ -46,7 +46,7 @@ public class ScheduledResultController { public void getExcuteResult() { try { if (zs.isMaster()) { - logger.info("开始查看结果"); + logger.info("start viewing results"); //先查询数据库是否有异常状态任务,killquery List<JobEntity> joblist = ms.getJobForExcute(); for (JobEntity jobEntity : joblist) { @@ -97,7 +97,7 @@ public class ScheduledResultController { if (rows > 0) { List<JobEntity> jobs = ms.getJobTask(rows); for (JobEntity job : jobs) { - logger.info("开始执行任务"); + logger.info("start executing task"); long begintime = System.currentTimeMillis(); job.setBeginTime(begintime); String sql = job.getQuerySql().trim(); @@ -130,20 +130,20 @@ public class ScheduledResultController { } }); } else { - logger.error("更新数据库状态失败"); + logger.error("failed to update database status"); } } else { if (ms.updateProcesses(job) != 0) { - logger.error("任务不能执行"); + logger.error("task cannot be executed"); } else { - logger.error("更新数据库状态失败"); + logger.error("failed to update database status"); } } } } else { - logger.info("无待执行任务"); + logger.info("no pending tasks"); } } else { if (gc.getMapresult().size() > 0) { diff --git a/src/main/java/com/mesa/reportservice/service/impl/ExcuteProcessServiceImpl.java b/src/main/java/com/mesa/reportservice/service/impl/ExcuteProcessServiceImpl.java index 807dcd9..a25653a 100644 --- a/src/main/java/com/mesa/reportservice/service/impl/ExcuteProcessServiceImpl.java +++ b/src/main/java/com/mesa/reportservice/service/impl/ExcuteProcessServiceImpl.java @@ -163,7 +163,7 @@ public class ExcuteProcessServiceImpl implements ExcuteProcessService { isok = hs.put(entity); break; } catch (Exception e) { - logger.error("写入hbase报错重试次数" + (3 - k) + e.toString()); + logger.error("write HBase error retry count" + (3 - k) + e.toString()); k--; } } diff --git a/src/main/java/com/mesa/reportservice/service/impl/ZkServiceImpl.java b/src/main/java/com/mesa/reportservice/service/impl/ZkServiceImpl.java index 638c8da..fe30208 100644 --- a/src/main/java/com/mesa/reportservice/service/impl/ZkServiceImpl.java +++ b/src/main/java/com/mesa/reportservice/service/impl/ZkServiceImpl.java @@ -33,7 +33,7 @@ public class ZkServiceImpl implements ZkService { if (zp.getOpen() == 0) { boolean isZkCuratorStarted = curatorConnect.isStarted(); String nodePath = "/masterip"; - logger.debug("当前客户端的状态:" + (isZkCuratorStarted ? "连接中..." : "已关闭...")); + logger.debug("the current state of the client: " + (isZkCuratorStarted ? "connecting..." : "closed...")); Stat statExist = curatorConnect.checkExists().forPath(nodePath); if (statExist == null) { byte[] data = GlobelConfig.zkuuid.getBytes(); // 节点数据 @@ -46,19 +46,19 @@ public class ZkServiceImpl implements ZkService { return true; } else { - logger.debug(nodePath + " 节点存在"); + logger.debug(nodePath + " node exists"); Stat stat = new Stat(); byte[] nodeData = curatorConnect.getData().storingStatIn(stat).forPath(nodePath); String masterid = new String(nodeData, "UTF-8").trim(); - logger.debug("uuid=" + GlobelConfig.zkuuid + " 节点 " + nodePath + " 的数据为:" + masterid); + logger.debug("uuid=" + GlobelConfig.zkuuid + " node " + nodePath + " data is:" + masterid); if (masterid.equals(GlobelConfig.zkuuid)) { return true; } else { - logger.debug("不是主节点"); + logger.debug("not the main node"); return false; } } diff --git a/src/main/java/com/mesa/reportservice/util/DateUtil.java b/src/main/java/com/mesa/reportservice/util/DateUtil.java index 6307470..06b4554 100644 --- a/src/main/java/com/mesa/reportservice/util/DateUtil.java +++ b/src/main/java/com/mesa/reportservice/util/DateUtil.java @@ -85,7 +85,7 @@ public final class DateUtil { public static String getCurrentDate(String pattern) { if (StringUtil.isEmpty(pattern)) { - throw new NullPointerException("未规定时间格式."); + throw new NullPointerException("No specified time format."); } simpleDateFormat = new SimpleDateFormat(DateUtil.YYYY_MM_DD_HH_MM_SS); return simpleDateFormat.format(new Date()); @@ -292,7 +292,7 @@ public final class DateUtil { */ public static String getDDFromDate(Date date) { if (null == date) { - throw new NullPointerException("未存储日期对象"); + throw new NullPointerException("Date object not stored"); } Calendar calendar = Calendar.getInstance(); calendar.setTime(date); @@ -473,7 +473,7 @@ public final class DateUtil { long time10, String pattern) { if (StringUtil.isEmpty(pattern)) { - throw new NullPointerException("参数为NULL"); + throw new NullPointerException("Parameter is NULL"); } Date date = new Date(); date.setTime(time10 * 1000); @@ -500,7 +500,7 @@ public final class DateUtil { public static String getFormatDate(Date date, String pattern) { if (StringUtil.isEmpty(pattern) || StringUtil.isEmpty(date)) { - throw new NullPointerException("参数为NULL"); + throw new NullPointerException("Parameter is NULL"); } simpleDateFormat = new SimpleDateFormat(pattern); diff --git a/src/main/java/com/mesa/reportservice/util/StringUtil.java b/src/main/java/com/mesa/reportservice/util/StringUtil.java index 00d686a..94ccf46 100644 --- a/src/main/java/com/mesa/reportservice/util/StringUtil.java +++ b/src/main/java/com/mesa/reportservice/util/StringUtil.java @@ -418,7 +418,7 @@ public final class StringUtil extends StringUtils { String destCodingFormat) throws UnsupportedEncodingException { if (!isSupported(sourceCodingFormat) || !isSupported(destCodingFormat)) { - throw new UnsupportedEncodingException("JVM 下不支持该字符集编码"); + throw new UnsupportedEncodingException("This character set encoding is not supported under JVM"); } if (isEmpty(value)) { |
