You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by zy...@apache.org on 2023/04/05 11:57:06 UTC

[iotdb] branch master updated: [IOTDB-5707] Rename CreateTimeseriesOfSchemaTemplate to CreateTimeseriesUsingSchemaTemplate (#9489)

This is an automated email from the ASF dual-hosted git repository.

zyk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/master by this push:
     new b398cbd4d5 [IOTDB-5707] Rename CreateTimeseriesOfSchemaTemplate to CreateTimeseriesUsingSchemaTemplate (#9489)
b398cbd4d5 is described below

commit b398cbd4d556a6bb939911b932342b949bb5f559
Author: Marcos_Zyk <38...@users.noreply.github.com>
AuthorDate: Wed Apr 5 19:56:58 2023 +0800

    [IOTDB-5707] Rename CreateTimeseriesOfSchemaTemplate to CreateTimeseriesUsingSchemaTemplate (#9489)
---
 .../org/apache/iotdb/db/qp/sql/IoTDBSqlParser.g4   |  6 +-
 docs/UserGuide/API/Programming-Java-Native-API.md  | 93 ++++++++++------------
 docs/UserGuide/Operate-Metadata/Template.md        |  6 +-
 .../UserGuide/API/Programming-Java-Native-API.md   | 83 ++++++++-----------
 docs/zh/UserGuide/Operate-Metadata/Template.md     |  6 +-
 .../session/it/IoTDBSessionSchemaTemplateIT.java   |  6 +-
 .../java/org/apache/iotdb/isession/ISession.java   |  2 +-
 .../apache/iotdb/isession/pool/ISessionPool.java   |  2 +-
 .../iotdb/db/mpp/plan/parser/ASTVisitor.java       |  4 +-
 .../service/thrift/impl/ClientRPCServiceImpl.java  |  4 +-
 .../java/org/apache/iotdb/session/Session.java     |  8 +-
 .../apache/iotdb/session/SessionConnection.java    |  9 ++-
 .../org/apache/iotdb/session/pool/SessionPool.java |  4 +-
 thrift/src/main/thrift/client.thrift               |  4 +-
 14 files changed, 106 insertions(+), 131 deletions(-)

diff --git a/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/IoTDBSqlParser.g4 b/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/IoTDBSqlParser.g4
index 83cedcc380..9a703e8946 100644
--- a/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/IoTDBSqlParser.g4
+++ b/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/IoTDBSqlParser.g4
@@ -42,7 +42,7 @@ ddlStatement
     | createTimeseries | dropTimeseries | alterTimeseries
     | showDevices | showTimeseries | showChildPaths | showChildNodes | countDevices | countTimeseries | countNodes
     // Schema Template
-    | createSchemaTemplate | createTimeseriesOfSchemaTemplate | dropSchemaTemplate | dropTimeseriesOfSchemaTemplate
+    | createSchemaTemplate | createTimeseriesUsingSchemaTemplate | dropSchemaTemplate | dropTimeseriesOfSchemaTemplate
     | showSchemaTemplates | showNodesInSchemaTemplate | showPathsUsingSchemaTemplate | showPathsSetSchemaTemplate
     | setSchemaTemplate | unsetSchemaTemplate
     // TTL
@@ -225,8 +225,8 @@ templateMeasurementClause
     ;
 
 // ---- Create Timeseries Of Schema Template
-createTimeseriesOfSchemaTemplate
-    : CREATE TIMESERIES OF SCHEMA TEMPLATE ON prefixPath
+createTimeseriesUsingSchemaTemplate
+    : CREATE TIMESERIES (OF | USING) SCHEMA TEMPLATE ON prefixPath
     ;
 
 // ---- Drop Schema Template
diff --git a/docs/UserGuide/API/Programming-Java-Native-API.md b/docs/UserGuide/API/Programming-Java-Native-API.md
index 817223155d..4fffd270b0 100644
--- a/docs/UserGuide/API/Programming-Java-Native-API.md
+++ b/docs/UserGuide/API/Programming-Java-Native-API.md
@@ -61,7 +61,7 @@ Here we show the commonly used interfaces and their parameters in the Native API
 
 * Initialize a Session
 
-```java
+``` java
 // use default configuration 
 session = new Session.Builder.build();
 
@@ -95,13 +95,13 @@ Version represents the SQL semantic version used by the client, which is used to
 
 * Open a Session
 
-```java
+``` java
 void open()
 ```
 
 * Open a session, with a parameter to specify whether to enable RPC compression
   
-```java
+``` java
 void open(boolean enableRPCCompression)
 ```
 
@@ -109,7 +109,7 @@ Notice: this RPC compression status of client must comply with that of IoTDB ser
 
 * Close a Session
 
-```java
+``` java
 void close()
 ```
 
@@ -119,13 +119,13 @@ void close()
 
 * CREATE DATABASE
 
-```java
+``` java
 void setStorageGroup(String storageGroupId)    
 ```
 
 * Delete one or several databases
 
-```java
+``` java
 void deleteStorageGroup(String storageGroup)
 void deleteStorageGroups(List<String> storageGroups)
 ```
@@ -134,7 +134,7 @@ void deleteStorageGroups(List<String> storageGroups)
 
 * Create one or multiple timeseries
 
-```java
+``` java
 void createTimeseries(String path, TSDataType dataType,
       TSEncoding encoding, CompressionType compressor, Map<String, String> props,
       Map<String, String> tags, Map<String, String> attributes, String measurementAlias)
@@ -156,14 +156,14 @@ Attention: Alias of measurements are **not supported** currently.
 
 * Delete one or several timeseries
 
-```java
+``` java
 void deleteTimeseries(String path)
 void deleteTimeseries(List<String> paths)
 ```
 
 * Check whether the specific timeseries exists.
 
-```java
+``` java
 boolean checkTimeseriesExists(String path)
 ```
 
@@ -172,7 +172,7 @@ boolean checkTimeseriesExists(String path)
 
 Create a schema template for massive identical devices will help to improve memory performance. You can use Template, InternalNode and MeasurementNode to depict the structure of the template, and use belowed interface to create it inside session.
 
-```java
+``` java
 public void createSchemaTemplate(Template template);
 
 Class Template {
@@ -207,7 +207,7 @@ We strongly suggest you implement templates only with flat-measurement (like obj
 
 A snippet of using above Method and Class:
 
-```java
+``` java
 MeasurementNode nodeX = new MeasurementNode("x", TSDataType.FLOAT, TSEncoding.RLE, CompressionType.SNAPPY);
 MeasurementNode nodeY = new MeasurementNode("y", TSDataType.FLOAT, TSEncoding.RLE, CompressionType.SNAPPY);
 MeasurementNode nodeSpeed = new MeasurementNode("speed", TSDataType.DOUBLE, TSEncoding.GORILLA, CompressionType.SNAPPY);
@@ -221,25 +221,6 @@ template.addToTemplate(nodeSpeed);
 createSchemaTemplate(flatTemplate);
 ```
 
-You can query measurement inside templates with these APIS:
-
-```java
-// Return the amount of measurements inside a template
-public int countMeasurementsInTemplate(String templateName);
-
-// Return true if path points to a measurement, otherwise returne false
-public boolean isMeasurementInTemplate(String templateName, String path);
-
-// Return true if path exists in template, otherwise return false
-public boolean isPathExistInTemplate(String templateName, String path);
-
-// Return all measurements paths inside template
-public List<String> showMeasurementsInTemplate(String templateName);
-
-// Return all measurements paths under the designated patter inside template
-public List<String> showMeasurementsInTemplate(String templateName, String pattern);
-```
-
 To implement schema template, you can set the measurement template named 'templateName' at path 'prefixPath'.
 
 **Please notice that, we strongly recommend not setting templates on the nodes above the database to accommodate future updates and collaboration between modules.**
@@ -250,13 +231,19 @@ void setSchemaTemplate(String templateName, String prefixPath)
 
 Before setting template, you should firstly create the template using
 
-```java
+``` java
 void createSchemaTemplate(Template template)
 ```
 
+After setting template to a certain path, you can use the template to create timeseries on given device paths through the following interface, or you can write data directly to trigger timeseries auto creation using schema template under target devices. 
+
+``` java
+void createTimeseriesUsingSchemaTemplate(List<String> devicePathList)
+```
+
 After setting template to a certain path, you can query for info about template using belowed interface in session:
 
-```java
+``` java
 /** @return All template names. */
 public List<String> showAllTemplates();
 
@@ -269,7 +256,7 @@ public List<String> showPathsTemplateUsingOn(String templateName)
 
 If you are ready to get rid of schema template, you can drop it with belowed interface. Make sure the template to drop has been unset from MTree.
 
-```java
+``` java
 void unsetSchemaTemplate(String prefixPath, String templateName);
 public void dropSchemaTemplate(String templateName);
 ```
@@ -289,7 +276,7 @@ It is recommended to use insertTablet to help improve write efficiency.
   * **Better Write Performance**
   * **Support null values**: fill the null value with any value, and then mark the null value via BitMap
 
-```java
+``` java
 void insertTablet(Tablet tablet)
 
 public class Tablet {
@@ -314,7 +301,7 @@ public class Tablet {
 
 * Insert multiple Tablets
 
-```java
+``` java
 void insertTablets(Map<String, Tablet> tablet)
 ```
 
@@ -331,14 +318,14 @@ void insertTablets(Map<String, Tablet> tablet)
   | DOUBLE     | Double         |
   | TEXT       | String, Binary |
 
-```java
+``` java
 void insertRecord(String deviceId, long time, List<String> measurements,
    List<TSDataType> types, List<Object> values)
 ```
 
 * Insert multiple Records
 
-```java
+``` java
 void insertRecords(List<String> deviceIds, List<Long> times,
     List<List<String>> measurementsList, List<List<TSDataType>> typesList,
     List<List<Object>> valuesList)
@@ -346,7 +333,7 @@ void insertRecords(List<String> deviceIds, List<Long> times,
 * Insert multiple Records that belong to the same device. 
   With type info the server has no need to do type inference, which leads a better performance
 
-```java
+``` java
 void insertRecordsOfOneDevice(String deviceId, List<Long> times,
     List<List<String>> measurementsList, List<List<TSDataType>> typesList,
     List<List<Object>> valuesList)
@@ -358,20 +345,20 @@ When the data is of String type, we can use the following interface to perform t
 
 * Insert a Record, which contains multiple measurement value of a device at a timestamp
 
-```java
+``` java
 void insertRecord(String prefixPath, long time, List<String> measurements, List<String> values)
 ```
 
 * Insert multiple Records
 
-```java
+``` java
 void insertRecords(List<String> deviceIds, List<Long> times, 
    List<List<String>> measurementsList, List<List<String>> valuesList)
 ```
 
 * Insert multiple Records that belong to the same device.
 
-```java
+``` java
 void insertStringRecordsOfOneDevice(String deviceId, List<Long> times,
         List<List<String>> measurementsList, List<List<String>> valuesList)
 ```
@@ -391,7 +378,7 @@ The Insert of aligned timeseries uses interfaces like insertAlignedXXX, and othe
 
 * Delete data before or equal to a timestamp of one or several timeseries
 
-```java
+``` java
 void deleteData(String path, long time)
 void deleteData(List<String> paths, long time)
 ```
@@ -401,14 +388,14 @@ void deleteData(List<String> paths, long time)
 * Time-series raw data query with time range:
   - The specified query time range is a left-closed right-open interval, including the start time but excluding the end time.
 
-```java
+``` java
 SessionDataSet executeRawDataQuery(List<String> paths, long startTime, long endTime);
 ```
 
 * Last query: 
   - Query the last data, whose timestamp is greater than or equal LastTime.
 
-```java
+``` java
 SessionDataSet executeLastDataQuery(List<String> paths, long LastTime);
 ```
 
@@ -416,7 +403,7 @@ SessionDataSet executeLastDataQuery(List<String> paths, long LastTime);
   - Support specified query time range: The specified query time range is a left-closed right-open interval, including the start time but not the end time.
   - Support GROUP BY TIME.
 
-```java
+``` java
 SessionDataSet executeAggregationQuery(List<String> paths, List<Aggregation> aggregations);
 
 SessionDataSet executeAggregationQuery(
@@ -442,13 +429,13 @@ SessionDataSet executeAggregationQuery(
 
 * Execute query statement
 
-```java
+``` java
 SessionDataSet executeQueryStatement(String sql)
 ```
 
 * Execute non query statement
 
-```java
+``` java
 void executeNonQueryStatement(String sql)
 ```
 
@@ -458,7 +445,7 @@ These methods **don't** insert data into database and server just return after a
 
 * Test the network and client cost of insertRecord
 
-```java
+``` java
 void testInsertRecord(String deviceId, long time, List<String> measurements, List<String> values)
 
 void testInsertRecord(String deviceId, long time, List<String> measurements,
@@ -467,7 +454,7 @@ void testInsertRecord(String deviceId, long time, List<String> measurements,
 
 * Test the network and client cost of insertRecords
 
-```java
+``` java
 void testInsertRecords(List<String> deviceIds, List<Long> times,
         List<List<String>> measurementsList, List<List<String>> valuesList)
         
@@ -478,13 +465,13 @@ void testInsertRecords(List<String> deviceIds, List<Long> times,
 
 * Test the network and client cost of insertTablet
 
-```java
+``` java
 void testInsertTablet(Tablet tablet)
 ```
 
 * Test the network and client cost of insertTablets
 
-```java
+``` java
 void testInsertTablets(Map<String, Tablet> tablets)
 ```
 
@@ -579,7 +566,7 @@ APIs in `ClusterInfoService.Client`:
 
 * Get the physical hash ring of the cluster:
 
-```java
+``` java
 list<Node> getRing();
 ```
 
@@ -604,7 +591,7 @@ list<Node> getMetaPartition(1:string path);
 ```
 
 * Get the status (alive or not) of all nodes:
-```java
+``` java
 /**
  * @return key: node, value: live or not
  */
diff --git a/docs/UserGuide/Operate-Metadata/Template.md b/docs/UserGuide/Operate-Metadata/Template.md
index 686156b026..194bb4ecd9 100644
--- a/docs/UserGuide/Operate-Metadata/Template.md
+++ b/docs/UserGuide/Operate-Metadata/Template.md
@@ -70,15 +70,15 @@ After setting the schema template, with the system enabled to auto create schema
 **Attention**: Before inserting data or the system not enabled to auto create schema, timeseries defined by the schema template will not be created. You can use the following SQL statement to create the timeseries or activate the schema template, act before inserting data:
 
 ```shell
-IoTDB> create timeseries of schema template on root.sg1.d1
+IoTDB> create timeseries using schema template on root.sg1.d1
 ```
 
 **Example:** Execute the following statement
 ```shell
 IoTDB> set schema template t1 to root.sg1.d1
 IoTDB> set schema template t2 to root.sg1.d2
-IoTDB> create timeseries of schema template on root.sg1.d1
-IoTDB> create timeseries of schema template on root.sg1.d2
+IoTDB> create timeseries using schema template on root.sg1.d1
+IoTDB> create timeseries using schema template on root.sg1.d2
 ```
 
 Show the time series:
diff --git a/docs/zh/UserGuide/API/Programming-Java-Native-API.md b/docs/zh/UserGuide/API/Programming-Java-Native-API.md
index 6139fc0c71..e3469590de 100644
--- a/docs/zh/UserGuide/API/Programming-Java-Native-API.md
+++ b/docs/zh/UserGuide/API/Programming-Java-Native-API.md
@@ -66,7 +66,7 @@ mvn clean install -pl session -am -Dmaven.test.skip=true
 
 * 初始化 Session
 
-```java
+``` java
 // 全部使用默认配置
 session = new Session.Builder.build();
 
@@ -100,13 +100,13 @@ session =
 
 * 开启 Session
 
-```java
+``` java
 void open()
 ```
 
 * 开启 Session,并决定是否开启 RPC 压缩
 
-```java
+``` java
 void open(boolean enableRPCCompression)
 ```
 
@@ -114,7 +114,7 @@ void open(boolean enableRPCCompression)
 
 * 关闭 Session
 
-```java
+``` java
 void close()
 ```
 
@@ -124,13 +124,13 @@ void close()
 
 * 设置 database
 
-```java
+``` java
 void setStorageGroup(String storageGroupId)
 ```
 
 * 删除单个或多个 database
 
-```java
+``` java
 void deleteStorageGroup(String storageGroup)
 void deleteStorageGroups(List<String> storageGroups)
 ```
@@ -138,7 +138,7 @@ void deleteStorageGroups(List<String> storageGroups)
 
 * 创建单个或多个时间序列
 
-```java
+``` java
 void createTimeseries(String path, TSDataType dataType,
       TSEncoding encoding, CompressionType compressor, Map<String, String> props,
       Map<String, String> tags, Map<String, String> attributes, String measurementAlias)
@@ -161,14 +161,14 @@ void createAlignedTimeseries(String prefixPath, List<String> measurements,
 
 * 删除一个或多个时间序列
 
-```java
+``` java
 void deleteTimeseries(String path)
 void deleteTimeseries(List<String> paths)
 ```
 
 * 检测时间序列是否存在
 
-```java
+``` java
 boolean checkTimeseriesExists(String path)
 ```
 
@@ -176,7 +176,7 @@ boolean checkTimeseriesExists(String path)
 
 * 创建元数据模板,可以通过先后创建 Template、MeasurementNode 的对象,描述模板内物理量结构与类型、编码方式、压缩方式等信息,并通过以下接口创建模板
 
-```java
+``` java
 public void createSchemaTemplate(Template template);
 
 Class Template {
@@ -209,7 +209,7 @@ Class MeasurementNode extends Node {
 
 通过上述类的实例描述模板时,Template 内应当仅能包含单层的 MeasurementNode,具体可以参见如下示例:
 
-```java
+``` java
 MeasurementNode nodeX = new MeasurementNode("x", TSDataType.FLOAT, TSEncoding.RLE, CompressionType.SNAPPY);
 MeasurementNode nodeY = new MeasurementNode("y", TSDataType.FLOAT, TSEncoding.RLE, CompressionType.SNAPPY);
 MeasurementNode nodeSpeed = new MeasurementNode("speed", TSDataType.DOUBLE, TSEncoding.GORILLA, CompressionType.SNAPPY);
@@ -223,23 +223,10 @@ template.addToTemplate(nodeSpeed);
 createSchemaTemplate(flatTemplate);
 ```
 
-* 对于已经创建的元数据模板,还可以通过以下接口查询模板信息:
-
-```java
-// 查询返回目前模板中所有物理量的数量
-public int countMeasurementsInTemplate(String templateName);
-
-// 检查模板内指定路径是否为物理量
-public boolean isMeasurementInTemplate(String templateName, String path);
-
-// 检查在指定模板内是否存在某路径
-public boolean isPathExistInTemplate(String templateName, String path);
-
-// 返回指定模板内所有物理量的路径
-public List<String> showMeasurementsInTemplate(String templateName);
+* 完成模板挂载操作后,可以通过如下的接口在给定的设备上使用模板注册序列,或者也可以直接向相应的设备写入数据以自动使用模板注册序列。
 
-// 返回指定模板内某前缀路径下的所有物理量的路径
-public List<String> showMeasurementsInTemplate(String templateName, String pattern);
+``` java
+void createTimeseriesUsingSchemaTemplate(List<String> devicePathList)
 ```
 
 * 将名为'templateName'的元数据模板挂载到'prefixPath'路径下,在执行这一步之前,你需要创建名为'templateName'的元数据模板
@@ -251,7 +238,7 @@ void setSchemaTemplate(String templateName, String prefixPath)
 
 - 将模板挂载到 MTree 上之后,你可以随时查询所有模板的名称、某模板被设置到 MTree 的所有路径、所有正在使用某模板的所有路径,即如下接口:
 
-```java
+``` java
 /** @return All template names. */
 public List<String> showAllTemplates();
 
@@ -286,7 +273,7 @@ public void dropSchemaTemplate(String templateName);
   * **写入效率高**
   * **支持写入空值**:空值处可以填入任意值,然后通过 BitMap 标记空值
 
-```java
+``` java
 void insertTablet(Tablet tablet)
 
 public class Tablet {
@@ -311,7 +298,7 @@ public class Tablet {
 
 * 插入多个 Tablet
 
-```java
+``` java
 void insertTablets(Map<String, Tablet> tablets)
 ```
 
@@ -328,14 +315,14 @@ void insertTablets(Map<String, Tablet> tablets)
   | DOUBLE     | Double         |
   | TEXT       | String, Binary |
 
-```java
+``` java
 void insertRecord(String prefixPath, long time, List<String> measurements,
    List<TSDataType> types, List<Object> values)
 ```
 
 * 插入多个 Record
 
-```java
+``` java
 void insertRecords(List<String> deviceIds,
         List<Long> times,
         List<List<String>> measurementsList,
@@ -345,7 +332,7 @@ void insertRecords(List<String> deviceIds,
 
 * 插入同属于一个 device 的多个 Record
 
-```java
+``` java
 void insertRecordsOfOneDevice(String deviceId, List<Long> times,
     List<List<String>> measurementsList, List<List<TSDataType>> typesList,
     List<List<Object>> valuesList)
@@ -357,20 +344,20 @@ void insertRecordsOfOneDevice(String deviceId, List<Long> times,
 
 * 插入一个 Record,一个 Record 是一个设备一个时间戳下多个测点的数据
 
-```java
+``` java
 void insertRecord(String prefixPath, long time, List<String> measurements, List<String> values)
 ```
 
 * 插入多个 Record
 
-```java
+``` java
 void insertRecords(List<String> deviceIds, List<Long> times,
    List<List<String>> measurementsList, List<List<String>> valuesList)
 ```
 
 * 插入同属于一个 device 的多个 Record
 
-```java
+``` java
 void insertStringRecordsOfOneDevice(String deviceId, List<Long> times,
     List<List<String>> measurementsList, List<List<String>> valuesList)
 ```
@@ -390,7 +377,7 @@ void insertStringRecordsOfOneDevice(String deviceId, List<Long> times,
 
 * 删除一个或多个时间序列在某个时间点前或这个时间点的数据
 
-```java
+``` java
 void deleteData(String path, long endTime)
 void deleteData(List<String> paths, long endTime)
 ```
@@ -400,14 +387,14 @@ void deleteData(List<String> paths, long endTime)
 * 时间序列原始数据范围查询:
   - 指定的查询时间范围为左闭右开区间,包含开始时间但不包含结束时间。
 
-```java
+``` java
 SessionDataSet executeRawDataQuery(List<String> paths, long startTime, long endTime);
 ```
 
 * 最新点查询:
   - 查询最后一条时间戳大于等于某个时间点的数据。
 
-```java
+``` java
 SessionDataSet executeLastDataQuery(List<String> paths, long lastTime);
 ```
 
@@ -415,7 +402,7 @@ SessionDataSet executeLastDataQuery(List<String> paths, long lastTime);
   - 支持指定查询时间范围。指定的查询时间范围为左闭右开区间,包含开始时间但不包含结束时间。
   - 支持按照时间区间分段查询。
 
-```java
+``` java
 SessionDataSet executeAggregationQuery(List<String> paths, List<Aggregation> aggregations);
 
 SessionDataSet executeAggregationQuery(
@@ -441,13 +428,13 @@ SessionDataSet executeAggregationQuery(
 
 * 执行查询语句
 
-```java
+``` java
 SessionDataSet executeQueryStatement(String sql)
 ```
 
 * 执行非查询语句
 
-```java
+``` java
 void executeNonQueryStatement(String sql)
 ```
 
@@ -457,7 +444,7 @@ void executeNonQueryStatement(String sql)
 
 * 测试 insertRecord
 
-```java
+``` java
 void testInsertRecord(String deviceId, long time, List<String> measurements, List<String> values)
 
 void testInsertRecord(String deviceId, long time, List<String> measurements,
@@ -466,7 +453,7 @@ void testInsertRecord(String deviceId, long time, List<String> measurements,
 
 * 测试 testInsertRecords
 
-```java
+``` java
 void testInsertRecords(List<String> deviceIds, List<Long> times,
         List<List<String>> measurementsList, List<List<String>> valuesList)
 
@@ -477,13 +464,13 @@ void testInsertRecords(List<String> deviceIds, List<Long> times,
 
 * 测试 insertTablet
 
-```java
+``` java
 void testInsertTablet(Tablet tablet)
 ```
 
 * 测试 insertTablets
 
-```java
+``` java
 void testInsertTablets(Map<String, Tablet> tablets)
 ```
 
@@ -568,7 +555,7 @@ API 列表:
 
 * 获取集群中的各个节点的信息(构成哈希环)
 
-```java
+``` java
 list<Node> getRing();
 ```
 
@@ -593,7 +580,7 @@ list<Node> getMetaPartition(1:string path);
 ```
 
 * 获取所有节点的死活状态:
-```java
+``` java
 /**
  * @return key: node, value: live or not
  */
diff --git a/docs/zh/UserGuide/Operate-Metadata/Template.md b/docs/zh/UserGuide/Operate-Metadata/Template.md
index f01f470ee2..6ee5f07143 100644
--- a/docs/zh/UserGuide/Operate-Metadata/Template.md
+++ b/docs/zh/UserGuide/Operate-Metadata/Template.md
@@ -68,15 +68,15 @@ IoTDB> set schema template t1 to root.sg1.d1
 **注意**:在插入数据之前或系统未开启自动注册序列功能,模板定义的时间序列不会被创建。可以使用如下SQL语句在插入数据前创建时间序列即激活模板:
 
 ```shell
-IoTDB> create timeseries of schema template on root.sg1.d1
+IoTDB> create timeseries using schema template on root.sg1.d1
 ```
 
 **示例:** 执行以下语句
 ```shell
 IoTDB> set schema template t1 to root.sg1.d1
 IoTDB> set schema template t2 to root.sg1.d2
-IoTDB> create timeseries of schema template on root.sg1.d1
-IoTDB> create timeseries of schema template on root.sg1.d2
+IoTDB> create timeseries using schema template on root.sg1.d1
+IoTDB> create timeseries using schema template on root.sg1.d2
 ```
 
 查看此时的时间序列:
diff --git a/integration-test/src/test/java/org/apache/iotdb/session/it/IoTDBSessionSchemaTemplateIT.java b/integration-test/src/test/java/org/apache/iotdb/session/it/IoTDBSessionSchemaTemplateIT.java
index f81d627092..f06e9a44de 100644
--- a/integration-test/src/test/java/org/apache/iotdb/session/it/IoTDBSessionSchemaTemplateIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/session/it/IoTDBSessionSchemaTemplateIT.java
@@ -258,13 +258,13 @@ public class IoTDBSessionSchemaTemplateIT {
         new HashSet<>(Arrays.asList("root.db.v4", "root.db.v5", "root.db.v6")),
         new HashSet<>(session.showPathsTemplateSetOn("template2")));
 
-    session.createTimeseriesOfSchemaTemplate(Collections.singletonList("root.db.v1.GPS"));
+    session.createTimeseriesUsingSchemaTemplate(Collections.singletonList("root.db.v1.GPS"));
 
     assertEquals(
         new HashSet<>(Collections.singletonList("root.db.v1.GPS")),
         new HashSet<>(session.showPathsTemplateUsingOn("template1")));
 
-    session.createTimeseriesOfSchemaTemplate(Collections.singletonList("root.db.v5.GPS"));
+    session.createTimeseriesUsingSchemaTemplate(Collections.singletonList("root.db.v5.GPS"));
 
     assertEquals(
         new HashSet<>(Collections.singletonList("root.db.v1.GPS")),
@@ -274,7 +274,7 @@ public class IoTDBSessionSchemaTemplateIT {
         new HashSet<>(Collections.singletonList("root.db.v5.GPS")),
         new HashSet<>(session.showPathsTemplateUsingOn("template2")));
 
-    session.createTimeseriesOfSchemaTemplate(
+    session.createTimeseriesUsingSchemaTemplate(
         Arrays.asList("root.db.v2.GPS", "root.db.v3.GPS", "root.db.v4.GPS", "root.db.v6.GPS"));
 
     assertEquals(
diff --git a/isession/src/main/java/org/apache/iotdb/isession/ISession.java b/isession/src/main/java/org/apache/iotdb/isession/ISession.java
index 338e4cad37..4095afe368 100644
--- a/isession/src/main/java/org/apache/iotdb/isession/ISession.java
+++ b/isession/src/main/java/org/apache/iotdb/isession/ISession.java
@@ -478,7 +478,7 @@ public interface ISession extends AutoCloseable {
   void dropSchemaTemplate(String templateName)
       throws IoTDBConnectionException, StatementExecutionException;
 
-  void createTimeseriesOfSchemaTemplate(List<String> devicePathList)
+  void createTimeseriesUsingSchemaTemplate(List<String> devicePathList)
       throws IoTDBConnectionException, StatementExecutionException;
 
   boolean isEnableQueryRedirection();
diff --git a/isession/src/main/java/org/apache/iotdb/isession/pool/ISessionPool.java b/isession/src/main/java/org/apache/iotdb/isession/pool/ISessionPool.java
index 7e554478df..2f5c017540 100644
--- a/isession/src/main/java/org/apache/iotdb/isession/pool/ISessionPool.java
+++ b/isession/src/main/java/org/apache/iotdb/isession/pool/ISessionPool.java
@@ -394,7 +394,7 @@ public interface ISessionPool {
   void dropSchemaTemplate(String templateName)
       throws StatementExecutionException, IoTDBConnectionException;
 
-  void createTimeseriesOfSchemaTemplate(List<String> devicePathList)
+  void createTimeseriesUsingSchemaTemplate(List<String> devicePathList)
       throws StatementExecutionException, IoTDBConnectionException;
 
   SessionDataSetWrapper executeQueryStatement(String sql)
diff --git a/server/src/main/java/org/apache/iotdb/db/mpp/plan/parser/ASTVisitor.java b/server/src/main/java/org/apache/iotdb/db/mpp/plan/parser/ASTVisitor.java
index 934067f1a3..85eb0db088 100644
--- a/server/src/main/java/org/apache/iotdb/db/mpp/plan/parser/ASTVisitor.java
+++ b/server/src/main/java/org/apache/iotdb/db/mpp/plan/parser/ASTVisitor.java
@@ -3087,8 +3087,8 @@ public class ASTVisitor extends IoTDBSqlParserBaseVisitor<Statement> {
   }
 
   @Override
-  public Statement visitCreateTimeseriesOfSchemaTemplate(
-      IoTDBSqlParser.CreateTimeseriesOfSchemaTemplateContext ctx) {
+  public Statement visitCreateTimeseriesUsingSchemaTemplate(
+      IoTDBSqlParser.CreateTimeseriesUsingSchemaTemplateContext ctx) {
     ActivateTemplateStatement statement = new ActivateTemplateStatement();
     statement.setPath(parsePrefixPath(ctx.prefixPath()));
     return statement;
diff --git a/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/ClientRPCServiceImpl.java b/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/ClientRPCServiceImpl.java
index e06d03ea76..5d1d36f54e 100644
--- a/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/ClientRPCServiceImpl.java
+++ b/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/ClientRPCServiceImpl.java
@@ -72,7 +72,7 @@ import org.apache.iotdb.metrics.utils.MetricLevel;
 import org.apache.iotdb.rpc.RpcUtils;
 import org.apache.iotdb.rpc.TSStatusCode;
 import org.apache.iotdb.service.rpc.thrift.ServerProperties;
-import org.apache.iotdb.service.rpc.thrift.TCreateTimeseriesOfSchemaTemplateReq;
+import org.apache.iotdb.service.rpc.thrift.TCreateTimeseriesUsingSchemaTemplateReq;
 import org.apache.iotdb.service.rpc.thrift.TSAggregationQueryReq;
 import org.apache.iotdb.service.rpc.thrift.TSAppendSchemaTemplateReq;
 import org.apache.iotdb.service.rpc.thrift.TSBackupConfigurationResp;
@@ -1871,7 +1871,7 @@ public class ClientRPCServiceImpl implements IClientRPCServiceWithHandler {
   }
 
   @Override
-  public TSStatus createTimeseriesOfSchemaTemplate(TCreateTimeseriesOfSchemaTemplateReq req)
+  public TSStatus createTimeseriesUsingSchemaTemplate(TCreateTimeseriesUsingSchemaTemplateReq req)
       throws TException {
     try {
       IClientSession clientSession = SESSION_MANAGER.getCurrSessionAndUpdateIdleTime();
diff --git a/session/src/main/java/org/apache/iotdb/session/Session.java b/session/src/main/java/org/apache/iotdb/session/Session.java
index f900c834f4..ef54c71948 100644
--- a/session/src/main/java/org/apache/iotdb/session/Session.java
+++ b/session/src/main/java/org/apache/iotdb/session/Session.java
@@ -30,7 +30,7 @@ import org.apache.iotdb.rpc.IoTDBConnectionException;
 import org.apache.iotdb.rpc.NoValidValueException;
 import org.apache.iotdb.rpc.RedirectException;
 import org.apache.iotdb.rpc.StatementExecutionException;
-import org.apache.iotdb.service.rpc.thrift.TCreateTimeseriesOfSchemaTemplateReq;
+import org.apache.iotdb.service.rpc.thrift.TCreateTimeseriesUsingSchemaTemplateReq;
 import org.apache.iotdb.service.rpc.thrift.TSAppendSchemaTemplateReq;
 import org.apache.iotdb.service.rpc.thrift.TSBackupConfigurationResp;
 import org.apache.iotdb.service.rpc.thrift.TSConnectionInfoResp;
@@ -3346,11 +3346,11 @@ public class Session implements ISession {
    * @param devicePathList the target device paths used for timeseries creation
    */
   @Override
-  public void createTimeseriesOfSchemaTemplate(List<String> devicePathList)
+  public void createTimeseriesUsingSchemaTemplate(List<String> devicePathList)
       throws IoTDBConnectionException, StatementExecutionException {
-    TCreateTimeseriesOfSchemaTemplateReq request = new TCreateTimeseriesOfSchemaTemplateReq();
+    TCreateTimeseriesUsingSchemaTemplateReq request = new TCreateTimeseriesUsingSchemaTemplateReq();
     request.setDevicePathList(devicePathList);
-    defaultSessionConnection.createTimeseriesOfSchemaTemplate(request);
+    defaultSessionConnection.createTimeseriesUsingSchemaTemplate(request);
   }
 
   /**
diff --git a/session/src/main/java/org/apache/iotdb/session/SessionConnection.java b/session/src/main/java/org/apache/iotdb/session/SessionConnection.java
index 774d42c462..d5d90c4e23 100644
--- a/session/src/main/java/org/apache/iotdb/session/SessionConnection.java
+++ b/session/src/main/java/org/apache/iotdb/session/SessionConnection.java
@@ -30,7 +30,7 @@ import org.apache.iotdb.rpc.RpcTransportFactory;
 import org.apache.iotdb.rpc.RpcUtils;
 import org.apache.iotdb.rpc.StatementExecutionException;
 import org.apache.iotdb.service.rpc.thrift.IClientRPCService;
-import org.apache.iotdb.service.rpc.thrift.TCreateTimeseriesOfSchemaTemplateReq;
+import org.apache.iotdb.service.rpc.thrift.TCreateTimeseriesUsingSchemaTemplateReq;
 import org.apache.iotdb.service.rpc.thrift.TSAggregationQueryReq;
 import org.apache.iotdb.service.rpc.thrift.TSAppendSchemaTemplateReq;
 import org.apache.iotdb.service.rpc.thrift.TSBackupConfigurationResp;
@@ -1058,16 +1058,17 @@ public class SessionConnection {
     }
   }
 
-  protected void createTimeseriesOfSchemaTemplate(TCreateTimeseriesOfSchemaTemplateReq request)
+  protected void createTimeseriesUsingSchemaTemplate(
+      TCreateTimeseriesUsingSchemaTemplateReq request)
       throws IoTDBConnectionException, StatementExecutionException {
     request.setSessionId(sessionId);
     try {
-      RpcUtils.verifySuccess(client.createTimeseriesOfSchemaTemplate(request));
+      RpcUtils.verifySuccess(client.createTimeseriesUsingSchemaTemplate(request));
     } catch (TException e) {
       if (reconnect()) {
         try {
           request.setSessionId(sessionId);
-          RpcUtils.verifySuccess(client.createTimeseriesOfSchemaTemplate(request));
+          RpcUtils.verifySuccess(client.createTimeseriesUsingSchemaTemplate(request));
         } catch (TException tException) {
           throw new IoTDBConnectionException(tException);
         }
diff --git a/session/src/main/java/org/apache/iotdb/session/pool/SessionPool.java b/session/src/main/java/org/apache/iotdb/session/pool/SessionPool.java
index 4afd111bdd..369f723f2d 100644
--- a/session/src/main/java/org/apache/iotdb/session/pool/SessionPool.java
+++ b/session/src/main/java/org/apache/iotdb/session/pool/SessionPool.java
@@ -2401,12 +2401,12 @@ public class SessionPool implements ISessionPool {
     }
   }
 
-  public void createTimeseriesOfSchemaTemplate(List<String> devicePathList)
+  public void createTimeseriesUsingSchemaTemplate(List<String> devicePathList)
       throws StatementExecutionException, IoTDBConnectionException {
     for (int i = 0; i < RETRY; i++) {
       ISession session = getSession();
       try {
-        session.createTimeseriesOfSchemaTemplate(devicePathList);
+        session.createTimeseriesUsingSchemaTemplate(devicePathList);
         putBack(session);
         return;
       } catch (IoTDBConnectionException e) {
diff --git a/thrift/src/main/thrift/client.thrift b/thrift/src/main/thrift/client.thrift
index 2b58daff0f..ebb1ef1880 100644
--- a/thrift/src/main/thrift/client.thrift
+++ b/thrift/src/main/thrift/client.thrift
@@ -430,7 +430,7 @@ struct TSDropSchemaTemplateReq {
   2: required string templateName
 }
 
-struct TCreateTimeseriesOfSchemaTemplateReq{
+struct TCreateTimeseriesUsingSchemaTemplateReq{
   1: required i64 sessionId
   2: required list<string> devicePathList
 }
@@ -584,7 +584,7 @@ service IClientRPCService {
 
   common.TSStatus dropSchemaTemplate(1:TSDropSchemaTemplateReq req);
 
-  common.TSStatus createTimeseriesOfSchemaTemplate(1:TCreateTimeseriesOfSchemaTemplateReq req);
+  common.TSStatus createTimeseriesUsingSchemaTemplate(1:TCreateTimeseriesUsingSchemaTemplateReq req);
 
   common.TSStatus handshake(TSyncIdentityInfo info);