private static void insertTabletWithAlignedTimeseriesMethod(int minTime, int maxTime)
      throws IoTDBConnectionException, StatementExecutionException {
    // The schema of measurements of one device
    // only measurementId and data type in MeasurementSchema take effects in Tablet
    List<IMeasurementSchema> schemaList = new ArrayList<>();
    schemaList.add(new MeasurementSchema("s1", TSDataType.INT64));
    schemaList.add(new MeasurementSchema("s2", TSDataType.INT32));

    Tablet tablet = new Tablet(ROOT_SG1_ALIGNEDDEVICE, schemaList);
    long timestamp = minTime;

    for (long row = minTime; row < maxTime; row++) {
      int rowIndex = tablet.getRowSize();
      tablet.addTimestamp(rowIndex, timestamp);
      tablet.addValue(schemaList.get(0).getMeasurementName(), rowIndex, row * 10 + 1L);
      tablet.addValue(schemaList.get(1).getMeasurementName(), rowIndex, (int) (row * 10 + 2));

      if (tablet.getRowSize() == tablet.getMaxRowNumber()) {
        session.insertAlignedTablet(tablet, true);
        tablet.reset();
      }
      timestamp++;
    }

    if (tablet.getRowSize() != 0) {
      session.insertAlignedTablet(tablet);
      tablet.reset();
    }
  }
Method 1 for insert tablet with aligned timeseries
example/session/src/main/java/org/apache/iotdb/HybridTimeseriesSessionExample.java