You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by qi...@apache.org on 2020/04/27 01:42:37 UTC

[incubator-iotdb] branch master updated: fix doc

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 8a296c6  fix doc
8a296c6 is described below

commit 8a296c6d839f908c5842e95f45b6631a03146286
Author: qiaojialin <64...@qq.com>
AuthorDate: Mon Apr 27 09:42:23 2020 +0800

    fix doc
---
 .../4-Client/2-Programming - Native API.md         | 56 ++++++++++++----------
 .../4-Client/2-Programming - Native API.md         | 43 +++++++++--------
 2 files changed, 53 insertions(+), 46 deletions(-)

diff --git a/docs/UserGuide/4-Client/2-Programming - Native API.md b/docs/UserGuide/4-Client/2-Programming - Native API.md
index 9cbb3f1..789c8c6 100644
--- a/docs/UserGuide/4-Client/2-Programming - Native API.md	
+++ b/docs/UserGuide/4-Client/2-Programming - Native API.md	
@@ -50,42 +50,48 @@ Here we show the commonly used interfaces and their parameters in the Native API
 
 * Initialize a Session
 
-  	Session(String host, int port)
+  ```
+  Session(String host, int port)
 
-  	Session(String host, String port, String username, String password)
+  Session(String host, String port, String username, String password)
 
-  	Session(String host, int port, String username, String password)
+  Session(String host, int port, String username, String password)
+  ```
 
 * Open a Session
 
-  ​	Session.open()
+  ```
+  Session.open()
+  ```
 
 * Close a Session
 
-  ​	Session.close()
-
+  ```
+  ​Session.close()
+  ```
+  
 * Set storage group
 
   ```
-    TSStatus setStorageGroup(String storageGroupId)    
+  void setStorageGroup(String storageGroupId)    
   ```
   ​	
 
 * Delete one or several storage groups
 
   ```
-  	void deleteStorageGroup(String storageGroup)
-  	void deleteStorageGroups(List<String> storageGroups)
+  void deleteStorageGroup(String storageGroup)
+  void deleteStorageGroups(List<String> storageGroups)
   ```
 
 * Create one or multiple timeseries
 
   ```
-  	void createTimeseries(String path, TSDataType dataType,
+  void createTimeseries(String path, TSDataType dataType,
           TSEncoding encoding, CompressionType compressor, Map<String, String> props,
           Map<String, String> tags, Map<String, String> attributes, String measurementAlias)
           
-    void createMultiTimeseries(List<String> paths, List<TSDataType> dataTypes,
+  void createMultiTimeseries(List<String> paths, List<TSDataType> dataTypes,
           List<TSEncoding> encodings, List<CompressionType> compressors,
           List<Map<String, String>> propsList, List<Map<String, String>> tagsList,
           List<Map<String, String>> attributesList, List<String> measurementAliasList)
@@ -94,39 +100,39 @@ Here we show the commonly used interfaces and their parameters in the Native API
 * Delete one or several timeseries
 
   ```
-  	void deleteTimeseries(String path)
-  	void deleteTimeseries(List<String> paths)
+  void deleteTimeseries(String path)
+  void deleteTimeseries(List<String> paths)
   ```
 
-* Delete data before or equal to a timestap of one or several timeseries
+* Delete data before or equal to a timestamp of one or several timeseries
 
   ```
-  	void deleteData(String path, long time)
-  	void deleteData(List<String> paths, long time)
+  void deleteData(String path, long time)
+  void deleteData(List<String> paths, long time)
   ```
 
 * Insert a Record,which contains multiple measurement value of a device at a timestamp
 
   ```
-    void insertRecord(String deviceId, long time, List<String> measurements, List<String> values)
+  void insertRecord(String deviceId, long time, List<String> measurements, List<String> values)
   ```
 
 * Insert a Tablet,which is multiple rows of a device, each row has the same measurements
 
   ```
-  	void insertTablet(Tablet tablet)
+  void insertTablet(Tablet tablet)
   ```
 
 * Insert multiple Tablets
 
   ```
-  	void insertTablets(Map<String, Tablet> tablet)
+  void insertTablets(Map<String, Tablet> tablet)
   ```
   
 * Insert multiple Records
 
   ```
-    void insertRecords(List<String> deviceIds, List<Long> times, 
+  void insertRecords(List<String> deviceIds, List<Long> times, 
                        List<List<String>> measurementsList, List<List<String>> valuesList)
   ```
 
@@ -134,21 +140,21 @@ Here we show the commonly used interfaces and their parameters in the Native API
 
 * Test the network and client cost of insertRecords. 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 testInsertRecords(List<String> deviceIds, List<Long> times,
+  ```
+  void testInsertRecords(List<String> deviceIds, List<Long> times,
                   List<List<String>> measurementsList, List<List<String>> 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)
+  void testInsertRecord(String deviceId, long time, List<String> measurements, List<String> 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
 
   ```
-    void testInsertTablet(Tablet tablet)
+  void testInsertTablet(Tablet tablet)
   ```
   
 ## Sample code
diff --git a/docs/zh/UserGuide/4-Client/2-Programming - Native API.md b/docs/zh/UserGuide/4-Client/2-Programming - Native API.md
index 8db4eeb..0b3d6b7 100644
--- a/docs/zh/UserGuide/4-Client/2-Programming - Native API.md	
+++ b/docs/zh/UserGuide/4-Client/2-Programming - Native API.md	
@@ -44,26 +44,27 @@
 ```
 
 ## 原生接口使用示例
+
 下面将给出Session对应的接口的简要介绍和对应参数:
 
 * 初始化Session
 
   ```
-  ​	Session(String host, int port)
-  ​	Session(String host, String port, String username, String password)
-  ​	Session(String host, int port, String username, String password)
+  ​Session(String host, int port)
+  ​Session(String host, String port, String username, String password)
+  ​Session(String host, int port, String username, String password)
   ```
   
 * 开启Session
 
   ```
-  ​	Session.open()
+  ​Session.open()
   ```
   
 * 关闭Session
   ​
   ```
-  	Session.close()
+  Session.close()
   ```
   
 * 设置存储组
@@ -75,18 +76,18 @@
 * 删除单个或多个存储组
 
   ```
-  	void deleteStorageGroup(String storageGroup)
-  	void deleteStorageGroups(List<String> storageGroups)
+  void deleteStorageGroup(String storageGroup)
+  void deleteStorageGroups(List<String> storageGroups)
   ```
 
 * 创建单个或多个时间序列
 
   ```
-  	void createTimeseries(String path, TSDataType dataType,
+  void createTimeseries(String path, TSDataType dataType,
           TSEncoding encoding, CompressionType compressor, Map<String, String> props,
           Map<String, String> tags, Map<String, String> attributes, String measurementAlias)
           
-    void createMultiTimeseries(List<String> paths, List<TSDataType> dataTypes,
+  void createMultiTimeseries(List<String> paths, List<TSDataType> dataTypes,
           List<TSEncoding> encodings, List<CompressionType> compressors,
           List<Map<String, String>> propsList, List<Map<String, String>> tagsList,
           List<Map<String, String>> attributesList, List<String> measurementAliasList)
@@ -95,60 +96,60 @@
 * 删除一个或多个时间序列
 
   ```
-  	void deleteTimeseries(String path)
-  	void deleteTimeseries(List<String> paths)
+  void deleteTimeseries(String path)
+  void deleteTimeseries(List<String> paths)
   ```
 
 * 删除一个或多个时间序列在某个时间点前的数据
 
   ```
-  	void deleteData(String path, long time)
-  	void deleteData(List<String> paths, long time)
+  void deleteData(String path, long time)
+  void deleteData(List<String> paths, long time)
   ```
 
 * 插入一个 Record,一个 Record 是一个设备一个时间戳下多个测点的数据
 
   ```
-    void insertRecord(String deviceId, long time, List<String> measurements, List<String> values)
+  void insertRecord(String deviceId, long time, List<String> measurements, List<String> values)
   ```
 
 * 插入一个 Tablet,Tablet 是一个设备若干行非空数据块,每一行的列都相同
 
   ```
-  	void insertTablet(Tablet tablet)
+  void insertTablet(Tablet tablet)
   ```
 
 * 插入多个 Tablet
 
   ```
-  	void insertTablets(Map<String, Tablet> tablet)
+  void insertTablets(Map<String, Tablet> tablet)
   ```
   
 * 插入多个 Record
 
   ```
-    void insertRecords(List<String> deviceIds, List<Long> times, 
+  void insertRecords(List<String> deviceIds, List<Long> times, 
                        List<List<String>> measurementsList, List<List<String>> valuesList)
   ```
 
 ## 测试客户端逻辑+网络传输代价的接口
 
-* 测试 testInsertInBatch,不实际写入数据,只将数据传输到 server 即返回。
+* 测试 testInsertRecords,不实际写入数据,只将数据传输到 server 即返回。
 
    ```
-   TSStatus testInsertInBatch(List<String> deviceIds, List<Long> times, List<List<String>> measurementsList, List<List<String>> valuesList)
+   void testInsertRecords(List<String> deviceIds, List<Long> times, List<List<String>> measurementsList, List<List<String>> 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<String> values)
   ```
 
 * 测试 insertTablet,不实际写入数据,只将数据传输到 server 即返回。
 
   ```
-    void testInsertTablet(Tablet tablet)
+  void testInsertTablet(Tablet tablet)
   ```