public TSStatus createSchemaTemplate(final CreateSchemaTemplatePlan createSchemaTemplatePlan) {
    try {
      final Template template = createSchemaTemplatePlan.getTemplate();
      templateTable.createTemplate(template);
      return new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode());
    } catch (MetadataException e) {
      return RpcUtils.getStatus(e.getErrorCode(), e.getMessage());
    }
  }
Only leader use this interface. Get the maxRegionGroupNum of specified Database.

@param database DatabaseName
@param consensusGroupType SchemaRegion or DataRegion
@return maxSchemaRegionGroupNum or maxDataRegionGroupNum
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/schema/ClusterSchemaInfo.java