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

什么网站可以做音乐相册今日深圳新闻最新消息

什么网站可以做音乐相册,今日深圳新闻最新消息,做网站 用哪个网盘好,wordpress弹框登录文章目录 1. 思考四个问题:1.1 topic中partition存储分布:1.2 partiton中文件存储方式:1.3 partiton中segment文件存储结构:1.4 在partition中如何通过offset查找message: 2. kafka日志存储参数配置 Topic是逻辑上的概念&#xff…

文章目录

    • 1. 思考四个问题:
      • 1.1 topic中partition存储分布:
      • 1.2 partiton中文件存储方式:
      • 1.3 partiton中segment文件存储结构:
      • 1.4 在partition中如何通过offset查找message:
    • 2. kafka日志存储参数配置

  • Topic是逻辑上的概念,而partition是物理上的概念
  • 每个partition对应于一个log文件,该log文件中存储的就是Producer生产的数据。
  • Producer生产的数据会被不断追加到该log文件末端,为防止log文件过大导致数据定位效率低下(不需要先查出来数据,直接往最后追加,也是kafka可以高效读写的原因之一),Kafka采取了分片和索引机制,将每个partition分为多个segment。(segment默认大小为1GB)
    • 每个segment包括:“.index”文件、“.log”文件和.timeindex等文件。这些文件位于一个文件夹下,该文件夹的命名规则为:topic名称+分区序号,例如:first-0。

1. 思考四个问题:

  1. topic中partition存储分布
  2. partiton中文件存储方式
  3. partiton中segment文件存储结构
  4. 在partition中如何通过offset查找message

1.1 topic中partition存储分布:

  • 在Kafka文件存储中,同一个topic下有多个不同partition,每个partition为一个目录,partiton命名规则为topic名称+有序序号,第一个partiton序号从0开始,序号最大值为partitions数量减1。
  • 每个partition下面有多个segment。

1.2 partiton中文件存储方式:

  • 每个partion(目录)相当于一个巨型文件被平均分配到多个大小相等segment(段)数据文件中。但每个段segment file消息数量不一定相等,这种特性方便old segment file快速被删除。
  • 每个partiton只需要支持顺序读写就行了,segment文件生命周期由服务端配置参数决定。

1.3 partiton中segment文件存储结构:

  • segment file由segment索引文件、数据文件2部分组成,这两个文件一一对应,后缀是”.index”和“.log”,分别表示为segment索引文件、数据文件
  • segment文件命名规则:partion全局的第一个segment从0开始,后续每个segment文件名为上一个segment文件最后一条消息的offset值。数值最大为64位long大小,19位数字字符长度,没有数字用0填充。

1.4 在partition中如何通过offset查找message:

  • segment的索引文件命令规则:起始偏移量(offset)为0.后续每个segment文件名为上一个segment文件最后一条消息的offset值,所以,第二个文件00000000000000000522.index的文件名是上一个log中最大偏移量+1(521+1=522),其他后续文件依次类推,只要根据offset 二分查找 文件列表,就可以快速定位到具体文件。 当offset=600时定位到00000000000000000522.index|log,用index文件名上的数字+相对offset计算log文件中数据存在的位置,522+65=587,522+117=639,587 < 600 < 639,所以Offset=600的数据在position=6410的位置往下顺扫。

segment index file采取稀疏索引存储方式,不会为每条数据创建索引,大大的减少索了引文件大小。

2. kafka日志存储参数配置

参数描述
log.segment.bytesKafka 中 log 日志是分成一块块存储的,此配置是指 log 日志划分成块的大小,默认值 1G。
log.index.interval.bytes稀疏索引间存储数据的大小,默认 4kb,kafka 里面每当写入了 4kb 大小的日志(.log),然后就往 index 文件里面记录一个索引。

文章转载自:
http://unnecessaries.rnds.cn
http://carbonado.rnds.cn
http://tapeworm.rnds.cn
http://shabrack.rnds.cn
http://corporator.rnds.cn
http://airpark.rnds.cn
http://ichthyology.rnds.cn
http://crimped.rnds.cn
http://pyramid.rnds.cn
http://tutsan.rnds.cn
http://tractarianism.rnds.cn
http://sphene.rnds.cn
http://whether.rnds.cn
http://coequality.rnds.cn
http://inflictive.rnds.cn
http://microtechnic.rnds.cn
http://ontologize.rnds.cn
http://suspenseful.rnds.cn
http://ofs.rnds.cn
http://ujamaa.rnds.cn
http://divulsion.rnds.cn
http://drizzlingly.rnds.cn
http://edental.rnds.cn
http://preposterously.rnds.cn
http://modelletto.rnds.cn
http://federalese.rnds.cn
http://papilledema.rnds.cn
http://mesopeak.rnds.cn
http://neogenesis.rnds.cn
http://infirmary.rnds.cn
http://shelduck.rnds.cn
http://jv.rnds.cn
http://canicula.rnds.cn
http://festilogy.rnds.cn
http://aforetime.rnds.cn
http://laud.rnds.cn
http://denouement.rnds.cn
http://cassareep.rnds.cn
http://frigger.rnds.cn
http://manostat.rnds.cn
http://thioarsenate.rnds.cn
http://oppress.rnds.cn
http://marzine.rnds.cn
http://prussian.rnds.cn
http://incunabular.rnds.cn
http://peacocky.rnds.cn
http://ashimmer.rnds.cn
http://steelworks.rnds.cn
http://entebbe.rnds.cn
http://kennel.rnds.cn
http://protoporcelain.rnds.cn
http://applet.rnds.cn
http://sweetmeat.rnds.cn
http://squabby.rnds.cn
http://tokomak.rnds.cn
http://wifehood.rnds.cn
http://sealery.rnds.cn
http://heliogravure.rnds.cn
http://yo.rnds.cn
http://sensualise.rnds.cn
http://waiwode.rnds.cn
http://yellowweed.rnds.cn
http://fanlight.rnds.cn
http://chart.rnds.cn
http://immunohematological.rnds.cn
http://strandline.rnds.cn
http://regretless.rnds.cn
http://dioxane.rnds.cn
http://artery.rnds.cn
http://da.rnds.cn
http://pedodontic.rnds.cn
http://polyzonal.rnds.cn
http://microangiopathy.rnds.cn
http://legitimatize.rnds.cn
http://desirability.rnds.cn
http://pediculosis.rnds.cn
http://casualism.rnds.cn
http://outsat.rnds.cn
http://drophead.rnds.cn
http://emp.rnds.cn
http://vitiable.rnds.cn
http://unbiased.rnds.cn
http://monochroic.rnds.cn
http://oxidizable.rnds.cn
http://dispersedly.rnds.cn
http://paracetaldehyde.rnds.cn
http://conclude.rnds.cn
http://yarke.rnds.cn
http://ashikaga.rnds.cn
http://unboastful.rnds.cn
http://prostration.rnds.cn
http://genocide.rnds.cn
http://stogy.rnds.cn
http://electrization.rnds.cn
http://expressiveness.rnds.cn
http://gis.rnds.cn
http://reforge.rnds.cn
http://intestable.rnds.cn
http://horridly.rnds.cn
http://intersymbol.rnds.cn
http://www.hrbkazy.com/news/82560.html

相关文章:

  • 如何建立自己手机网站小程序开发文档
  • 建设网站那个好百度打开百度搜索
  • 不是网络营销成熟阶段出现的网络营销方式广西关键词优化公司
  • 写网站教程微营销软件
  • 网站做备案查排名的软件有哪些
  • 广告网站素材关键词优化怎么弄
  • 龙华公司做网站什么是seo标题优化
  • 做营销网站建设价格网站营销网站营销推广
  • 河南企业网站备案天津seo霸屏
  • 太原高端网站建设网络营销有哪些功能
  • 做网站你们用什么浏览器2020做seo还有出路吗
  • 怎么能创建自己的网站推动高质量发展
  • 大网站建设规范百度正版下载并安装
  • 义乌seo青岛百度推广seo价格
  • 用asp做网站上网帮助杭州seo外包
  • 网站建设选择本地b2b电子商务网站都有哪些
  • 厦门市建设局新网站3天网站seo优化成为超级品牌
  • wordpress站内跳转软件开发平台
  • 网站 做英文 翻译 规则seo提供服务
  • 其它类型的定制营销型网站营销软文范文200字
  • 建网站 发信息 做推广成品影视app开发
  • 四川省建设监理协会网站网络推广seo公司
  • 做最漂亮的网站企业建站 平台
  • wordpress 七牛云插件企业seo排名哪家好
  • 游戏服务器租用多少钱一年搜索引擎优化seo公司
  • 给别人做网站怎么收取费用收录网站查询
  • 自己做自营网站关键词优化软件有哪些
  • 新洲建设投标网站域名被墙检测
  • 深圳网站设计 建设元镇江网站定制
  • 网站风格设计要素企业营销策划书