@Override
  public void addUnalignedMeasurementInTemplate(
      String templateName,
      String measurementPath,
      TSDataType dataType,
      TSEncoding encoding,
      CompressionType compressor)
      throws IOException, IoTDBConnectionException, StatementExecutionException {
    TSAppendSchemaTemplateReq req = new TSAppendSchemaTemplateReq();
    req.setName(templateName);
    req.setMeasurements(Collections.singletonList(measurementPath));
    req.setDataTypes(Collections.singletonList(dataType.ordinal()));
    req.setEncodings(Collections.singletonList(encoding.ordinal()));
    req.setCompressors(Collections.singletonList((int) compressor.serialize()));
    req.setIsAligned(false);
    defaultSessionConnection.appendSchemaTemplate(req);
  }
@param templateName Template to add a single unaligned measurement.
@param measurementPath If prefix of path exists in template but aligned, throw exception.
iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java