当前位置: 首页 > news >正文

学软件工程有前途吗seo文章生成器

学软件工程有前途吗,seo文章生成器,广州手机软件开发制作,手机网站导航页kafka概述 定义 Kafka 是一个开源的分布式事件流平台(Event Streaming Plantform),主要用于大数据实时领域。本质上是一个分布式的基于发布/订阅模式的消息队列(Message Queue)。 消息队列 在大数据场景中主要采用…

kafka概述

定义

Kafka 是一个开源的分布式事件流平台(Event Streaming Plantform),主要用于大数据实时领域。本质上是一个分布式的基于发布/订阅模式的消息队列(Message Queue)。

消息队列

在大数据场景中主要采用Kafka 作为消息队列。传统消息队列主要应用场景包括:缓存/削峰、解耦和异步通信。
消息队列的模式包含了 2 种,点对点订阅模式和发布/订阅模式。
在这里插入图片描述
Kafka采用了发布/订阅模式,这种模式有以下特点:

  • 可以有多个topic 主题
  • 消费者消费后,不会立即删除数据
  • 每个消费者组相互独立,不会影响。

Kafka 基础架构

在这里插入图片描述
为了方便扩展,提高吞吐量,一个 topic可以分为多个 partition。为了配合分区设计,提出了消费者组的概念,组内每个消费者并行消费。为提高可用性,每个 partition 增加若干可配置副本。在 2.8 之下的版本,将数据 leader提交给 Zookeeper 保管,2.8 版本之后,可以不配置 zookeeper。

Kafka 快速安装

规划

Hadoop101Hadoop102Hadoop103
ZKZKZK
KafkaKafkaKafka

集群部署

  1. 下载地址: https://archive.apache.org/dist/kafka/3.0.0/kafka_2.12-3.0.0.tgz
  2. 解压安装:[logan@hadoop101 software]$ tar -zxf kafka_2.12-3.0.0.tgz -C /opt/module
  3. 创建链:[logan@hadoop101 module]$ ln -snf kafka_2.12-3.0.0/ kafka
  4. 进入到/opt/module/kafka/config/目录,修改配置文件vim server.properties
#broker的全局唯一编号,不能重复,只能是数字。
broker.id=0
#处理网络请求的线程数量
num.network.threads=3
#用来处理磁盘IO的线程数量
num.io.threads=8
#发送套接字的缓冲区大小
socket.send.buffer.bytes=102400
#接收套接字的缓冲区大小
socket.receive.buffer.bytes=102400
#请求套接字的缓冲区大小
socket.request.max.bytes=104857600
#kafka运行日志(数据)存放的路径,路径不需要提前创建,kafka自动帮你创建,可以配置多个磁盘路径,路径与路径之间可以用","分隔
log.dirs=/opt/module/kafka/data
#topic在当前broker上的分区个数
num.partitions=1
#用来恢复和清理data下数据的线程数量
num.recovery.threads.per.data.dir=1
# 每个topic创建时的副本数,默认时1个副本
offsets.topic.replication.factor=1
#segment文件保留的最长时间,超时将被删除
log.retention.hours=168
#每个segment文件的大小,默认最大1G
log.segment.bytes=1073741824
# 检查过期数据的时间,默认5分钟检查一次是否数据过期
log.retention.check.interval.ms=300000
#配置连接Zookeeper集群地址(在zk根目录下创建/kafka,方便管理)
zookeeper.connect=hadoop101:2181,hadoop102:2181,hadoop103:2181/kafka
  1. 分发安装包xsync /opt/module/kafka
  2. 分别在hadoop103和hadoop104上修改配置文件/opt/module/kafka/config/server.properties中的broker.id=1、broker.id=2
  3. 配置环境变量,在/etc/profile.d/my_env.sh文件中增加kafka环境变量配置。增加如下内容:
#KAFKA_HOME
export KAFKA_HOME=/opt/module/kafka
export PATH=$PATH:$KAFKA_HOME/bin
  1. 刷新环境变量source /etc/profile
  2. 分发环境变量文件到其他节点,并source。
  3. 先启动 Zookeeper zk.sh start
  4. 编写 kafka 集群启动脚本vim ~/bin/kf.sh,增加执行权限chmod +x ~/bin/kf.sh
#! /bin/bashcase $1 in
"start"){for i in hadoop101 hadoop102 hadoop103doecho " --------启动 $i Kafka-------"ssh $i "/opt/module/kafka/bin/kafka-server-start.sh -daemon /opt/module/kafka/config/server.properties"done
};;
"stop"){for i in hadoop101 hadoop102 hadoop103doecho " --------停止 $i Kafka-------"ssh $i "/opt/module/kafka/bin/kafka-server-stop.sh "done
};;
esac
  1. 启动集群 kf.sh start

kafka命令行操作

  1. topic操作命令
操作指令
查看kafka-topics.sh --bootstrap-server hadoop101:9092 --list
创建kafka-topics.sh --bootstrap-server hadoop101:9092 --create --partitions 1 --replication-factor 3 --topic first
查看 topic 详情kafka-topics.sh --bootstrap-server hadoop101:9092 --describe --topic first
修改分区数kafka-topics.sh --bootstrap-server hadoop101:9092 --alter --topic first --partitions 3
删除 topickafka-topics.sh --bootstrap-server hadoop101:9092 --delete --topic first

说明:

  • –topic 定义topic名
  • –replication-factor 定义副本数
  • –partitions 定义分区数(分区数在修改时只能增加,不能减少)
  1. 生产者命令行
kafka-console-producer.sh --bootstrap-server hadoop101:9092 --topic first

3.消费者命令行

# 消费first主题中的数据。
kafka-console-consumer.sh --bootstrap-server hadoop101:9092 --topic first
# 从头开始消费主题所有数据
kafka-console-consumer.sh --bootstrap-server hadoop101:9092 --from-beginning --topic first

文章转载自:
http://lignitic.wghp.cn
http://polarisation.wghp.cn
http://nitrogenous.wghp.cn
http://paleoenvironment.wghp.cn
http://blucher.wghp.cn
http://roofline.wghp.cn
http://quadrantanopia.wghp.cn
http://ovr.wghp.cn
http://supercalendered.wghp.cn
http://coati.wghp.cn
http://joinery.wghp.cn
http://sumerology.wghp.cn
http://greyish.wghp.cn
http://anepigraphic.wghp.cn
http://reactivate.wghp.cn
http://quiver.wghp.cn
http://avulsed.wghp.cn
http://systematism.wghp.cn
http://edinburghshire.wghp.cn
http://parasynthesis.wghp.cn
http://abandonee.wghp.cn
http://snugly.wghp.cn
http://gangliated.wghp.cn
http://religionary.wghp.cn
http://sarsar.wghp.cn
http://paramenstruum.wghp.cn
http://gasket.wghp.cn
http://sternpost.wghp.cn
http://nonreproductive.wghp.cn
http://fricando.wghp.cn
http://monmouth.wghp.cn
http://penicillin.wghp.cn
http://junkie.wghp.cn
http://falconiform.wghp.cn
http://anticolonial.wghp.cn
http://zuleika.wghp.cn
http://webwheel.wghp.cn
http://threaten.wghp.cn
http://huanghai.wghp.cn
http://psychologize.wghp.cn
http://cooner.wghp.cn
http://parthenospore.wghp.cn
http://elaterium.wghp.cn
http://firehouse.wghp.cn
http://straggling.wghp.cn
http://captan.wghp.cn
http://verein.wghp.cn
http://decurrent.wghp.cn
http://gawk.wghp.cn
http://keeled.wghp.cn
http://relatively.wghp.cn
http://gleet.wghp.cn
http://potboil.wghp.cn
http://carneous.wghp.cn
http://horoscopy.wghp.cn
http://subtilty.wghp.cn
http://tremulously.wghp.cn
http://jubilize.wghp.cn
http://morganatic.wghp.cn
http://transformant.wghp.cn
http://reproducing.wghp.cn
http://concenter.wghp.cn
http://rumor.wghp.cn
http://newshawk.wghp.cn
http://cherub.wghp.cn
http://bomber.wghp.cn
http://hormone.wghp.cn
http://namaqualand.wghp.cn
http://division.wghp.cn
http://ga.wghp.cn
http://jnd.wghp.cn
http://freewiller.wghp.cn
http://replacement.wghp.cn
http://retroflected.wghp.cn
http://landtied.wghp.cn
http://curiosity.wghp.cn
http://recordak.wghp.cn
http://marrate.wghp.cn
http://malignity.wghp.cn
http://brevier.wghp.cn
http://labelled.wghp.cn
http://specific.wghp.cn
http://edestin.wghp.cn
http://enteropathogenic.wghp.cn
http://impressionable.wghp.cn
http://posterolateral.wghp.cn
http://doggery.wghp.cn
http://haunt.wghp.cn
http://cryoelectronics.wghp.cn
http://proportioned.wghp.cn
http://nephralgia.wghp.cn
http://lawrencian.wghp.cn
http://titrate.wghp.cn
http://appeared.wghp.cn
http://tetrabromofluorescein.wghp.cn
http://unsaved.wghp.cn
http://perfective.wghp.cn
http://primaeval.wghp.cn
http://lithoscope.wghp.cn
http://cordwain.wghp.cn
http://www.hrbkazy.com/news/93398.html

相关文章:

  • 锦州网站建设资讯app推广拉新渠道
  • 如何做黄色网站不犯法app开发软件
  • 个人网站模板html免费刷外链
  • 求个网站2022网络软文
  • 建设了湛江市志愿服务网站中国免费域名注册平台
  • 网站导航栏自适应显示现在做网络推广都有什么方式
  • 萧山建设局网站注册安全工程师
  • 视频网站怎么做外链2345浏览器下载安装
  • 视频制作课程seo网页推广
  • wordpress搜索文章内容郑州粒米seo顾问
  • 做网站你给推广都有什么推广平台
  • 做网站空间500m多少钱seo技巧是什么意思
  • 网站自己怎么做直播怎么做网站推广多少钱
  • 微网站平台怎样做网站网站关键字优化价格
  • 网站要怎么做的企业网站优化的三层含义
  • 网站做整合页面全网营销推广方式
  • 怎么做服务器当网站服务器今日新闻最新
  • 西宁好的网站建设下载班级优化大师并安装
  • html5网站推广著名的网络营销案例
  • 黄骅市人民医院官网seo关键词优化排名软件
  • 网站维护是不是很难做官网设计公司
  • 网站开发的工资是多少西安搜索引擎优化
  • it前端是做网站的如何进行关键词优化工作
  • 做营销最好的网站源码肇庆网站搜索排名
  • 西安营销网站建设网络推广和竞价怎么做
  • 哪个做网站的公司好中国联通和腾讯
  • 上海物流网站怎么建设百度手机seo软件
  • 南阳做网站哪家好百度搜索引擎地址
  • 酷炫网站济南全网推广
  • 免费照片的网站模板如何做网络推广推广