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 2020/03/06 02:30:44 UTC

[GitHub] [incubator-iotdb] SilverNarcissus opened a new pull request #888: [IOTDB-442]Add session api

SilverNarcissus opened a new pull request #888: [IOTDB-442]Add session api
URL: https://github.com/apache/incubator-iotdb/pull/888
 
 
   Add some new session api proposed in IOTDB-422

----------------------------------------------------------------
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

[GitHub] [incubator-iotdb] jixuan1989 commented on a change in pull request #888: [IOTDB-442]Add session api

Posted by GitBox <gi...@apache.org>.
jixuan1989 commented on a change in pull request #888: [IOTDB-442]Add session api
URL: https://github.com/apache/incubator-iotdb/pull/888#discussion_r389850769
 
 

 ##########
 File path: session/src/main/java/org/apache/iotdb/session/Session.java
 ##########
 @@ -357,6 +392,23 @@ private Object sortList(Object valueList, TSDataType dataType, Integer[] index)
     }
   }
 
+  /**
+   * insert data in one row, if you want improve your performance, please use insertInBatch method
+   * or insertBatch method
+   *
+   * @see Session#insertInBatch(List, List, List, List)
+   * @see Session#insertBatch(RowBatch)
+   */
+  public TSStatus insert(String deviceId, long time, List<String> measurements,
+      Object... values) throws IoTDBSessionException {
+    List<String> stringValues = new ArrayList<>();
+    for (Object o : values) {
+      stringValues.add(o.toString());
 
 Review comment:
   I think this implementation is just an syntactic sugar...
   Is there a possible way to send exact class instances (integer, float, etc..) to the server directly, to avoid the server calling functions like `Integer.parse()` 

----------------------------------------------------------------
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

[GitHub] [incubator-iotdb] qiaojialin merged pull request #888: [IOTDB-442]Add session api

Posted by GitBox <gi...@apache.org>.
qiaojialin merged pull request #888: [IOTDB-442]Add session api
URL: https://github.com/apache/incubator-iotdb/pull/888
 
 
   

----------------------------------------------------------------
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

[GitHub] [incubator-iotdb] SilverNarcissus commented on a change in pull request #888: [IOTDB-442]Add session api

Posted by GitBox <gi...@apache.org>.
SilverNarcissus commented on a change in pull request #888: [IOTDB-442]Add session api
URL: https://github.com/apache/incubator-iotdb/pull/888#discussion_r390043411
 
 

 ##########
 File path: session/src/main/java/org/apache/iotdb/session/Session.java
 ##########
 @@ -357,6 +392,23 @@ private Object sortList(Object valueList, TSDataType dataType, Integer[] index)
     }
   }
 
+  /**
+   * insert data in one row, if you want improve your performance, please use insertInBatch method
+   * or insertBatch method
+   *
+   * @see Session#insertInBatch(List, List, List, List)
+   * @see Session#insertBatch(RowBatch)
+   */
+  public TSStatus insert(String deviceId, long time, List<String> measurements,
+      Object... values) throws IoTDBSessionException {
+    List<String> stringValues = new ArrayList<>();
+    for (Object o : values) {
+      stringValues.add(o.toString());
 
 Review comment:
   Yes, but after using byte buffer, the performance goes down. The test result is at: https://tower.im/teams/138444/todos/12089/
   If we want to let performance raise, we may refactor InsertPlan.

----------------------------------------------------------------
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