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

外贸网站开发哪家好网络广告的发布方式包括

外贸网站开发哪家好,网络广告的发布方式包括,有哪些可以免费推广的平台,企业品牌策划书目录 1 Avro与Schema Registry2 搭建Schema Registry2.1 下载Confluent并解压2.2 设置环境变量2.3 修改配置2.4 启动服务 3 API列表 1 Avro与Schema Registry Apache Avro 是一种高效的数据序列化系统,用于在不同的应用程序和平台之间传输和存储数据。它提供了一种…

目录

  • 1 Avro与Schema Registry
  • 2 搭建Schema Registry
    • 2.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/bin

2.2 设置环境变量

vim ~/.bashrc

添加:

export SCHEMA_REG_HOME=/usr/local/bin/confluent-7.4.3
export PAHT=$PAHT:${SCHEMA_REG_HOME}/bin

source ~/.bashrc

2.3 修改配置

获取本机IP

ip addr

修改配置文件:

vim /usr/local/bin/confluent-7.4.3/etc/schema-registry/schema-registry.properties

listeners=http://172.26.143.96:8081
kafkastore.bootstrap.servers=PLAINTEXT://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/3

3 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.v1+json" \--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.v1+json" \--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.v1+json" \--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.v1+json" \--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.v1+json" \--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.v1+json" \--data '{"compatibility": "BACKWARD"}' \http://localhost:8081/config/Kafka-value{"compatibility":"BACKWARD"}
http://www.ds6.com.cn/news/73173.html

相关文章:

  • 建站宝盒哪个牌子好网络品牌营销
  • 英文企业网站开发赚钱软件
  • 做文件的wordpress阿里巴巴seo排名优化
  • wamp做的网站外网怎么访问不了关键字搜索引擎
  • 百度云 wordpress 教程百度sem优化师
  • 网站建设便捷手机优化大师下载2022
  • 像优酷这样的网站需要怎么做武汉seo优化服务
  • 1688批发网app下载安装专业的网站优化公司排名
  • 诸暨城乡与建设局网站百度指数怎么看排名
  • 大庆市网站建设公司简述获得友情链接的途径
  • 怎么搞自己的网站如何推广网店
  • H5网站整站谷歌seo排名优化
  • 深圳网站建设app开发榜单优化
  • 电子商务网站经营性icp网络营销常用的工具有哪些
  • 做网站开发app培训网登录入口
  • 关于网站建设的职位百度链接提交
  • 怎么做网站的页眉营销活动推广方案
  • 深圳集团网站建设报价网站运营seo实训总结
  • wordpress怎么写网站关键词和描述发布外链
  • 乐成高端网站建设seo计费系统开发
  • 赛门仕博做网站怎么样app推广赚钱平台
  • 微网站运营长春网站制作设计
  • 做视频链接的网站谷歌seo是什么意思
  • 电子商务网站功能特点百度网盘下载
  • 做羊水亲子鉴定网站手机百度正式版
  • 如何提高网站访问速度唐山seo排名
  • 黑龙江最新疫情数据win10系统优化软件哪个好
  • iis建设网站网络服务器图片
  • wordpress还可以打通小程序博客seo怎么做
  • 自己的网站做飘窗中国最大的企业培训公司