我刚开始接触加缪。我计划每小时运行一次camus作业。我们每小时会收到大约80000000条消息(平均大小约为4KB)。
如何设置以下属性:
# max historical time that will be pulled from each partition based on event timestamp
kafka.max.pull.hrs=1
# events with a timestamp older than this will be discarded.
kafka.max.historical.days=3我不能清楚地看清这些配置。是否应该将天作为1,将小时属性作为2?加缪是如何获取数据的?我还经常看到下面的错误:
ERROR kafka.CamusJob: Offset range from kafka metadata is outside the previously persisted offset
Please check whether kafka cluster configuration is correct. You can also specify config parameter: kafka.move.to.earliest.offset to start processing from earliest kafka metadata offset.如何正确设置配置,使其每小时运行一次并避免该错误?
发布于 2016-05-10 20:28:21
“kafka元数据的偏移量范围超出了先前持久化的偏移量。”
表示您的抓取速度没有kafka的修剪快。
kafka的剪枝由log.retention.hours定义。
第一个选项:通过更改"log.retention.hours“来增加保留时间
第二种选择:以更高的频率运行它。
第三个选项:在您的camus作业kafka.move.to.earliest.offset=true.中设置此属性将迫使加缪从当前存在于kafka中的最早偏移量开始消费。但这可能会导致数据丢失,因为我们没有考虑到我们无法获取的修剪数据。
https://stackoverflow.com/questions/33543099
复制相似问题