You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ta...@apache.org on 2021/10/26 07:19:36 UTC

[iotdb] branch parallel_before created (now 96d8d76)

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

tanxinyu pushed a change to branch parallel_before
in repository https://gitbox.apache.org/repos/asf/iotdb.git.


      at 96d8d76  add log

This branch includes the following new commits:

     new 96d8d76  add log

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[iotdb] 01/01: add log

Posted by ta...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tanxinyu pushed a commit to branch parallel_before
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 96d8d760897b3869e8b8ec88a27d86a40176f0dd
Author: LebronAl <TX...@gmail.com>
AuthorDate: Tue Oct 26 15:18:43 2021 +0800

    add log
---
 .../src/main/java/org/apache/iotdb/session/Session.java | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/session/src/main/java/org/apache/iotdb/session/Session.java b/session/src/main/java/org/apache/iotdb/session/Session.java
index 06b3536..a2ebd64 100644
--- a/session/src/main/java/org/apache/iotdb/session/Session.java
+++ b/session/src/main/java/org/apache/iotdb/session/Session.java
@@ -770,7 +770,7 @@ public class Session {
   private void handleMetaRedirection(String storageGroup, RedirectException e)
       throws IoTDBConnectionException {
     if (enableCacheLeader) {
-      logger.debug("storageGroup[{}]:{}", storageGroup, e.getMessage());
+      logger.info("storageGroup[{}]:{}", storageGroup, e.getMessage());
       SessionConnection connection =
           endPointToSessionConnection.computeIfAbsent(
               e.getEndPoint(),
@@ -792,6 +792,7 @@ public class Session {
   private void handleRedirection(String deviceId, EndPoint endpoint)
       throws IoTDBConnectionException {
     if (enableCacheLeader) {
+      logger.info("deviceId[{}]:{}", deviceId, endpoint);
       deviceIdToEndpoint.put(deviceId, endpoint);
       SessionConnection connection =
           endPointToSessionConnection.computeIfAbsent(
@@ -947,6 +948,7 @@ public class Session {
       updateTSInsertStringRecordsReq(
           request, deviceIds.get(i), times.get(i), measurementsList.get(i), valuesList.get(i));
     }
+    long start = System.currentTimeMillis();
     // TODO parallel
     StringBuilder errMsgBuilder = new StringBuilder();
     for (Entry<SessionConnection, TSInsertStringRecordsReq> entry : recordsGroup.entrySet()) {
@@ -964,6 +966,12 @@ public class Session {
         throw e;
       }
     }
+    long end = System.currentTimeMillis();
+    logger.info(
+        "insert {} rows to {} nodes costs {} ms",
+        deviceIds.size(),
+        recordsGroup.size(),
+        end - start);
     String errMsg = errMsgBuilder.toString();
     if (!errMsg.isEmpty()) {
       throw new StatementExecutionException(errMsg);
@@ -1174,6 +1182,7 @@ public class Session {
           typesList.get(i),
           valuesList.get(i));
     }
+    long start = System.currentTimeMillis();
     // TODO parallel
     StringBuilder errMsgBuilder = new StringBuilder();
     for (Entry<SessionConnection, TSInsertRecordsReq> entry : recordsGroup.entrySet()) {
@@ -1191,6 +1200,12 @@ public class Session {
         throw e;
       }
     }
+    long end = System.currentTimeMillis();
+    logger.info(
+        "insert {} rows to {} nodes costs {} ms",
+        deviceIds.size(),
+        recordsGroup.size(),
+        end - start);
     String errMsg = errMsgBuilder.toString();
     if (!errMsg.isEmpty()) {
       throw new StatementExecutionException(errMsg);