private void updateTSInsertTabletsReq(
      TSInsertTabletsReq request, Tablet tablet, boolean sorted, boolean isAligned) {
    if (!checkSorted(tablet)) {
      sortTablet(tablet);
    }
    request.addToPrefixPaths(tablet.getDeviceId());
    List<String> measurements = new ArrayList<>();
    List<Integer> dataTypes = new ArrayList<>();
    request.setIsAligned(isAligned);
    for (IMeasurementSchema measurementSchema : tablet.getSchemas()) {
      if (measurementSchema.getMeasurementName() == null) {
        throw new IllegalArgumentException("measurement should be non null value");
      }
      measurements.add(measurementSchema.getMeasurementName());
      dataTypes.add(measurementSchema.getType().ordinal());
    }
    request.addToMeasurementsList(measurements);
    request.addToTypesList(dataTypes);
    request.addToTimestampsList(SessionUtils.getTimeBuffer(tablet));
    request.addToValuesList(SessionUtils.getValueBuffer(tablet));
    request.addToSizeList(tablet.getRowSize());
  }
insert aligned data of several devices. Given a device, for each timestamp, the number of
measurements is the same.

@param tablets data batch in multiple device
@param sorted deprecated, whether times in each Tablet are in ascending order
iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java