SilverNarcissus commented on a change in pull request #1337:
URL: https://github.com/apache/iotdb/pull/1337#discussion_r514916748
##########
File path: example/session/src/main/java/org/apache/iotdb/SessionExample.java
##########
@@ -230,8 +251,34 @@ private static void insertRecords() throws
IoTDBConnectionException, StatementEx
}
}
+ for (long time = 500; time < 1000; time++) {
Review comment:
May add some comments to remind user this block is for async insert
##########
File path: example/session/src/main/java/org/apache/iotdb/SessionExample.java
##########
@@ -294,13 +341,27 @@ private static void insertTablet() throws
IoTDBConnectionException, StatementExe
}
}
+ for (long time = 100; time < 200; time++) {
+ int row = tablet.rowSize++;
+ timestamps[row] = time;
+ for (int i = 0; i < 3; i++) {
+ long[] sensor = (long[]) values[i];
+ sensor[row] = i;
+ }
+ if (tablet.rowSize == tablet.getMaxRowNumber()) {
+ session.asyncInsertTablet(tablet, true, 1000, null);
+ tablet.reset();
+ }
+ }
+
if (tablet.rowSize != 0) {
session.insertTablet(tablet);
Review comment:
This should be async insert tablet. Same as below.
----------------------------------------------------------------
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:
[email protected]