confluent环境谨慎删除topic
2016-07-04 09:37
330 查看
关注一段代码
kafka-connect-hdfs-2.0.0\src\main\java\io\confluent\connect\hdfs\TopicPartitionWriter.java
看一段日志
这段轻描淡写的日志,就是数据死活近不了hdfs的重要线索。一旦offset对不牢,就不会写入数据了。
kafka-connect-hdfs-2.0.0\src\main\java\io\confluent\connect\hdfs\TopicPartitionWriter.java
private void writeRecord(SinkRecord record) throws IOException { long expectedOffset = offset + recordCounter; if (offset == -1) { offset = record.kafkaOffset(); } else if (record.kafkaOffset() != expectedOffset) { // Currently it's possible to see stale data with the wrong offset after a rebalance when you // rewind, which we do since we manage our own offsets. See KAFKA-2894. if (!sawInvalidOffset) { log.info( "Ignoring stale out-of-order record in {}-{}. Has offset {} instead of expected offset {}", record.topic(), record.kafkaPartition(), record.kafkaOffset(), expectedOffset); } sawInvalidOffset = true; return; }
看一段日志
[2016-07-01 18:19:50,199] INFO Ignoring stale out-of-order record in beaver_http_response-1. Has offset 122980245 instead of expected offset 96789608 (io.confluent.connect.hdfs.TopicPartitionWriter:470) [2016-07-01 18:19:50,200] INFO Starting commit and rotation for topic partition beaver_http_response-1 with start offsets {} and end offsets {} (io.confluent.connect.hdfs.TopicPartitionWriter:267)
这段轻描淡写的日志,就是数据死活近不了hdfs的重要线索。一旦offset对不牢,就不会写入数据了。
相关文章推荐
- Kafka 之 中级
- Linux下Kafka单机安装配置方法(图文)
- Kafka使用入门教程第1/2页
- Logstash 与Elasticsearch整合使用示例
- 大数据实验室(大数据基础培训)——Kafka的安装、配置及基础使用
- 大数据实验室(大数据基础培训)——概要
- kafka-manager 的编译和使用(附安装包)
- Kafka+Log4j实现日志集中管理
- Kafka深度解析
- Kafka设计解析(三)- Kafka High Availability (下)
- kafka+storm初探
- storm集群 + kafka单机性能测试
- flume、kafka、storm常用命令
- kafka入门:简介、使用场景、设计原理、主要配置及集群搭建
- kafka集群的安装
- kafka 一些基本知识
- kafka0.10.0单机测试
- kafka 基本原理二
- Kafka入门经典教程