Azure 流分析的输出错误策略Azure Stream Analytics output error policy

本文介绍可在 Azure 流分析中配置的输出数据错误处理策略。This article describes the output data error handling policies that can be configured in Azure Stream Analytics.

输出数据错误处理策略仅适用于当流分析作业生成的输出事件不符合目标接收器的架构时发生的数据转换错误。Output data error handling policies apply only to data conversion errors that occur when the output event produced by a Stream Analytics job does not conform to the schema of the target sink. 可以选择“重试”或“丢弃”来配置此策略。 You can configure this policy by choosing either Retry or Drop. 在 Azure 门户上的流分析作业中的“配置”下选择“错误策略”。 In the Azure portal, while in a Stream Analytics job, under Configure, select Error Policy to make your selection.

Azure 流分析的输出错误策略位置

重试Retry

发生错误时,Azure 流分析会无限期重试写入事件,直到写入成功为止。When an error occurs, Azure Stream Analytics retries writing the event indefinitely until the write succeeds. 重试不会超时。There is no timeout for retries. 最终,重试的事件会阻止所有后续事件的处理。Eventually all subsequent events are blocked from processing by the event that is retrying. 此选项是默认的输出错误处理策略。This option is the default output error handling policy.

丢弃Drop

Azure 流分析会丢弃任何导致数据转换错误的输出事件。Azure Stream Analytics will drop any output event that results in a data conversion error. 无法恢复丢弃的事件以便稍后重新处理。The dropped events cannot be recovered for reprocessing later.

不管采用哪种输出错误处理策略配置,都会重试所有暂时性错误(例如网络错误)。All transient errors (for example, network errors) are retried regardless of the output error handling policy configuration.