@Override
  public void createSchemaTemplate(
      String templateName,
      List<String> measurements,
      List<TSDataType> dataTypes,
      List<TSEncoding> encodings,
      List<CompressionType> compressors,
      boolean isAligned)
      throws IOException, IoTDBConnectionException, StatementExecutionException {
    for (int i = 0; i < RETRY; i++) {
      ISession session = getSession();
      try {
        session.createSchemaTemplate(
            templateName, measurements, dataTypes, encodings, compressors, isAligned);
        putBack(session);
        return;
      } catch (IoTDBConnectionException e) {
        // TException means the connection is broken, remove it and get a new one.
        LOGGER.warn(CREATE_SCHEMA_TEMPLATE_FAIL, e);
        cleanSessionAndMayThrowConnectionException(session, i, e);
      } catch (StatementExecutionException | RuntimeException e) {
        putBack(session);
        throw e;
      } catch (Throwable e) {
        LOGGER.error(CREATE_SCHEMA_TEMPLATE_ERROR_MSG, e);
        putBack(session);
        throw new RuntimeException(e);
      }
    }
  }
Create a template with flat measurements, not tree structured. Need to specify datatype,
encoding and compressor of each measurement, and alignment of these measurements at once.

@oaram templateName name of template to create
@param measurements flat measurements of the template, cannot contain character dot
@param dataTypes datatype of each measurement in the template
@param encodings encodings of each measurement in the template
@param compressors compression type of each measurement in the template
@param isAligned specify whether these flat measurements are aligned
iotdb-client/session/src/main/java/org/apache/iotdb/session/pool/SessionPool.java