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

hxd pushed a commit to branch rel/0.10
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git

commit 34eca495846d1f18da8ec988590494e8b96dd7f6
Author: 151250176 <[email protected]>
AuthorDate: Tue Jun 16 17:07:51 2020 +0800

    fix  native API doc
---
 RELEASE_NOTES.md                                   |  2 +-
 docs/UserGuide/Client/Programming - Native API.md  | 30 +++++++++++++++++--
 .../UserGuide/Client/Programming - Native API.md   | 34 ++++++++++++++++++++--
 3 files changed, 61 insertions(+), 5 deletions(-)

diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index c3f4f31..78fbb22 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -84,7 +84,7 @@
 * IOTDB-597 Rename methods in Session: insertBatch to insertTablet, 
insertInBatch to insertRecords, insert to insertRecord
 * RPC is incompatible, you can not use client-v0.9 to connect with server-v0.10
 * TsFile format is incompatible, will be upgraded when starting 0.10
-* Refine exception code in narive api
+* Refine exception code in native api
 
 ## Miscellaneous changes
 
diff --git a/docs/UserGuide/Client/Programming - Native API.md 
b/docs/UserGuide/Client/Programming - Native API.md
index 2fa79b5..aa7c416 100644
--- a/docs/UserGuide/Client/Programming - Native API.md 
+++ b/docs/UserGuide/Client/Programming - Native API.md 
@@ -111,7 +111,7 @@ Here we show the commonly used interfaces and their 
parameters in the Native API
   void deleteData(List<String> paths, long time)
   ```
 
-* Insert a Record,which contains multiple measurement value of a device at a 
timestamp
+* Insert a Record,which contains multiple measurement value of a device at a 
timestamp. Without type info the server has to do type inference, which may 
cost some time
 
   ```
   void insertRecord(String deviceId, long time, List<String> measurements, 
List<String> values)
@@ -129,12 +129,27 @@ Here we show the commonly used interfaces and their 
parameters in the Native API
   void insertTablets(Map<String, Tablet> tablet)
   ```
   
-* Insert multiple Records
+* Insert multiple Records. Without type info the server has to do type 
inference, which may cost some time
 
   ```
   void insertRecords(List<String> deviceIds, List<Long> times, 
                        List<List<String>> measurementsList, List<List<String>> 
valuesList)
   ```
+  
+* Insert a Record,which contains multiple measurement value of a device at a 
timestamp. With type info the server has no need to do type inference, which 
leads a better performance
+
+  ```
+  void insertRecord(String deviceId, long time, List<String> measurements,
+       List<TSDataType> types, List<Object> values)
+  ```
+
+* Insert multiple Records. With type info the server has no need to do type 
inference, which leads a better performance
+
+  ```
+  void insertRecords(List<String> deviceIds, List<Long> times,
+        List<List<String>> measurementsList, List<List<TSDataType>> typesList,
+        List<List<Object>> valuesList)
+  ```
 
 ## Native APIs for profiling network cost
 
@@ -144,12 +159,23 @@ Here we show the commonly used interfaces and their 
parameters in the Native API
   void testInsertRecords(List<String> deviceIds, List<Long> times,
                   List<List<String>> measurementsList, List<List<String>> 
valuesList)
   ```
+  or
+  ```
+  void testInsertRecords(List<String> deviceIds, List<Long> times,
+        List<List<String>> measurementsList, List<List<TSDataType>> typesList,
+        List<List<Object>> valuesList)
+  ```
 
 * Test the network and client cost of insertRecord. This method NOT insert 
data into database and server just return after accept the request, this method 
should be used to test other time cost in client
 
   ```
   void testInsertRecord(String deviceId, long time, List<String> measurements, 
List<String> values)
   ```
+  or
+  ```
+  void testInsertRecord(String deviceId, long time, List<String> measurements,
+        List<TSDataType> types, List<Object> values)
+  ```
 
 * Test the network and client cost of insertTablet. This method NOT insert 
data into database and server just return after accept the request, this method 
should be used to test other time cost in client
 
diff --git a/docs/zh/UserGuide/Client/Programming - Native API.md 
b/docs/zh/UserGuide/Client/Programming - Native API.md
index 5d90c5e..5741ef5 100644
--- a/docs/zh/UserGuide/Client/Programming - Native API.md      
+++ b/docs/zh/UserGuide/Client/Programming - Native API.md      
@@ -107,7 +107,7 @@
   void deleteData(List<String> paths, long time)
   ```
 
-* 插入一个 Record,一个 Record 是一个设备一个时间戳下多个测点的数据
+* 插入一个 Record,一个 Record 是一个设备一个时间戳下多个测点的数据。服务器需要做类型推断,可能会有额外耗时
 
   ```
   void insertRecord(String deviceId, long time, List<String> measurements, 
List<String> values)
@@ -125,12 +125,28 @@
   void insertTablets(Map<String, Tablet> tablet)
   ```
   
-* 插入多个 Record
+* 插入多个 Record。服务器需要做类型推断,可能会有额外耗时
 
   ```
   void insertRecords(List<String> deviceIds, List<Long> times, 
                        List<List<String>> measurementsList, List<List<String>> 
valuesList)
   ```
+  
+* 插入一个 Record,一个 Record 是一个设备一个时间戳下多个测点的数据。提供数据类型后,服务器不需要做类型推断,可以提高性能
+
+  ```
+  void insertRecord(String deviceId, long time, List<String> measurements,
+       List<TSDataType> types, List<Object> values)
+  ```
+
+* 插入多个 Record。提供数据类型后,服务器不需要做类型推断,可以提高性能
+
+  ```
+  void insertRecords(List<String> deviceIds, List<Long> times,
+        List<List<String>> measurementsList, List<List<TSDataType>> typesList,
+        List<List<Object>> valuesList)
+  ```
+
 
 ## 测试客户端逻辑+网络传输代价的接口
 
@@ -139,12 +155,26 @@
    ```
    void testInsertRecords(List<String> deviceIds, List<Long> times, 
List<List<String>> measurementsList, List<List<String>> valuesList)
    ```
+  或
+  or
+    ```
+    void testInsertRecords(List<String> deviceIds, List<Long> times,
+          List<List<String>> measurementsList, List<List<TSDataType>> 
typesList,
+          List<List<Object>> valuesList)
+    ```
+
 
 * 测试 insertRecord,不实际写入数据,只将数据传输到 server 即返回。
 
   ```
   void testInsertRecord(String deviceId, long time, List<String> measurements, 
List<String> values)
   ```
+  或
+  ```
+    void testInsertRecord(String deviceId, long time, List<String> 
measurements,
+          List<TSDataType> types, List<Object> values)
+  ```
+
 
 * 测试 insertTablet,不实际写入数据,只将数据传输到 server 即返回。
 

Reply via email to