add jdbc driver Efficient Writing doc (#30278)
This commit is contained in:
parent
f95aee70f3
commit
ab111d1ac8
|
@ -121,6 +121,7 @@ Please refer to the specific error codes:
|
||||||
| 0x2378 | consumer create error | Data subscription creation failed, check the error information and taos log for troubleshooting. |
|
| 0x2378 | consumer create error | Data subscription creation failed, check the error information and taos log for troubleshooting. |
|
||||||
| 0x2379 | seek offset must not be a negative number | The seek interface parameter must not be negative, use the correct parameters. |
|
| 0x2379 | seek offset must not be a negative number | The seek interface parameter must not be negative, use the correct parameters. |
|
||||||
| 0x237a | vGroup not found in result set | VGroup not assigned to the current consumer, due to the Rebalance mechanism causing the Consumer and VGroup to be unbound. |
|
| 0x237a | vGroup not found in result set | VGroup not assigned to the current consumer, due to the Rebalance mechanism causing the Consumer and VGroup to be unbound. |
|
||||||
|
| 0x2390 | background thread write error in Efficient Writing | In the event of an efficient background thread write error, you can stop writing and rebuild the connection. |
|
||||||
|
|
||||||
- [TDengine Java Connector Error Code](https://github.com/taosdata/taos-connector-jdbc/blob/main/src/main/java/com/taosdata/jdbc/TSDBErrorNumbers.java)
|
- [TDengine Java Connector Error Code](https://github.com/taosdata/taos-connector-jdbc/blob/main/src/main/java/com/taosdata/jdbc/TSDBErrorNumbers.java)
|
||||||
<!-- - [TDengine_ERROR_CODE](../error-code) -->
|
<!-- - [TDengine_ERROR_CODE](../error-code) -->
|
||||||
|
@ -320,7 +321,15 @@ The configuration parameters in properties are as follows:
|
||||||
- TSDBDriver.PROPERTY_KEY_DISABLE_SSL_CERT_VALIDATION: Disable SSL certificate validation. Effective only when using WebSocket connections. true: enabled, false: not enabled. Default is false.
|
- TSDBDriver.PROPERTY_KEY_DISABLE_SSL_CERT_VALIDATION: Disable SSL certificate validation. Effective only when using WebSocket connections. true: enabled, false: not enabled. Default is false.
|
||||||
- TSDBDriver.PROPERTY_KEY_APP_NAME: App name, can be used for display in the `show connections` query result. Effective only when using WebSocket connections. Default value is java.
|
- TSDBDriver.PROPERTY_KEY_APP_NAME: App name, can be used for display in the `show connections` query result. Effective only when using WebSocket connections. Default value is java.
|
||||||
- TSDBDriver.PROPERTY_KEY_APP_IP: App IP, can be used for display in the `show connections` query result. Effective only when using WebSocket connections. Default value is empty.
|
- TSDBDriver.PROPERTY_KEY_APP_IP: App IP, can be used for display in the `show connections` query result. Effective only when using WebSocket connections. Default value is empty.
|
||||||
|
|
||||||
|
- TSDBDriver.PROPERTY_KEY_ASYNC_WRITE: Efficient Writing mode. Currently, only the `stmt` method is supported. Effective only when using WebSocket connections. DeDefault value is empty, meaning Efficient Writing mode is not enabled.
|
||||||
|
- TSDBDriver.PROPERTY_KEY_BACKEND_WRITE_THREAD_NUM: In Efficient Writing mode, this refers to the number of background write threads. Effective only when using WebSocket connections. Default value is 10.
|
||||||
|
- TSDBDriver.PROPERTY_KEY_BATCH_SIZE_BY_ROW: In Efficient Writing mode, this is the batch size for writing data, measured in rows. Effective only when using WebSocket connections. Default value is 1000.
|
||||||
|
- TSDBDriver.PROPERTY_KEY_CACHE_SIZE_BY_ROW: In Efficient Writing mode, this is the cache size, measured in rows. Effective only when using WebSocket connections. Default value is 10000.
|
||||||
|
- TSDBDriver.PROPERTY_KEY_COPY_DATA: In Efficient Writing mode, this determines Whether to copy the binary data passed by the application through the `addBatch` method. Effective only when using WebSocket connections. Default value is false.
|
||||||
|
- TSDBDriver.PROPERTY_KEY_STRICT_CHECK: In Efficient Writing mode, this determines whether to validate the length of table names and variable-length data types. Effective only when using WebSocket connections. Default value is false.
|
||||||
|
- TSDBDriver.PROPERTY_KEY_RETRY_TIMES: In Efficient Writing mode, this is the number of retry attempts for failed write operations. Effective only when using WebSocket connections. Default value is 3.
|
||||||
|
|
||||||
Additionally, for native JDBC connections, other parameters such as log level and SQL length can be specified by specifying the URL and Properties.
|
Additionally, for native JDBC connections, other parameters such as log level and SQL length can be specified by specifying the URL and Properties.
|
||||||
|
|
||||||
**Priority of Configuration Parameters**
|
**Priority of Configuration Parameters**
|
||||||
|
|
|
@ -121,6 +121,7 @@ JDBC 连接器可能报错的错误码包括 4 种:
|
||||||
| 0x2378 | consumer create error | 创建数据订阅失败,请根据错误信息检查 taos log 进行问题定位。 |
|
| 0x2378 | consumer create error | 创建数据订阅失败,请根据错误信息检查 taos log 进行问题定位。 |
|
||||||
| 0x2379 | seek offset must not be a negative number | seek 接口参数不能为负值,请使用正确的参数 |
|
| 0x2379 | seek offset must not be a negative number | seek 接口参数不能为负值,请使用正确的参数 |
|
||||||
| 0x237a | vGroup not found in result set | VGroup 没有分配给当前 consumer,由于 Rebalance 机制导致 Consumer 与 VGroup 不是绑定的关系 |
|
| 0x237a | vGroup not found in result set | VGroup 没有分配给当前 consumer,由于 Rebalance 机制导致 Consumer 与 VGroup 不是绑定的关系 |
|
||||||
|
| 0x2390 | background thread write error in Efficient Writing | 高效写入后台线程写入错误,可以停止写入,重建连接 |
|
||||||
|
|
||||||
- [TDengine Java Connector Error Code](https://github.com/taosdata/taos-connector-jdbc/blob/main/src/main/java/com/taosdata/jdbc/TSDBErrorNumbers.java)
|
- [TDengine Java Connector Error Code](https://github.com/taosdata/taos-connector-jdbc/blob/main/src/main/java/com/taosdata/jdbc/TSDBErrorNumbers.java)
|
||||||
<!-- - [TDengine_ERROR_CODE](../error-code) -->
|
<!-- - [TDengine_ERROR_CODE](../error-code) -->
|
||||||
|
@ -315,7 +316,15 @@ properties 中的配置参数如下:
|
||||||
- TSDBDriver.PROPERTY_KEY_DISABLE_SSL_CERT_VALIDATION:关闭 SSL 证书验证 。仅在使用 WebSocket 连接时生效。true:启用,false:不启用。默认为 false。
|
- TSDBDriver.PROPERTY_KEY_DISABLE_SSL_CERT_VALIDATION:关闭 SSL 证书验证 。仅在使用 WebSocket 连接时生效。true:启用,false:不启用。默认为 false。
|
||||||
|
|
||||||
- TSDBDriver.PROPERTY_KEY_APP_NAME:App 名称,可用于 `show connections` 查询结果显示。仅在使用 WebSocket 连接时生效。默认值为 java。
|
- TSDBDriver.PROPERTY_KEY_APP_NAME:App 名称,可用于 `show connections` 查询结果显示。仅在使用 WebSocket 连接时生效。默认值为 java。
|
||||||
- TSDBDriver.PROPERTY_KEY_APP_IP:App IP,可用于 `show connections` 查询结果显示。仅在使用 WebSocket 连接时生效。默认值为空。
|
- TSDBDriver.PROPERTY_KEY_APP_IP:App IP,可用于 `show connections` 查询结果显示。仅在使用 WebSocket 连接时生效。默认值为空。
|
||||||
|
|
||||||
|
- TSDBDriver.PROPERTY_KEY_ASYNC_WRITE:高效写入模式,目前仅支持 `stmt` 方式。仅在使用 WebSocket 连接时生效。默认值为空,即不启用高效写入模式。
|
||||||
|
- TSDBDriver.PROPERTY_KEY_BACKEND_WRITE_THREAD_NUM:高效写入模式下,后台写入线程数。仅在使用 WebSocket 连接时生效。默认值为 10。
|
||||||
|
- TSDBDriver.PROPERTY_KEY_BATCH_SIZE_BY_ROW:高效写入模式下,写入数据的批大小,单位是行。仅在使用 WebSocket 连接时生效。默认值为 1000。
|
||||||
|
- TSDBDriver.PROPERTY_KEY_CACHE_SIZE_BY_ROW:高效写入模式下,缓存的大小,单位是行。仅在使用 WebSocket 连接时生效。默认值为 10000。
|
||||||
|
- TSDBDriver.PROPERTY_KEY_COPY_DATA:高效写入模式下,是否拷贝应用通过 addBatch 传入的二进制类型数据。仅在使用 WebSocket 连接时生效。默认值为 false。
|
||||||
|
- TSDBDriver.PROPERTY_KEY_STRICT_CHECK:高效写入模式下,是否校验表名长度和变长数据类型长度。仅在使用 WebSocket 连接时生效。默认值为 false。
|
||||||
|
- TSDBDriver.PROPERTY_KEY_RETRY_TIMES:高效写入模式下,写入失败重试次数。仅在使用 WebSocket 连接时生效。默认值为 3。
|
||||||
|
|
||||||
此外对 JDBC 原生连接,通过指定 URL 和 Properties 还可以指定其他参数,比如日志级别、SQL 长度等。
|
此外对 JDBC 原生连接,通过指定 URL 和 Properties 还可以指定其他参数,比如日志级别、SQL 长度等。
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue