![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
kafka
LJ2415
这个作者很懒,什么都没留下…
展开
-
模拟生成单词,消费单词
package kafka;import org.apache.kafka.clients.producer.KafkaProducer;import org.apache.kafka.clients.producer.ProducerRecord;import org.apache.kafka.common.serialization.StringSerializer;import...原创 2018-12-26 15:19:51 · 315 阅读 · 0 评论 -
Streaming-Kafka-redis
package utilsimport org.apache.commons.pool2.impl.GenericObjectPoolConfigimport redis.clients.jedis.{Jedis, JedisPool}/** * 创建jedis连接池 */object Jpools { private val poolConfig = new Gene...原创 2018-12-26 16:19:16 · 151 阅读 · 0 评论 -
kafka创建Topic出现的问题
replication factor: 3 larger than available brokers: 1[2018-12-15 07:25:43,621] ERROR org.apache.kafka.common.errors.InvalidReplicationFactorException: replication factor: 3 larger than available bro...原创 2018-12-17 11:50:02 · 4908 阅读 · 0 评论 -
Kafka-Straming-redis(offset)
package kafka2import java.utilimport org.apache.kafka.common.TopicPartitionimport utils.Jpoolsimport scala.collection.mutable._/** * 获取redis里面存储的偏移量数据 */object RedisOffset { def apply...原创 2018-12-27 20:30:17 · 558 阅读 · 0 评论 -
kafka生产者和消费者
package kafka;import org.apache.kafka.clients.producer.KafkaProducer;import org.apache.kafka.clients.producer.ProducerRecord;import org.apache.kafka.common.serialization.StringSerializer;import...原创 2018-12-24 21:28:52 · 224 阅读 · 0 评论 -
kafka的简单介绍
kafka 分布式的消息存储服务 kafka 术语: broker:安装了kafka软件的一台机器 topic:kafka内部消息是分主题存放的 partition:在Topic的内部,数据是按照分区存放 leader: leader某个主题下的某个分区对外提供的读写服务的角色 follower:某个分区除...原创 2018-12-24 22:03:34 · 278 阅读 · 0 评论 -
SparkStreaming整合kafka入门
package kafkaimport com.typesafe.config.ConfigFactoryimport org.apache.kafka.clients.consumer.ConsumerRecordimport org.apache.kafka.common.serialization.StringDeserializerimport org.apache.spark...原创 2018-12-25 22:26:12 · 180 阅读 · 0 评论 -
Streaming-kafka-mysql (scalikejdbc)
package kafkaimport java.sql.DriverManagerimport com.typesafe.config.ConfigFactoryimport org.apache.kafka.common.TopicPartitionimport org.apache.spark.streaming.kafka010.OffsetRangeimport scal...原创 2018-12-26 11:53:24 · 281 阅读 · 0 评论