You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2019/11/27 11:59:15 UTC

[GitHub] [incubator-iotdb] samperson1997 commented on a change in pull request #588: Iotdb 323 batch insert in session

samperson1997 commented on a change in pull request #588: Iotdb 323 batch insert in session
URL: https://github.com/apache/incubator-iotdb/pull/588#discussion_r351231409
 
 

 ##########
 File path: session/src/main/java/org/apache/iotdb/session/Session.java
 ##########
 @@ -173,7 +191,39 @@ public synchronized TSExecuteBatchStatementResp insertBatch(RowBatch rowBatch)
     }
   }
 
-  public synchronized TSStatus insert(String deviceId, long time, List<String> measurements,
+  /**
+   * insert data in batch format, which can reduce the overhead of network
+   */
+  public TSStatus insertInBatch(List<String> deviceIds, List<Long> times,
+      List<List<String>> measurementsList,
+      List<List<String>> valuesList)
+      throws IoTDBSessionException {
+    // check params size
+    int len = deviceIds.size();
+    if(len != times.size() || len != measurementsList.size() || len != valuesList.size()){
 
 Review comment:
   Code style is wrong.
   ```suggestion
       if (len != times.size() || len != measurementsList.size() || len != valuesList.size()) {
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services