kafka-storm spout拉取数据问题offset out of range
2017-01-16 09:06
441 查看
131236985 [Thread-15-spout] WARN storm.kafka.KafkaUtils - Got fetch request with offset out of range: [14026]; retrying with default start offset time from configuration. configured start offset time: [-2]
131236985 [Thread-17-spout] WARN storm.kafka.PartitionManager - Using new offset: 511883
131236985 [Thread-15-spout] WARN storm.kafka.PartitionManager - Using new offset: 511888
131236986 [Thread-15-spout] WARN storm.kafka.KafkaUtils - Got fetch request with offset out of range: [14026]; retrying with default start offset time from configuration. configured start offset time: [-2]
解决办法:
1.修改SpoutConfig.zkRoot 值
String zkRoot = “”;
SpoutConfig spoutConf = new SpoutConfig(hosts, topic, zkRoot, id);
2.将spoutConf.forceFromStart 设为 true;
原因:
storm启动的时候,默认是从头读取-2,当kafkaspout的task出错时候,会重新启动,这时候offset就会从zk中最老的offset,但kafka数据只会保存一段时间,从zk中读取道德offset的数据可能已经不存在,超过现在的范围。
kafkaspout读取的3种选项
-2: 从最老的开始读
-1: 从最近的开始读
0: 从Zk中读
131236985 [Thread-17-spout] WARN storm.kafka.PartitionManager - Using new offset: 511883
131236985 [Thread-15-spout] WARN storm.kafka.PartitionManager - Using new offset: 511888
131236986 [Thread-15-spout] WARN storm.kafka.KafkaUtils - Got fetch request with offset out of range: [14026]; retrying with default start offset time from configuration. configured start offset time: [-2]
解决办法:
1.修改SpoutConfig.zkRoot 值
String zkRoot = “”;
SpoutConfig spoutConf = new SpoutConfig(hosts, topic, zkRoot, id);
2.将spoutConf.forceFromStart 设为 true;
原因:
storm启动的时候,默认是从头读取-2,当kafkaspout的task出错时候,会重新启动,这时候offset就会从zk中最老的offset,但kafka数据只会保存一段时间,从zk中读取道德offset的数据可能已经不存在,超过现在的范围。
kafkaspout读取的3种选项
-2: 从最老的开始读
-1: 从最近的开始读
0: 从Zk中读
相关文章推荐
- kafka-storm spout拉取数据问题offset out of range(todo)
- Kafka kafka.common.OffsetOutOfRangeException 问题处理
- kafka.common.OffsetOutOfRangeException 问题处理
- C++泛型指针的正向与逆向循环读取时报错Expreeeion:vector iterator + offset out of range问题
- Kafka 副本OffsetOutOfRangeException
- .NET中使用GridView控件输入数据时出现“ Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index"的问题
- C++ 中的vector iterator offset out of range问题
- Spark streaming kafka OffsetOutOfRangeException 异常分析与解决
- kafka的OffsetOutOfRangeError
- java.lang.NoSuchMethodError和kafka.common.OffsetOutOfRangeException(Spark)
- kafka的OffsetOutOfRangeException
- Caused by: kafka.common.OffsetOutOfRangeException
- spark streaming kafka OffsetOutOfRangeException 异常分析与解决
- 遇到的一个"String index out of range" 问题
- 海思mmz: section 2 reloc 30 sym 'printk': relocation 28 out of range问题解决
- 使用PCL的IntegralImageNormalEstimation遇到的vector subsript out of range问题
- 插入数据库 出现 Data truncation: Out of range value adjusted for column 'id'....的问题
- Java 中The literal 078 of type int is out of range问题
- Java中long类型直接赋值出现The literal xxxxxxxxxx of type int is out of range 问题的原因和解决方法
- 容器赋值 容器使用问题:vector subscript out of range