@SuppressWarnings({"squid:S112"}) // ignore Generic exceptions should never be throw
  @Override
  public void insertTablet(Tablet tablet, boolean sorted)
      throws IoTDBConnectionException, StatementExecutionException {
    /*
     *  A Tablet example:
     *        device1
     *     time s1, s2, s3
     *     1,   1,  1,  1
     *     2,   2,  2,  2
     *     3,   3,  3,  3
     */

    ISession session = getSession();
    try {
      session.insertTablet(tablet, sorted);
      putBack(session);
    } catch (IoTDBConnectionException e) {
      // TException means the connection is broken, remove it and get a new one.
      LOGGER.warn("insertTablet failed", e);
      cleanSessionAndMayThrowConnectionException(session, FINAL_RETRY, e);
    } catch (StatementExecutionException | RuntimeException e) {
      putBack(session);
      throw e;
    } catch (Throwable e) {
      LOGGER.error("unexpected error in insertTablet", e);
      putBack(session);
      throw new RuntimeException(e);
    }
  }
insert the data of a device. For each timestamp, the number of measurements is the same.

<p>Users need to control the count of Tablet and write a batch when it reaches the maxBatchSize

@param tablet a tablet data of one device
@param sorted whether times in Tablet are in ascending order
iotdb-client/session/src/main/java/org/apache/iotdb/session/pool/SessionPool.java