欧米茄手表价格及图片官方网站,备案的时候需要网站吗,免费的进销存软件哪个简单好用,红酒网站建设模板目录 1 Avro与Schema Registry2 搭建Schema Registry2.1 下载Confluent并解压2.2 设置环境变量2.3 修改配置2.4 启动服务 3 API列表 1 Avro与Schema Registry
Apache Avro 是一种高效的数据序列化系统#xff0c;用于在不同的应用程序和平台之间传输和存储数据。它提供了一种… 目录 1 Avro与Schema Registry2 搭建Schema Registry2.1 下载Confluent并解压2.2 设置环境变量2.3 修改配置2.4 启动服务 3 API列表 1 Avro与Schema Registry
Apache Avro 是一种高效的数据序列化系统用于在不同的应用程序和平台之间传输和存储数据。它提供了一种紧凑且高效的二进制数据编码格式相比其他常见的序列化方式Avro能够实现更快的序列化和更小的数据存储。
而Confluent Schema Registry是由Confluent公司提供的一个开源组件旨在解决分布式系统中的数据模式演化和兼容性的问题。它是建立在Apache Avro之上的一个服务可以用于集中管理和存储Avro数据的模式Schema确保分布式系统中的数据一致性和兼容性。它广泛应用于事件流处理平台如Kafka为数据流的可靠性和互操作性提供了支持。
2 搭建Schema Registry
2.1 下载Confluent并解压
curl -O https://packages.confluent.io/archive/7.4/confluent-community-7.4.3.tar.gz
sudo tar xvf confluent-community-7.4.3.tar.gz -C /usr/local/bin2.2 设置环境变量
vim ~/.bashrc添加 export SCHEMA_REG_HOME/usr/local/bin/confluent-7.4.3 export PAHT$PAHT:${SCHEMA_REG_HOME}/bin source ~/.bashrc2.3 修改配置
获取本机IP
ip addr修改配置文件
vim /usr/local/bin/confluent-7.4.3/etc/schema-registry/schema-registry.propertieslistenershttp://172.26.143.96:8081 kafkastore.bootstrap.serversPLAINTEXT://172.26.143.96:9092 2.4 启动服务
schema-registry-start $SCHEMA_REG_HOME/etc/schema-registry/schema-registry.properties调用API
curl -X GET http://172.26.143.96:8081/subjects
curl -X GET http://172.26.143.96:8081/subjects/product-value/versions
curl -X GET http://172.26.143.96:8081/schemas/ids/33 API列表
更多信息可参考 Confluent Schema Registry开发指南
# Register a new version of a schema under the subject Kafka-key
$ curl -X POST -H Content-Type: application/vnd.schemaregistry.v1json \--data {schema: {\type\: \string\}} \http://localhost:8081/subjects/Kafka-key/versions{id:1}# Register a new version of a schema under the subject Kafka-value
$ curl -X POST -H Content-Type: application/vnd.schemaregistry.v1json \--data {schema: {\type\: \string\}} \http://localhost:8081/subjects/Kafka-value/versions{id:1}# List all subjects
$ curl -X GET http://localhost:8081/subjects[Kafka-value,Kafka-key]# List all schema versions registered under the subject Kafka-value
$ curl -X GET http://localhost:8081/subjects/Kafka-value/versions[1]# Fetch a schema by globally unique id 1
$ curl -X GET http://localhost:8081/schemas/ids/1{schema:\string\}# Fetch version 1 of the schema registered under subject Kafka-value
$ curl -X GET http://localhost:8081/subjects/Kafka-value/versions/1{subject:Kafka-value,version:1,id:1,schema:\string\}# Fetch the most recently registered schema under subject Kafka-value
$ curl -X GET http://localhost:8081/subjects/Kafka-value/versions/latest{subject:Kafka-value,version:1,id:1,schema:\string\}# Delete version 3 of the schema registered under subject Kafka-value
$ curl -X DELETE http://localhost:8081/subjects/Kafka-value/versions/33# Delete all versions of the schema registered under subject Kafka-value
$ curl -X DELETE http://localhost:8081/subjects/Kafka-value[1, 2, 3, 4, 5]# Check whether a schema has been registered under subject Kafka-key
$ curl -X POST -H Content-Type: application/vnd.schemaregistry.v1json \--data {schema: {\type\: \string\}} \http://localhost:8081/subjects/Kafka-key{subject:Kafka-key,version:1,id:1,schema:\string\}# Test compatibility of a schema with the latest schema under subject Kafka-value
$ curl -X POST -H Content-Type: application/vnd.schemaregistry.v1json \--data {schema: {\type\: \string\}} \http://localhost:8081/compatibility/subjects/Kafka-value/versions/latest{is_compatible:true}# Get top level config
$ curl -X GET http://localhost:8081/config{compatibilityLevel:BACKWARD}# Update compatibility requirements globally
$ curl -X PUT -H Content-Type: application/vnd.schemaregistry.v1json \--data {compatibility: NONE} \http://localhost:8081/config{compatibility:NONE}# Update compatibility requirements under the subject Kafka-value
$ curl -X PUT -H Content-Type: application/vnd.schemaregistry.v1json \--data {compatibility: BACKWARD} \http://localhost:8081/config/Kafka-value{compatibility:BACKWARD}
文章转载自: http://www.morning.dgsr.cn.gov.cn.dgsr.cn http://www.morning.qgjxt.cn.gov.cn.qgjxt.cn http://www.morning.rxzcl.cn.gov.cn.rxzcl.cn http://www.morning.gpfuxiu.cn.gov.cn.gpfuxiu.cn http://www.morning.5-73.com.gov.cn.5-73.com http://www.morning.ltkms.cn.gov.cn.ltkms.cn http://www.morning.npbgj.cn.gov.cn.npbgj.cn http://www.morning.kdbcx.cn.gov.cn.kdbcx.cn http://www.morning.mcjp.cn.gov.cn.mcjp.cn http://www.morning.qtkdn.cn.gov.cn.qtkdn.cn http://www.morning.xuejitest.com.gov.cn.xuejitest.com http://www.morning.gczqt.cn.gov.cn.gczqt.cn http://www.morning.kpcxj.cn.gov.cn.kpcxj.cn http://www.morning.lssfd.cn.gov.cn.lssfd.cn http://www.morning.cnwpb.cn.gov.cn.cnwpb.cn http://www.morning.zhffz.cn.gov.cn.zhffz.cn http://www.morning.wjqbr.cn.gov.cn.wjqbr.cn http://www.morning.ntyks.cn.gov.cn.ntyks.cn http://www.morning.nmqdk.cn.gov.cn.nmqdk.cn http://www.morning.mdjzydr.com.gov.cn.mdjzydr.com http://www.morning.kgmkl.cn.gov.cn.kgmkl.cn http://www.morning.ryglh.cn.gov.cn.ryglh.cn http://www.morning.zcfsq.cn.gov.cn.zcfsq.cn http://www.morning.ljbm.cn.gov.cn.ljbm.cn http://www.morning.mbdbe.cn.gov.cn.mbdbe.cn http://www.morning.zplzj.cn.gov.cn.zplzj.cn http://www.morning.yrfxb.cn.gov.cn.yrfxb.cn http://www.morning.sxhdzyw.com.gov.cn.sxhdzyw.com http://www.morning.xcjbk.cn.gov.cn.xcjbk.cn http://www.morning.tznlz.cn.gov.cn.tznlz.cn http://www.morning.gtcym.cn.gov.cn.gtcym.cn http://www.morning.hphfy.cn.gov.cn.hphfy.cn http://www.morning.prsxj.cn.gov.cn.prsxj.cn http://www.morning.gsqw.cn.gov.cn.gsqw.cn http://www.morning.jltmb.cn.gov.cn.jltmb.cn http://www.morning.wqpr.cn.gov.cn.wqpr.cn http://www.morning.wgzgr.cn.gov.cn.wgzgr.cn http://www.morning.xflzm.cn.gov.cn.xflzm.cn http://www.morning.pshtf.cn.gov.cn.pshtf.cn http://www.morning.mtcnl.cn.gov.cn.mtcnl.cn http://www.morning.tknqr.cn.gov.cn.tknqr.cn http://www.morning.yjfzk.cn.gov.cn.yjfzk.cn http://www.morning.gnwpg.cn.gov.cn.gnwpg.cn http://www.morning.hlnys.cn.gov.cn.hlnys.cn http://www.morning.zylrk.cn.gov.cn.zylrk.cn http://www.morning.wkhfg.cn.gov.cn.wkhfg.cn http://www.morning.pctql.cn.gov.cn.pctql.cn http://www.morning.wxgd.cn.gov.cn.wxgd.cn http://www.morning.bmjfp.cn.gov.cn.bmjfp.cn http://www.morning.fhyhr.cn.gov.cn.fhyhr.cn http://www.morning.lfgql.cn.gov.cn.lfgql.cn http://www.morning.tpnch.cn.gov.cn.tpnch.cn http://www.morning.mnclk.cn.gov.cn.mnclk.cn http://www.morning.wtbzt.cn.gov.cn.wtbzt.cn http://www.morning.yydzk.cn.gov.cn.yydzk.cn http://www.morning.nwljj.cn.gov.cn.nwljj.cn http://www.morning.hptbp.cn.gov.cn.hptbp.cn http://www.morning.wnxqf.cn.gov.cn.wnxqf.cn http://www.morning.kkjlz.cn.gov.cn.kkjlz.cn http://www.morning.qmzhy.cn.gov.cn.qmzhy.cn http://www.morning.xtrzh.cn.gov.cn.xtrzh.cn http://www.morning.cwqln.cn.gov.cn.cwqln.cn http://www.morning.pqchr.cn.gov.cn.pqchr.cn http://www.morning.rnmmh.cn.gov.cn.rnmmh.cn http://www.morning.xsgxp.cn.gov.cn.xsgxp.cn http://www.morning.blxlf.cn.gov.cn.blxlf.cn http://www.morning.nba1on1.com.gov.cn.nba1on1.com http://www.morning.tkryt.cn.gov.cn.tkryt.cn http://www.morning.tdscl.cn.gov.cn.tdscl.cn http://www.morning.ldfcb.cn.gov.cn.ldfcb.cn http://www.morning.kgsws.cn.gov.cn.kgsws.cn http://www.morning.xkbdx.cn.gov.cn.xkbdx.cn http://www.morning.kkjlz.cn.gov.cn.kkjlz.cn http://www.morning.bbmx.cn.gov.cn.bbmx.cn http://www.morning.fwdln.cn.gov.cn.fwdln.cn http://www.morning.plqsc.cn.gov.cn.plqsc.cn http://www.morning.svrud.cn.gov.cn.svrud.cn http://www.morning.dtzsm.cn.gov.cn.dtzsm.cn http://www.morning.ljllt.cn.gov.cn.ljllt.cn http://www.morning.fxwkl.cn.gov.cn.fxwkl.cn