重试Config

data class RetryConfig @JvmOverloads constructor(val maxRetries: Int = 3, val initialDelay: Duration = Duration.ofSeconds(1), val multiplier: Double = 2.0, val maxDelay: Duration = Duration.ofSeconds(10))

How BigQueryAgentAnalyticsPlugin retries a batch of rows that BigQuery failed to write.

Each wait is the current delay times a random factor between 1 and 2, capped at maxDelay. A retry after an unclear failure such as DEADLINE_EXCEEDED can write rows more than once, with the same event_id; a timed-out append is not retried, since the client may still write it.

构造函数(Constructors)

Link copied to clipboard
constructor(maxRetries: Int = 3, initialDelay: Duration = Duration.ofSeconds(1), multiplier: Double = 2.0, maxDelay: Duration = Duration.ofSeconds(10))

类型

Link copied to clipboard
class Builder

Fluent Builder for RetryConfig该功能主要为 Java 语言的调用者提供支持;如果某个属性未被设置,其值将默认使用构造函数中指定的默认值。

Link copied to clipboard
object Companion

属性(Properties)

Link copied to clipboard

首次重试之前的延迟时间(不包含随机因素),该延迟时间必须为非负值。

Link copied to clipboard

任何单次等待的时间上限都必须至少为……(具体时间值需根据实际情况填写)。 initialDelay.

Link copied to clipboard

在第一次尝试之后会进行重试(即再次尝试执行该操作),这个次数是正数(而不是负数)。 0 现在,重试功能已经被关闭了。

Link copied to clipboard

每次重试后,延迟时间都会增加;延迟时间是有限的,且至少为 1(单位未明确)。

函数

Link copied to clipboard

返回一个 Builder 使用该实例的属性进行初始化,主要适用于 Java 调用者。建议优先选择这种方式。 copy 来自 Java 的代码: copy 该函数会按位置获取所有属性的值;因此,每当有新属性被添加时,其函数签名(即函数的定义)就会发生变化。