kafka 根据时间获取topic偏移量问题

kafka 版本 cdh KAFKA-2.2.0-1.2.2.0.p0.68 对应的Apache 0.10.2

根据时间去获取最近的偏移量,有的topic能取到,有的取不到

发现能获取到的timeindex文件内容大于0, 取不到的timeindex都是0

博主有碰到过这样的问题吗?







发表于: 26天前   最后更新时间: 26天前   游览量:193
上一条: 到头了!
下一条: 已经是最后了!

评论…


  • 指定时间的消息是空,或清理了 才会这样
    • 其中一条数据

      offset: 14291237 position: 126605831 CreateTime: -1 isvalid: true payloadsize: 649 magic: 1 compresscodec: NONE crc: 3933690820 keysize: 8 key: ycmere_  payload: {"ablbelnr":" ","ableinh":"T4M25M01","ablesgr":"01","adattats":"20180824","angle":0,"anlage":"6018079068","begru":"0418","concetrarid":"112","cputm":"013016","ernam":" ","ersda":"20180824","fstate":"0","jym":"33","mandt":"800","massread":" ","meterused":" ","notbydays":"0","odq_changedate":"2018-08-24","odq_changemode":"I","odq_changetime":"2018-08-24T01:30:27","odq_entitycntr":"99","opnum":"A020-897016963","prflg":" ","resfee":69.68,"revolume":"0","serge":"A01981803020081","sernr":" ","source":" ","temper":0,"updat":"00000000","upstate":" ","uputm":"000000","vertrag":" ","xym":"0","ycdate":"20180824","ydcdy":0,"yerrtext":" ","zwstndab":9.1}
        • 对应topic 的配置 {flush.messages -> 9223372036854775807, message.timestamp.type -> CreateTime, segment.bytes -> 1073741824, preallocate -> false, cleanup.policy -> [delete], delete.retention.ms -> 604800000, segment.ms -> 604800000, min.insync.replicas -> 1, file.delete.delay.ms -> 60000, retention.ms -> 2592000000, max.message.bytes -> 1000000, message.format.version -> 0.10.2-IV0, index.interval.bytes -> 4096, segment.index.bytes -> 10485760, retention.bytes -> -1, segment.jitter.ms -> 0, min.cleanable.dirty.ratio -> 0.5, compression.type -> producer, unclean.leader.election.enable -> false, message.timestamp.difference.max.ms -> 9223372036854775807, min.compaction.lag.ms -> 0, flush.ms -> 9223372036854775807}
          • 评论…
            • in this conversation