diff --git a/docs/UserGuide/Client/Native API Update(0.9-0.10).md b/docs/UserGuide/Client/Native API Update(0.9-0.10).md deleted file mode 100644 index 488450cd3a700be98d4b7e6ee0f030e65a79edee..0000000000000000000000000000000000000000 --- a/docs/UserGuide/Client/Native API Update(0.9-0.10).md +++ /dev/null @@ -1,196 +0,0 @@ - - -## Summary for 0.9-0.10 IoTDB Session Interface Updates - -Great changes have taken place in IoTDB session of version 0.10 compared to version 0.9. -We added a large numbers of new interfaces, and some old interfaces had new names or parameters. -Besides, all exceptions thrown by session interfaces are changed from *IoTDBSessionExeception* to *IoTDBConnectionException* or *StatementExecutionExeception*. -The detailed modifications are listed as follows. - -### Method name modifications - -#### insert() - -Insert a Record,which contains deviceId, timestamp of the record and multiple measurement values - -``` -void insert(String deviceId, long time, List measurements, List values) -``` - -The method name has been changed to insertRecord() in 0.10 version - -``` -void insertRecord(String deviceId, long time, List measurements, List values) -``` - -#### insertRowInBatch() - -Insert multiple Records, which contains all the deviceIds, timestamps of the records and multiple measurement values - -``` -void insertRowInBatch(List deviceIds, List times, List> measurementsList, - List> valuesList) -``` - - -The method name has been changed to insertRecords() in 0.10 version - -``` -void insertRecords(List deviceIds, List times, List> measurementsList, - List> valuesList) -``` - -#### insertBatch() - -In 0.9, insertBatch is used for insertion in terms of "RowBatch" structure. - -``` -void insertBatch(RowBatch rowBatch) -``` - -As "Tablet" replaced "RowBatch" in 0.10, the name has been changed to insertTablet() - -``` -void insertTablet(Tablet tablet) -``` - -#### testInsertRow() - -To test the responsiveness of insertRow() - -``` -void testInsertRow(String deviceId, long time, List measurements, List values) -``` - -The method name has been changed to testInsertRecord() in 0.10 version - -``` -void testInsertRecord(String deviceId, long time, List measurements, List values) -``` - -#### testInsertRowInBatch() - -To test the responsiveness of insertRowInBatch() - -``` -void testInsertRowInBatch(List deviceIds, List times, List> measurementsList, - List> valuesList) -``` - -The method name has been changed to testInsertRecords() in 0.10 version - -``` -void testInsertRecords(List deviceIds, List times, List> measurementsList, - List> valuesList) -``` - -#### testInsertBatch - -To test the responsiveness of insertBatch() - -``` -void testInsertBatch(RowBatch rowBatch) -``` - -The method name has been changed to testInsertTablet() in 0.10 version - -``` -void testInsertTablet(Tablet tablet) -``` - - - -### New Interfaces - -``` -void open(boolean enableRPCCompression) -``` - -Open a session, with a parameter to specify whether to enable RPC compression. -Please pay attention that this RPC compression status of client must comply with the status of IoTDB server - -``` -void insertRecord(String deviceId, long time, List measurements, - List types, List values) -``` - -Insert one record, in a way that user has to provide the type information of each measurement, which is different from the original insertRecord() interface. -The values should be provided in their primitive types. This interface is more proficient than the one without type parameters. - -``` -void insertRecords(List deviceIds, List times, List> measurementsList, - List> typesList, List> valuesList) -``` - -Insert multiple records with type parameters. This interface is more proficient than the one without type parameters. - -``` -void insertTablet(Tablet tablet, boolean sorted) -``` - -An additional insertTablet() interface that providing a "sorted" parameter indicating if the tablet is in order. A sorted tablet may accelerate the insertion process. - -``` -void insertTablets(Map tablets) -``` - -A new insertTablets() for inserting multiple tablets. - -``` -void insertTablets(Map tablets, boolean sorted) -``` - -insertTablets() with an additional "sorted" parameter. - -``` -void testInsertRecord(String deviceId, long time, List measurements, List types, - List values) -void testInsertRecords(List deviceIds, List times, List> measurementsList, - List> typesList, List> valuesList) -void testInsertTablet(Tablet tablet, boolean sorted) -void testInsertTablets(Map tablets) -void testInsertTablets(Map tablets, boolean sorted) -``` - -The above interfaces are newly added to test responsiveness of new insert interfaces. - -``` -void createTimeseries(String path, TSDataType dataType, TSEncoding encoding, CompressionType compressor, - Map props, Map tags, Map attributes, - String measurementAlias) -``` - -Create a timeseries with path, datatype, encoding and compression. Additionally, users can provide props, tags, attributes and measurementAlias。 - -``` -void createMultiTimeseries(List paths, List dataTypes, List encodings, - List compressors, List> propsList, - List> tagsList, List> attributesList, - List measurementAliasList) -``` - -Create multiple timeseries with a single method. Users can provide props, tags, attributes and measurementAlias as well for detailed timeseries information. - -``` -boolean checkTimeseriesExists(String path) -``` -Added a method to check whether the specific timeseries exists. diff --git a/docs/UserGuide/Client/Programming - Native API.md b/docs/UserGuide/Client/Programming - Native API.md index aa7c41606a6847386e636db247a78accc4d12b37..97da7ccfde833d48b0fa1c44cb55b9e06a81a577 100644 --- a/docs/UserGuide/Client/Programming - Native API.md +++ b/docs/UserGuide/Client/Programming - Native API.md @@ -212,4 +212,181 @@ you have to call `SessionPool.closeResultSet(wrapper)` manually; Examples: ```session/src/test/java/org/apache/iotdb/session/pool/SessionPoolTest.java``` -Or `example/session/src/main/java/org/apache/iotdb/SessionPoolExample.java` \ No newline at end of file +Or `example/session/src/main/java/org/apache/iotdb/SessionPoolExample.java` + + +## 0.9-0.10 Session Interface Updates + +Great changes have taken place in IoTDB session of version 0.10 compared to version 0.9. +We added a large numbers of new interfaces, and some old interfaces had new names or parameters. +Besides, all exceptions thrown by session interfaces are changed from *IoTDBSessionExeception* to *IoTDBConnectionException* or *StatementExecutionExeception*. +The detailed modifications are listed as follows. + +### Method name modifications + +#### insert() + +Insert a Record,which contains deviceId, timestamp of the record and multiple measurement values + +``` +void insert(String deviceId, long time, List measurements, List values) +``` + +The method name has been changed to insertRecord() in 0.10 version + +``` +void insertRecord(String deviceId, long time, List measurements, List values) +``` + +#### insertRowInBatch() + +Insert multiple Records, which contains all the deviceIds, timestamps of the records and multiple measurement values + +``` +void insertRowInBatch(List deviceIds, List times, List> measurementsList, + List> valuesList) +``` + + +The method name has been changed to insertRecords() in 0.10 version + +``` +void insertRecords(List deviceIds, List times, List> measurementsList, + List> valuesList) +``` + +#### insertBatch() + +In 0.9, insertBatch is used for insertion in terms of "RowBatch" structure. + +``` +void insertBatch(RowBatch rowBatch) +``` + +As "Tablet" replaced "RowBatch" in 0.10, the name has been changed to insertTablet() + +``` +void insertTablet(Tablet tablet) +``` + +#### testInsertRow() + +To test the responsiveness of insertRow() + +``` +void testInsertRow(String deviceId, long time, List measurements, List values) +``` + +The method name has been changed to testInsertRecord() in 0.10 version + +``` +void testInsertRecord(String deviceId, long time, List measurements, List values) +``` + +#### testInsertRowInBatch() + +To test the responsiveness of insertRowInBatch() + +``` +void testInsertRowInBatch(List deviceIds, List times, List> measurementsList, + List> valuesList) +``` + +The method name has been changed to testInsertRecords() in 0.10 version + +``` +void testInsertRecords(List deviceIds, List times, List> measurementsList, + List> valuesList) +``` + +#### testInsertBatch + +To test the responsiveness of insertBatch() + +``` +void testInsertBatch(RowBatch rowBatch) +``` + +The method name has been changed to testInsertTablet() in 0.10 version + +``` +void testInsertTablet(Tablet tablet) +``` + + + +### New Interfaces + +``` +void open(boolean enableRPCCompression) +``` + +Open a session, with a parameter to specify whether to enable RPC compression. +Please pay attention that this RPC compression status of client must comply with the status of IoTDB server + +``` +void insertRecord(String deviceId, long time, List measurements, + List types, List values) +``` + +Insert one record, in a way that user has to provide the type information of each measurement, which is different from the original insertRecord() interface. +The values should be provided in their primitive types. This interface is more proficient than the one without type parameters. + +``` +void insertRecords(List deviceIds, List times, List> measurementsList, + List> typesList, List> valuesList) +``` + +Insert multiple records with type parameters. This interface is more proficient than the one without type parameters. + +``` +void insertTablet(Tablet tablet, boolean sorted) +``` + +An additional insertTablet() interface that providing a "sorted" parameter indicating if the tablet is in order. A sorted tablet may accelerate the insertion process. + +``` +void insertTablets(Map tablets) +``` + +A new insertTablets() for inserting multiple tablets. + +``` +void insertTablets(Map tablets, boolean sorted) +``` + +insertTablets() with an additional "sorted" parameter. + +``` +void testInsertRecord(String deviceId, long time, List measurements, List types, + List values) +void testInsertRecords(List deviceIds, List times, List> measurementsList, + List> typesList, List> valuesList) +void testInsertTablet(Tablet tablet, boolean sorted) +void testInsertTablets(Map tablets) +void testInsertTablets(Map tablets, boolean sorted) +``` + +The above interfaces are newly added to test responsiveness of new insert interfaces. + +``` +void createTimeseries(String path, TSDataType dataType, TSEncoding encoding, CompressionType compressor, + Map props, Map tags, Map attributes, + String measurementAlias) +``` + +Create a timeseries with path, datatype, encoding and compression. Additionally, users can provide props, tags, attributes and measurementAlias。 + +``` +void createMultiTimeseries(List paths, List dataTypes, List encodings, + List compressors, List> propsList, + List> tagsList, List> attributesList, + List measurementAliasList) +``` + +Create multiple timeseries with a single method. Users can provide props, tags, attributes and measurementAlias as well for detailed timeseries information. + +``` +boolean checkTimeseriesExists(String path) +``` +Added a method to check whether the specific timeseries exists. diff --git a/docs/zh/UserGuide/Client/Native API Update(0.9-0.10).md b/docs/zh/UserGuide/Client/Native API Update(0.9-0.10).md deleted file mode 100644 index 1f1003c2ead7ea57f30a3e46badd076d948852b4..0000000000000000000000000000000000000000 --- a/docs/zh/UserGuide/Client/Native API Update(0.9-0.10).md +++ /dev/null @@ -1,192 +0,0 @@ - - -## 0.9-0.10 版本IoTDB Session 接口更新总结 - -从0.9到0.10版本的IoTDB session接口有了较大改变。一部分接口名称和参数类型发生了变化,另外新增了大量可用接口。所有session接口抛出的异常类型 *IoTDBSessionExeception* 更改为 *IoTDBConnectionException* 和 *StatementExecutionExeception* 。下面详细介绍具体接口的变化。 - -### 接口名称更改 - -#### insert() - -用于插入一行数据,需提供数据点的deviceId, time, 所有measurement和相应的value值。 - -``` -void insert(String deviceId, long time, List measurements, List values) -``` - - -该方法在0.10版本中方法名发生变化 - -``` -void insertRecord(String deviceId, long time, List measurements, List values) -``` - -#### insertRowInBatch() - -用于插入多行数据,需提供各行数据的deviceId, time, 所有measurement名称和相应的value值。 - -``` -void insertRowInBatch(List deviceIds, List times, List> measurementsList, - List> valuesList) -``` - - -该方法在0.10版本中方法名发生变化 - -``` -void insertRecords(List deviceIds, List times, List> measurementsList, - List> valuesList) -``` - -#### insertBatch() - -在0.9版本中用于以"RowBatch"结构为单位插入数据 - -``` -void insertBatch(RowBatch rowBatch) -``` - -在0.10版本中"RowBatch"类型更改为"Tablet"类型,因此方法名也随之改变。 - -``` -void insertTablet(Tablet tablet) -``` - -#### testInsertRow() - -用于测试插入一行接口的响应 - -``` -void testInsertRow(String deviceId, long time, List measurements, List values) -``` - -在0.10版本中方法名改为testInsertRecord。 - -``` -void testInsertRecord(String deviceId, long time, List measurements, List values) -``` - -#### testInsertRowInBatch() - -用于测试插入多行数据接口的响应 - -``` -void testInsertRowInBatch(List deviceIds, List times, List> measurementsList, - List> valuesList) -``` - -在0.10版本中方法名改为testInsertRecords - -``` -void testInsertRecords(List deviceIds, List times, List> measurementsList, - List> valuesList) -``` - -#### testInsertBatch - -用于测试以RowBatch结构为单位插入数据的响应 - -``` -void testInsertBatch(RowBatch rowBatch) -``` - -在0.10版本中RowBatch类型更改为Tabet类型,因此方法名也随之改变为testInsertTablet - -``` -void testInsertTablet(Tablet tablet) -``` - - - -### 新增接口 - -``` -void open(boolean enableRPCCompression) -``` - -开启一个session,并指定是否启用RPC压缩。注意客户端开启PRC压缩的状态需与服务端保持一致。 - -``` -void insertRecord(String deviceId, long time, List measurements, - List types, List values) -``` - -插入一行数据,该方法和已有的insertRecord()方法不同在于需额外提供每个measurement的类型信息types,且参数values以原始类型的方式提供。写入速度相对于参数为String格式的insertRecord接口要快一些。 - -``` -void insertRecords(List deviceIds, List times, List> measurementsList, - List> typesList, List> valuesList) -``` - -插入多行数据,该方法和已有的insertRecords()方法不同在于需额外提供每个measurement的类型信息typesList,且参数valuesList以原始类型的方式提供。写入速度相对于参数为String格式的insertRecords接口要快一些。 - -``` -void insertTablet(Tablet tablet, boolean sorted) -``` - -提供额外的sorted参数,表示tablet是否内部已排好序,如sorted为真则会省去排序的过程从而提升处理速度。 - -``` -void insertTablets(Map tablets) -``` - -新增insertTablets接口用于写入多个tablet结构,tablets参数为Map - -``` -void insertTablets(Map tablets, boolean sorted) -``` - -带额外sorted参数的insertTablets接口 - -``` -void testInsertRecord(String deviceId, long time, List measurements, List types, - List values) -void testInsertRecords(List deviceIds, List times, List> measurementsList, - List> typesList, List> valuesList) -void testInsertTablet(Tablet tablet, boolean sorted) -void testInsertTablets(Map tablets) -void testInsertTablets(Map tablets, boolean sorted) -``` - -以上接口均为新增的测试rpc响应的方法,用于测试新增的写入接口 - -``` -void createTimeseries(String path, TSDataType dataType, TSEncoding encoding, CompressionType compressor, - Map props, Map tags, Map attributes, - String measurementAlias) -``` - -在原来createTimeseries接口的基础上,创建时间序列可以额外指定时间序列的props, tags, attributes和measurementAlias。如果不需要指定以上额外参数可以将参数设为null。 - -``` -void createMultiTimeseries(List paths, List dataTypes, List encodings, - List compressors, List> propsList, - List> tagsList, List> attributesList, - List measurementAliasList) -``` - -一次性创建多个时间序列,同时也可以指定多个时间序列的props, tags, attributes和measurementAlias。 - -``` -boolean checkTimeseriesExists(String path) -``` -用于检测时间序列是否存在 diff --git a/docs/zh/UserGuide/Client/Programming - Native API.md b/docs/zh/UserGuide/Client/Programming - Native API.md index 5741ef5f9719a5eb3d52e7c2a1eccf3a544053fb..77113ec64905afecb342436190dd016c204c9853 100644 --- a/docs/zh/UserGuide/Client/Programming - Native API.md +++ b/docs/zh/UserGuide/Client/Programming - Native API.md @@ -206,4 +206,176 @@ 使用示例可以参见 ```session/src/test/java/org/apache/iotdb/session/pool/SessionPoolTest.java``` -或 `example/session/src/main/java/org/apache/iotdb/SessionPoolExample.java` \ No newline at end of file +或 `example/session/src/main/java/org/apache/iotdb/SessionPoolExample.java` + +## 0.9-0.10 版本IoTDB Session 接口更新 + +从0.9到0.10版本的IoTDB session接口有了较大改变。一部分接口名称和参数类型发生了变化,另外新增了大量可用接口。所有session接口抛出的异常类型 *IoTDBSessionExeception* 更改为 *IoTDBConnectionException* 和 *StatementExecutionExeception* 。下面详细介绍具体接口的变化。 + +### 接口名称更改 + +#### insert() + +用于插入一行数据,需提供数据点的deviceId, time, 所有measurement和相应的value值。 + +``` +void insert(String deviceId, long time, List measurements, List values) +``` + + +该方法在0.10版本中方法名发生变化 + +``` +void insertRecord(String deviceId, long time, List measurements, List values) +``` + +#### insertRowInBatch() + +用于插入多行数据,需提供各行数据的deviceId, time, 所有measurement名称和相应的value值。 + +``` +void insertRowInBatch(List deviceIds, List times, List> measurementsList, + List> valuesList) +``` + + +该方法在0.10版本中方法名发生变化 + +``` +void insertRecords(List deviceIds, List times, List> measurementsList, + List> valuesList) +``` + +#### insertBatch() + +在0.9版本中用于以"RowBatch"结构为单位插入数据 + +``` +void insertBatch(RowBatch rowBatch) +``` + +在0.10版本中"RowBatch"类型更改为"Tablet"类型,因此方法名也随之改变。 + +``` +void insertTablet(Tablet tablet) +``` + +#### testInsertRow() + +用于测试插入一行接口的响应 + +``` +void testInsertRow(String deviceId, long time, List measurements, List values) +``` + +在0.10版本中方法名改为testInsertRecord。 + +``` +void testInsertRecord(String deviceId, long time, List measurements, List values) +``` + +#### testInsertRowInBatch() + +用于测试插入多行数据接口的响应 + +``` +void testInsertRowInBatch(List deviceIds, List times, List> measurementsList, + List> valuesList) +``` + +在0.10版本中方法名改为testInsertRecords + +``` +void testInsertRecords(List deviceIds, List times, List> measurementsList, + List> valuesList) +``` + +#### testInsertBatch + +用于测试以RowBatch结构为单位插入数据的响应 + +``` +void testInsertBatch(RowBatch rowBatch) +``` + +在0.10版本中RowBatch类型更改为Tabet类型,因此方法名也随之改变为testInsertTablet + +``` +void testInsertTablet(Tablet tablet) +``` + + + +### 新增接口 + +``` +void open(boolean enableRPCCompression) +``` + +开启一个session,并指定是否启用RPC压缩。注意客户端开启PRC压缩的状态需与服务端保持一致。 + +``` +void insertRecord(String deviceId, long time, List measurements, + List types, List values) +``` + +插入一行数据,该方法和已有的insertRecord()方法不同在于需额外提供每个measurement的类型信息types,且参数values以原始类型的方式提供。写入速度相对于参数为String格式的insertRecord接口要快一些。 + +``` +void insertRecords(List deviceIds, List times, List> measurementsList, + List> typesList, List> valuesList) +``` + +插入多行数据,该方法和已有的insertRecords()方法不同在于需额外提供每个measurement的类型信息typesList,且参数valuesList以原始类型的方式提供。写入速度相对于参数为String格式的insertRecords接口要快一些。 + +``` +void insertTablet(Tablet tablet, boolean sorted) +``` + +提供额外的sorted参数,表示tablet是否内部已排好序,如sorted为真则会省去排序的过程从而提升处理速度。 + +``` +void insertTablets(Map tablets) +``` + +新增insertTablets接口用于写入多个tablet结构,tablets参数为Map + +``` +void insertTablets(Map tablets, boolean sorted) +``` + +带额外sorted参数的insertTablets接口 + +``` +void testInsertRecord(String deviceId, long time, List measurements, List types, + List values) +void testInsertRecords(List deviceIds, List times, List> measurementsList, + List> typesList, List> valuesList) +void testInsertTablet(Tablet tablet, boolean sorted) +void testInsertTablets(Map tablets) +void testInsertTablets(Map tablets, boolean sorted) +``` + +以上接口均为新增的测试rpc响应的方法,用于测试新增的写入接口 + +``` +void createTimeseries(String path, TSDataType dataType, TSEncoding encoding, CompressionType compressor, + Map props, Map tags, Map attributes, + String measurementAlias) +``` + +在原来createTimeseries接口的基础上,创建时间序列可以额外指定时间序列的props, tags, attributes和measurementAlias。如果不需要指定以上额外参数可以将参数设为null。 + +``` +void createMultiTimeseries(List paths, List dataTypes, List encodings, + List compressors, List> propsList, + List> tagsList, List> attributesList, + List measurementAliasList) +``` + +一次性创建多个时间序列,同时也可以指定多个时间序列的props, tags, attributes和measurementAlias。 + +``` +boolean checkTimeseriesExists(String path) +``` +用于检测时间序列是否存在 \ No newline at end of file diff --git a/site/src/main/.vuepress/config.js b/site/src/main/.vuepress/config.js index 6a3730a607fc0d6b0f48a6e0e6c305c4cb65aadc..a94fa8407937598ccb4f17cfef1870a96570d7b2 100644 --- a/site/src/main/.vuepress/config.js +++ b/site/src/main/.vuepress/config.js @@ -444,8 +444,7 @@ var config = { ['Client/Programming - Other Languages','Other Languages'], ['Client/Programming - TsFile API','TsFile API'], ['Client/Programming - MQTT','MQTT'], - ['Client/Status Codes','Status Codes'], - ['Client/Native API Update(0.9-0.10)','Native API Update(0.9-0.10)'] + ['Client/Status Codes','Status Codes'] ] }, { @@ -966,8 +965,7 @@ var config = { ['Client/Programming - Other Languages','其他语言'], ['Client/Programming - TsFile API','TsFile API'], ['Client/Programming - MQTT','MQTT'], - ['Client/Status Codes','状态码'], - ['Client/Native API Update(0.9-0.10)','0.9-0.10的原生接口更新'] + ['Client/Status Codes','状态码'] ] }, {