This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new 380395a61f [doc](routineload)Common mistakes in adding routine load #13975 380395a61f is described below commit 380395a61f023cdd3a5b9b26d148fd8beaf17f22 Author: caoliang-web <71004656+caoliang-...@users.noreply.github.com> AuthorDate: Sat Nov 5 19:17:33 2022 +0800 [doc](routineload)Common mistakes in adding routine load #13975 --- docs/en/docs/faq/data-faq.md | 18 ++++++++++++++++++ docs/zh-CN/docs/faq/data-faq.md | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/docs/en/docs/faq/data-faq.md b/docs/en/docs/faq/data-faq.md index 57cb1218d3..2f4cd0e5c7 100644 --- a/docs/en/docs/faq/data-faq.md +++ b/docs/en/docs/faq/data-faq.md @@ -149,3 +149,21 @@ broker_timeout_ms = 10000 ```` Adding parameters here requires restarting the FE service. + +### Q11. [ Routine load ] ReasonOfStateChanged: ErrorReason{code=errCode = 104, msg='be 10004 abort task with reason: fetch failed due to requested offset not available on the broker: Broker: Offset out of range'} + +The reason for this problem is that Kafka's cleanup policy defaults to 7 days. When a routine load task is suspended for some reason and the task is not restored for a long time, when the task is resumed, the routine load records the consumption offset, and This problem occurs when kafka has cleaned up the corresponding offset + +So this problem can be solved with alter routine load: + +View the smallest offset of kafka, use the ALTER ROUTINE LOAD command to modify the offset, and resume the task + +```sql +ALTER ROUTINE LOAD FOR db.tb +FROM kafka +( + "kafka_partitions" = "0", + "kafka_offsets" = "xxx", + "property.group.id" = "xxx" +); +``` diff --git a/docs/zh-CN/docs/faq/data-faq.md b/docs/zh-CN/docs/faq/data-faq.md index 466463b3a6..a9b5e675ee 100644 --- a/docs/zh-CN/docs/faq/data-faq.md +++ b/docs/zh-CN/docs/faq/data-faq.md @@ -147,3 +147,21 @@ broker_timeout_ms = 10000 ``` 这里添加参数,需要重启 FE 服务。 + +### Q11.[ Routine load ] ReasonOfStateChanged: ErrorReason{code=errCode = 104, msg='be 10004 abort task with reason: fetch failed due to requested offset not available on the broker: Broker: Offset out of range'} + +出现这个问题的原因是因为kafka的清理策略默认为7天,当某个routine load任务因为某种原因导致任务暂停,长时间没有恢复,当重新恢复任务的时候routine load记录了消费的offset,而kafka的清理策略已经清理了对应的offset,就会出现这个问题 + +所以这个问题可以用alter routine load解决方式: + +查看kafka最小的offset ,使用ALTER ROUTINE LOAD命令修改offset,重新恢复任务即可 + +```sql +ALTER ROUTINE LOAD FOR db.tb +FROM kafka +( + "kafka_partitions" = "0", + "kafka_offsets" = "xxx", + "property.group.id" = "xxx" +); +``` --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org