|
@@ -88,7 +88,9 @@ public class SimpleNode<KEYIN, VALUEIN, KEYOUT, VALUEOUT>
|
|
|
// 设置log4j线程上下文
|
|
|
ThreadContext.put("TRACE_ID", traceId);
|
|
|
|
|
|
- LOG.debug("{} start...", nodeName);
|
|
|
+ if (LOG.isDebugEnabled()) {
|
|
|
+ LOG.debug("{}, {} start", myself.getNodeStatusInfo(), nodeName);
|
|
|
+ }
|
|
|
|
|
|
counter = new Counter();
|
|
|
if (isFirst()) {
|
|
@@ -100,7 +102,9 @@ public class SimpleNode<KEYIN, VALUEIN, KEYOUT, VALUEOUT>
|
|
|
execute(entry.getKey(), entry.getValue());
|
|
|
}
|
|
|
|
|
|
- LOG.info("{} executed... {}", nodeName, myself.getNodeStatusInfo());
|
|
|
+ if (LOG.isDebugEnabled()) {
|
|
|
+ LOG.debug("{}, {} end", myself.getNodeStatusInfo(), nodeName);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
try {
|
|
@@ -138,16 +142,19 @@ public class SimpleNode<KEYIN, VALUEIN, KEYOUT, VALUEOUT>
|
|
|
|
|
|
counter.incrementSuccessAmount();
|
|
|
|
|
|
- if (LOG.isDebugEnabled()) {
|
|
|
- LOG.debug("{} execute successful... key = {}, value = {}, cost {} ms", nodeName,
|
|
|
- key != null ? key.toString() : null, value != null ? value.toString() : null,
|
|
|
+ if (LOG.isInfoEnabled()) {
|
|
|
+ LOG.info("{}, {} execute successful... key = {}, cost {} ms",
|
|
|
+ myself.getNodeStatusInfo(), nodeName,
|
|
|
+ key != null ? key.toString() : null,
|
|
|
System.currentTimeMillis() - s);
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
counter.incrementFailureAmount();
|
|
|
|
|
|
- LOG.error("{} execute fail... key = {}, value = {}", nodeName,
|
|
|
- key != null ? key.toString() : null, value != null ? value.toString() : null, e);
|
|
|
+ LOG.error("{}, {} execute fail... key = {}, value = {}",
|
|
|
+ myself.getNodeStatusInfo(), nodeName,
|
|
|
+ key != null ? key.toString() : null,
|
|
|
+ value != null ? value.toString() : null, e);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -182,8 +189,8 @@ public class SimpleNode<KEYIN, VALUEIN, KEYOUT, VALUEOUT>
|
|
|
}
|
|
|
|
|
|
return new StringBuilder().append("Total = ").append(total)
|
|
|
- .append(", SuccessAmount = ").append(successAmount)
|
|
|
- .append(", FailureAmount = ").append(failureAmount)
|
|
|
+ .append(", Success = ").append(successAmount)
|
|
|
+ .append(", Fail = ").append(failureAmount)
|
|
|
.toString();
|
|
|
}
|
|
|
|