|
| 1 | +# IoTDB |
| 2 | + |
| 3 | +> IoTDB sink connector |
| 4 | +
|
| 5 | +## Description |
| 6 | + |
| 7 | +Used to write data to IoTDB. Supports Batch and Streaming mode. |
| 8 | + |
| 9 | +:::tip |
| 10 | + |
| 11 | +There is a conflict of thrift version between IoTDB and Spark.Therefore, you need to execute `rm -f $SPARK_HOME/jars/libthrift*` and `cp $IOTDB_HOME/lib/libthrift* $SPARK_HOME/jars/` to resolve it. |
| 12 | + |
| 13 | +::: |
| 14 | + |
| 15 | +## Options |
| 16 | + |
| 17 | +| name | type | required | default value | |
| 18 | +|-------------------------------|-------------------|----------|---------------| |
| 19 | +| node_urls | list | yes | - | |
| 20 | +| username | string | yes | - | |
| 21 | +| password | string | yes | - | |
| 22 | +| batch_size | int | no | 1024 | |
| 23 | +| batch_interval_ms | int | no | - | |
| 24 | +| max_retries | int | no | - | |
| 25 | +| retry_backoff_multiplier_ms | int | no | - | |
| 26 | +| max_retry_backoff_ms | int | no | - | |
| 27 | +| default_thrift_buffer_size | int | no | - | |
| 28 | +| max_thrift_frame_size | int | no | - | |
| 29 | +| zone_id | string | no | - | |
| 30 | +| enable_rpc_compression | boolean | no | - | |
| 31 | +| connection_timeout_in_ms | int | no | - | |
| 32 | +| timeseries_options | list | no | - | |
| 33 | +| timeseries_options.path | string | no | - | |
| 34 | +| timeseries_options.data_type | string | no | - | |
| 35 | +| common-options | string | no | - | |
| 36 | + |
| 37 | +### node_urls [list] |
| 38 | + |
| 39 | +`IoTDB` cluster address, the format is `["host:port", ...]` |
| 40 | + |
| 41 | +### username [string] |
| 42 | + |
| 43 | +`IoTDB` user username |
| 44 | + |
| 45 | +### password [string] |
| 46 | + |
| 47 | +`IoTDB` user password |
| 48 | + |
| 49 | +### batch_size [int] |
| 50 | + |
| 51 | +For batch writing, when the number of buffers reaches the number of `batch_size` or the time reaches `batch_interval_ms`, the data will be flushed into the IoTDB |
| 52 | + |
| 53 | +### batch_interval_ms [int] |
| 54 | + |
| 55 | +For batch writing, when the number of buffers reaches the number of `batch_size` or the time reaches `batch_interval_ms`, the data will be flushed into the IoTDB |
| 56 | + |
| 57 | +### max_retries [int] |
| 58 | + |
| 59 | +The number of retries to flush failed |
| 60 | + |
| 61 | +### retry_backoff_multiplier_ms [int] |
| 62 | + |
| 63 | +Using as a multiplier for generating the next delay for backoff |
| 64 | + |
| 65 | +### max_retry_backoff_ms [int] |
| 66 | + |
| 67 | +The amount of time to wait before attempting to retry a request to `IoTDB` |
| 68 | + |
| 69 | +### default_thrift_buffer_size [int] |
| 70 | + |
| 71 | +Thrift init buffer size in `IoTDB` client |
| 72 | + |
| 73 | +### max_thrift_frame_size [int] |
| 74 | + |
| 75 | +Thrift max frame size in `IoTDB` client |
| 76 | + |
| 77 | +### zone_id [string] |
| 78 | + |
| 79 | +java.time.ZoneId in `IoTDB` client |
| 80 | + |
| 81 | +### enable_rpc_compression [boolean] |
| 82 | + |
| 83 | +Enable rpc compression in `IoTDB` client |
| 84 | + |
| 85 | +### connection_timeout_in_ms [int] |
| 86 | + |
| 87 | +The maximum time (in ms) to wait when connect `IoTDB` |
| 88 | + |
| 89 | +### timeseries_options [list] |
| 90 | + |
| 91 | +Timeseries options |
| 92 | + |
| 93 | +### timeseries_options.path [string] |
| 94 | + |
| 95 | +Timeseries path |
| 96 | + |
| 97 | +### timeseries_options.data_type [string] |
| 98 | + |
| 99 | +Timeseries data type |
| 100 | + |
| 101 | +### common options [string] |
| 102 | + |
| 103 | +Sink plugin common parameters, please refer to [Sink Common Options](common-options.md) for details |
| 104 | + |
| 105 | +## Examples |
| 106 | + |
| 107 | +```hocon |
| 108 | +sink { |
| 109 | + IoTDB { |
| 110 | + node_urls = ["localhost:6667"] |
| 111 | + username = "root" |
| 112 | + password = "root" |
| 113 | + batch_size = 1024 |
| 114 | + batch_interval_ms = 1000 |
| 115 | + } |
| 116 | +} |
| 117 | +``` |
0 commit comments