neuyilan commented on a change in pull request #2454:
URL: https://github.com/apache/iotdb/pull/2454#discussion_r555008256
##########
File path: server/src/main/java/org/apache/iotdb/db/service/TSServiceImpl.java
##########
@@ -1560,29 +1551,68 @@ public TSStatus insertTablets(TSInsertTabletsReq req) {
}
}
- public List<TSStatus> insertTabletsInternal(TSInsertTabletsReq req) throws
IllegalPathException {
- List<TSStatus> statusList = new ArrayList<>();
+ private InsertTabletPlan constructInsertTabletPlan(TSInsertTabletsReq req,
int i)
+ throws IllegalPathException {
+ InsertTabletPlan insertTabletPlan = new InsertTabletPlan(
+ new PartialPath(req.deviceIds.get(i)),
+ req.measurementsList.get(i));
+ insertTabletPlan.setTimes(
+ QueryDataSetUtils.readTimesFromBuffer(req.timestampsList.get(i),
req.sizeList.get(i)));
+ insertTabletPlan.setColumns(
+ QueryDataSetUtils.readValuesFromBuffer(
+ req.valuesList.get(i), req.typesList.get(i),
req.measurementsList.get(i).size(),
+ req.sizeList.get(i)));
+ insertTabletPlan.setRowCount(req.sizeList.get(i));
+ insertTabletPlan.setDataTypes(req.typesList.get(i));
+ return insertTabletPlan;
+ }
+ /**
+ * process the TSInsertTabletsReq by Split it into many InsertTabletPlan
+ */
+ public TSStatus insertTabletsInternalV1(TSInsertTabletsReq req) throws
IllegalPathException {
Review comment:
I originally wanted to keep this version, I'll remove it
----------------------------------------------------------------
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]