private static void insertAlignedStringRecords()
      throws IoTDBConnectionException, StatementExecutionException {
    List<String> deviceIds = new ArrayList<>();
    List<List<String>> measurementsList = new ArrayList<>();
    List<Long> times = new ArrayList<>();
    List<List<String>> valueList = new ArrayList<>();

    for (long time = 1; time < 5; time++) {
      List<String> measurements = new ArrayList<>();
      measurements.add("s1");
      measurements.add("s2");

      List<String> values = new ArrayList<>();
      values.add("3");
      values.add("4");

      deviceIds.add(ROOT_SG2_D1_VECTOR5);
      times.add(time);
      measurementsList.add(measurements);
      valueList.add(values);
    }
    session.insertAlignedRecords(deviceIds, times, measurementsList, valueList);
  }
Method 2 for insert tablet with aligned timeseries
example/session/src/main/java/org/apache/iotdb/AlignedTimeseriesSessionExample.java