fix a log with value evaluation
authorjt <jt2594838@163.com>
Fri, 1 Feb 2019 16:59:16 +0000 (00:59 +0800)
committerjt <jt2594838@163.com>
Fri, 1 Feb 2019 16:59:16 +0000 (00:59 +0800)
iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/io/OverflowResource.java

index 891eefd..9534afd 100644 (file)
@@ -185,11 +185,14 @@ public class OverflowResource {
     long timeInterval = System.currentTimeMillis() - startTime;
     timeInterval = timeInterval == 0 ? 1 : timeInterval;
     long insertSize = insertIO.getPos() - startPos;
-    LOGGER.info(
-            "Overflow processor {} flushes overflow insert data, actual:{}, time consumption:{} ms,"
-                    + " flush rate:{}/s",
-            processorName, MemUtils.bytesCntToStr(insertSize), timeInterval,
-            MemUtils.bytesCntToStr(insertSize / timeInterval * 1000));
+    if (LOGGER.isInfoEnabled()) {
+      LOGGER.info(
+          "Overflow processor {} flushes overflow insert data, actual:{}, time consumption:{} ms,"
+              + " flush rate:{}/s",
+          processorName, MemUtils.bytesCntToStr(insertSize), timeInterval,
+          MemUtils.bytesCntToStr(insertSize / timeInterval * 1000));
+    }
+
     writePositionInfo(insertIO.getPos(), 0);
   }