You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by qi...@apache.org on 2019/06/27 13:29:56 UTC

[incubator-iotdb] branch feature_async_close_tsfile updated: add insertPlan log in insert memtable

This is an automated email from the ASF dual-hosted git repository.

qiaojialin pushed a commit to branch feature_async_close_tsfile
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git


The following commit(s) were added to refs/heads/feature_async_close_tsfile by this push:
     new 4ab548a  add insertPlan log in insert memtable
     new 0d8ee0a  Merge remote-tracking branch 'origin/feature_async_close_tsfile' into feature_async_close_tsfile
4ab548a is described below

commit 4ab548a27296d51381398795b1e5d6f0695444f4
Author: qiaojialin <64...@qq.com>
AuthorDate: Thu Jun 27 21:28:15 2019 +0800

    add insertPlan log in insert memtable
---
 .../apache/iotdb/db/engine/filenodeV2/UnsealedTsFileProcessorV2.java | 2 +-
 .../java/org/apache/iotdb/db/engine/memtable/AbstractMemTable.java   | 1 -
 .../main/java/org/apache/iotdb/db/qp/physical/crud/InsertPlan.java   | 5 +++++
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/iotdb/src/main/java/org/apache/iotdb/db/engine/filenodeV2/UnsealedTsFileProcessorV2.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenodeV2/UnsealedTsFileProcessorV2.java
index 86f05f5..e708a44 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/engine/filenodeV2/UnsealedTsFileProcessorV2.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenodeV2/UnsealedTsFileProcessorV2.java
@@ -145,7 +145,7 @@ public class UnsealedTsFileProcessorV2 {
     workMemTable.insert(insertPlan);
     start2 = System.currentTimeMillis() - start2;
     if (start2 > 1000) {
-      LOGGER.info("UFP insert into memtable cost: {}", start2);
+      LOGGER.info("UFP {} insert into memtable cost: {}, insertPlan: {}", storageGroupName, start2, insertPlan);
     }
 
     return true;
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/AbstractMemTable.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/AbstractMemTable.java
index 2efc602..63c12ae 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/AbstractMemTable.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/AbstractMemTable.java
@@ -86,7 +86,6 @@ public abstract class AbstractMemTable implements IMemTable {
     for (int i = 0; i < insertPlan.getValues().length; i++) {
       write(insertPlan.getDeviceId(), insertPlan.getMeasurements()[i],
           insertPlan.getDataTypes()[i], insertPlan.getTime(), insertPlan.getValues()[i]);
-
     }
     long recordSizeInByte = MemUtils.getRecordSize(insertPlan);
     memSize += recordSizeInByte;
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/qp/physical/crud/InsertPlan.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/physical/crud/InsertPlan.java
index f98541e..9f73cba 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/qp/physical/crud/InsertPlan.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/physical/crud/InsertPlan.java
@@ -208,4 +208,9 @@ public class InsertPlan extends PhysicalPlan {
       values[i] = readString(buffer);
     }
   }
+
+  @Override
+  public String toString() {
+    return "deviceId: " + deviceId + ", time: " + time;
+  }
 }