Torch Log Service
pull mode | explain |
normal pull mode | When the machining task is executed for the first time, the log service will pull the full amount of table data and will not pull it later. If the data in your database is not continuously updated, you can choose the normal pull mode. |
full update mode | During the execution of a machining task, the log service will periodically pull the full amount of table data once. Each time the full amount is pulled, it is very time-consuming. If the amount of data in your database is small (data volume < = 2GB) and updates are infrequent (configuration refresh_interval > = 300s), you can choose the full update mode. |
incremental update mode | During the execution of a machining task, the logging service periodically pulls new data based on the timestamp field in the database & table. In the incremental update mode, the log service only pulls new data each time, which is efficient. You can also configure the refresh_interval to 10 seconds to synchronize data in the database & table at the second level with high immediacy. If you have a large amount of data in your database & tables, updates are frequent, and you have high data real-time requirements, you can choose the incremental update mode. |
parameter | Parameter type | Is it required? | default value | explain |
host | String | Yes | / | MySQL instance domain name, currently supports Volcano Engine cloud database MySQL version and self-built public network database. When using Volcano Engine Cloud Database MySQL Edition, set the host to the IP address of the VPC to which the MySQL instance belongs. You can view the IP address of the target VPC on its overview page. For details, please refer to View Private Network Details . |
port | String | Yes | / | Database access port. |
username | String | Yes | / | Database access user name. |
password | String | Yes | / | Database access password. |
database | String | Yes | / | Database name. |
table | String | Yes | / | Data database & table name. |
vpc | String | No | / | When using Volcano Engine Cloud Database MySQL Edition, you need to configure the VPC ID used by the MySQL instance, such as vpc-2byx **** . |
fields | String | No | All fields | List of strings or string aliases to be pulled. If left blank, all columns returned by the table parameter are used by default. Use half-width commas (,) when specifying multiple fields, such as field1, field2 . |
include_fields | String | No | / | Configure field whitelist. Table data matching the include_fields is pulled and the rest is discarded. Single field names and values are joined with a half-width colon (:), and multiple fields are separated by a half-width comma (,), such as field1: value1, field2: value2 . |
exclude_fields | String | No | / | Configure field blacklist, matching exclude_fields table data will be discarded, the rest of the data is pulled. Single field names and values are concatenated with colons (:), and multiple fields are separated by commas (,), such as field1: value1, field2: value2 . explain If you set both include_fields and exclude_fields parameters, the system preferentially matches include_fields parameters and then exclude_fields parameters. |
primary_keys | String | No | / | Primary Key. After configuring this parameter, the data in the table will be pulled as key: Value in dictionary form and saved to memory. The key is the value of the primary_keys parameter, and the value is the entire row of data pulled into the table.
|
update_time_key | String | No | / | For incremental data acquisition. For example update_time_key = "update_time" , where update_time is the updated time field of the data in the MySQL database, which supports the Datetime, Timestamp data types. Please ensure that the value of this time field increases over time. If this parameter is not configured, the logging service will perform a full update. explain Data processing does data filtering based on the time field to achieve incremental updates. Please ensure that the field is indexed in the data table, otherwise a full table scan will be performed, which will greatly affect performance. |
refresh_interval | Int | No | 0 | The time interval between pulling data from the MySQL database, in seconds. The default value is 0, indicating that the full amount is pulled only once. |
base_retry_back_off | Int | No | 1 | The time interval for re-pulling after failure to pull data, the default value is 1, in seconds. |
max_retry_back_off | Int | No | 60 | The maximum time interval to retry a request after a failed data pull. The default value is 60, in seconds. It is recommended to use the default value. |
id | name | desc |
1 | zhangsan | Man out of law |
id | name | desc | update_time |
1 | zhangsan | Man out of law | 2024-07-08 14:23:14 |
2 | lisi | Hey man, what can i say! | 2024-07-08 14:23:15 |