@Override
  public boolean stop() {
    if (currentServiceFuture != null) {
      currentServiceFuture.cancel(true);
      currentServiceFuture = null;
    }
    if (sessionPool != null) {
      sessionPool.close();
    }
    LOGGER.info("IoTDBSessionReporter stop!");
    return true;
  }
The session pool to write metrics.
iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/reporter/iotdb/IoTDBSessionReporter.java