当前位置: 首页 > 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.dt0577.cn/news/41337.html

相关文章:

  • 英语卷子哪个网站可以做中国腾讯和联通
  • 付费推广渠道有哪些陕西seo顾问服务
  • 深圳低价做网站系统优化大师官方下载
  • 上海 专业网站设计 母婴类客户关系管理
  • 东莞网上商城网站建设十大网站管理系统
  • 网站建设的流程网站查询备案信息
  • 电商网站开发用什么语言表达十大搜索引擎网站
  • 镇江百度代理济南seo公司报价
  • 学而思编程网站网站平台推广
  • 手机最新发布搜索引擎优化课程
  • 建设网站需要什么步骤2024年3月新冠肺炎
  • 麻涌公司网站建设公司搜索排名
  • 学校微网站模板下载地址竞价被恶意点击怎么办
  • 学做ps的软件的网站火星培训机构收费明细
  • 网站推广的目标宁波seo关键词如何优化
  • 北京网站开发网站建设价格百度网登录入口
  • 有名的网站制作公司搜索网页
  • 家居网站建设精英品牌推广是做什么的
  • 南京营销型网站建设外贸网站建设公司
  • 百草路网站建设青岛seo软件
  • 微信网页宣传网站怎么做的关键词排名点击软件
  • 网站制作代无限制访问国外的浏览器
  • 烟台百度网站建设seo官网优化详细方法
  • 网站培训班晋江怎么交换友情链接
  • 视频类html网站模板seo搜索引擎优化5
  • 微网站成功案例百度推广渠道
  • 兰州网站建设哪家专业搜索引擎营销经典案例
  • 河北建设银行招聘网站百度推广怎么找客户
  • 外贸网站运营中国工商业联合会
  • 手机上可以做网站吗甲马营seo网站优化的