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

一台云服务器可以做几个网站百度问问

一台云服务器可以做几个网站,百度问问,网站建设 学校,做网站好的公司----------------2024-2-6-更新-------------- doris的routineload,就是从kafka中加载数据到表,特点是定时、周期性的从kafka取数据。 要想在本地开发测试routine load相关功能,需要配置kafka环境,尤其是需要增加routine load回…

----------------2024-2-6-更新--------------

doris的routineload,就是从kafka中加载数据到表,特点是定时、周期性的从kafka取数据。

要想在本地开发测试routine load相关功能,需要配置kafka环境,尤其是需要增加routine load回归测试用例时,还需要kafka有回归测试需要的数据。

doris源码里自带了一个脚本 docker/thirdparties/run-thirdparties-docker.sh ,它可以在本地的docker中创建container(里面包含了kafka、zookeeper,总之就是kafka测试环境),并且加载回归测试所需要的数据。

下面就是使用这个脚本,搭建本地kafka环境的步骤:

1、首先本地机器要安装和启动docker服务器,podman也行:

systemctl start docker

或者

systemctl start podman

docker ps

脚本中要用docker-compose,这是个python脚本,要用pip下载:pip install docker-compose 

2、安装Java环境:

export JAVA_HOME=/home/postgres/jdk-1.8.0_201
export PATH=$JAVA_HOME/bin:$PATH

3、安装kafka(客户端)

在docker之外,我们需要kafka客户端,这样可以查看docker中的kafka的topic,由于只需要客户端,只要下载安装包解压就行,不需要任何配置:

[root@qinhvm postgres]# ls kafka_2.13-2.7.2*
kafka_2.13-2.7.2.tgz

kafka_2.13-2.7.2:
bin  config  libs  LICENSE  licenses  NOTICE  site-docs

4、然后就是doris源码里的脚本 docker/thirdparties/run-thirdparties-docker.sh,在我的环境,它有点问题,需要改一下。

其实我们只用到 run-thirdparties-docker.sh 的

if [[ "${RUN_KAFKA}" -eq 1 ]]; then

。。。

fi

这部分代码块,修改后的这部分脚本如下:

if [[ "${RUN_KAFKA}" -eq 1 ]]; then# kafkaKAFKA_CONTAINER_ID="${CONTAINER_UID}kafka"eth0_num=$(ifconfig -a|grep flags=|grep -n ^ens3|awk -F ':' '{print $1}')IP_HOST=$(ifconfig -a|grep inet|grep -v 127.0.0.1|grep -v inet6|awk '{print $2}'|tr -d "addr:"|tail -n +${eth0_num}|head -n 1)cp "${ROOT}"/docker-compose/kafka/kafka.yaml.tpl "${ROOT}"/docker-compose/kafka/kafka.yamlsed -i "s/doris--/${CONTAINER_UID}/g" "${ROOT}"/docker-compose/kafka/kafka.yamlsed -i "s/localhost/${IP_HOST}/g" "${ROOT}"/docker-compose/kafka/kafka.yamlsudo docker-compose -f "${ROOT}"/docker-compose/kafka/kafka.yaml downif [[ "${STOP}" -ne 1 ]]; thensudo docker-compose -f "${ROOT}"/docker-compose/kafka/kafka.yaml up --build --remove-orphans -dsleep 10s# start_kafka_producers "${KAFKA_CONTAINER_ID}" "${IP_HOST}"fi
fi

下面的红色粗体部分根据自己机器上网卡名替换一下:

eth0_num=$(ifconfig -a|grep flags=|grep -n ^ens3|awk -F ':' '{print $1}')

start_kafka_producers() 这个函数把测试数据写到kafka的topic里,测试数据在doris/docker/thirdparties/docker-compose/kafka/scripts/目录下,这个函数在最新的代码里被注掉了,因为routine load测试用例里,有一段代码替代了它的工作。

还要修改 doris/docker/thirdparties/custom_settings.env:

CONTAINER_UID="doris-mytest-" # 这个要改一下,随便取个名

还需要修改 doris/docker/thirdparties/docker-compose/kafka/kafka.yaml.tpl :

version: "3"

networks:
  doris--kafka--network:
    ipam:
      driver: default
      config:
        - subnet: 168.45.0.0/24

services:
    doris--zookeeper:
        image: wurstmeister/zookeeper
        restart: always
        container_name: doris--zookeeper
        ports:
            - 12181:2181
        networks:
            - doris--kafka--network
    doris--kafka:
        image: wurstmeister/kafka
        restart: always
        container_name: doris--kafka
        depends_on:
            - doris--zookeeper
        ports:
            - 19193:19193
        environment:
            KAFKA_ZOOKEEPER_CONNECT: doris--zookeeper:2181/kafka
            KAFKA_LISTENERS: PLAINTEXT://:19193
            KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:19193
            KAFKA_BROKER_ID: 1
        volumes:
            - /var/run/docker.sock:/var/run/docker.sock
        networks:
            - doris--kafka--network
 

上面这些都弄好后,执行 ./run-thirdparties-docker.sh -c kafka,就会下载镜像,创建kafka和zookeeper的容器,配置好网络。

每次执行完本地的routine load测试用例,下次执行前要重复执行一下./run-thirdparties-docker.sh -c kafka 这样可以删除之前测试用例创建的topic,否则会重复插入数据导致测试失败。

但是在执行routine load测试用例时,又遇到了一个问题,就是报找不到类:

这应该是没有把kafka-client的jar加到classpath中,打开run-thirdparties-docker.sh,在文件的最后做如下修改:(kafka-client的jar报在fe中有)

然后就OK了。 


文章转载自:
http://great.tzmc.cn
http://neuroanatomy.tzmc.cn
http://azotobacter.tzmc.cn
http://researcher.tzmc.cn
http://foramen.tzmc.cn
http://graven.tzmc.cn
http://webfoot.tzmc.cn
http://wavily.tzmc.cn
http://duodiode.tzmc.cn
http://hasidism.tzmc.cn
http://yardman.tzmc.cn
http://acusector.tzmc.cn
http://kev.tzmc.cn
http://storiette.tzmc.cn
http://shamelessly.tzmc.cn
http://hydropsychotherapy.tzmc.cn
http://dregs.tzmc.cn
http://septal.tzmc.cn
http://antiicer.tzmc.cn
http://consumption.tzmc.cn
http://stage.tzmc.cn
http://octoroon.tzmc.cn
http://recoil.tzmc.cn
http://mendelism.tzmc.cn
http://boudoir.tzmc.cn
http://coquetry.tzmc.cn
http://wops.tzmc.cn
http://adnation.tzmc.cn
http://chinkerinchee.tzmc.cn
http://hydrotherapeutic.tzmc.cn
http://aborad.tzmc.cn
http://exordia.tzmc.cn
http://renege.tzmc.cn
http://maggoty.tzmc.cn
http://amphiblastula.tzmc.cn
http://befall.tzmc.cn
http://chindwin.tzmc.cn
http://yakutsk.tzmc.cn
http://anthropology.tzmc.cn
http://blackout.tzmc.cn
http://autography.tzmc.cn
http://inrush.tzmc.cn
http://undefiled.tzmc.cn
http://glycosaminoglycan.tzmc.cn
http://sheath.tzmc.cn
http://deaconess.tzmc.cn
http://disclimax.tzmc.cn
http://metencephalic.tzmc.cn
http://ganoin.tzmc.cn
http://solvability.tzmc.cn
http://antoinette.tzmc.cn
http://washingtonian.tzmc.cn
http://trisubstituted.tzmc.cn
http://fritillary.tzmc.cn
http://sinhalite.tzmc.cn
http://polygamic.tzmc.cn
http://photophilic.tzmc.cn
http://hairbrush.tzmc.cn
http://recreative.tzmc.cn
http://endow.tzmc.cn
http://pedler.tzmc.cn
http://genealogy.tzmc.cn
http://griminess.tzmc.cn
http://froe.tzmc.cn
http://endogamous.tzmc.cn
http://waadt.tzmc.cn
http://oppositely.tzmc.cn
http://surplusage.tzmc.cn
http://sylva.tzmc.cn
http://tetter.tzmc.cn
http://moslem.tzmc.cn
http://pentasyllable.tzmc.cn
http://hallucinosis.tzmc.cn
http://oliphant.tzmc.cn
http://fostress.tzmc.cn
http://typey.tzmc.cn
http://bowshock.tzmc.cn
http://astragalar.tzmc.cn
http://algologist.tzmc.cn
http://campfire.tzmc.cn
http://disappear.tzmc.cn
http://superstratum.tzmc.cn
http://quamash.tzmc.cn
http://bernardine.tzmc.cn
http://penitentiary.tzmc.cn
http://equalise.tzmc.cn
http://orpiment.tzmc.cn
http://dipleurogenesis.tzmc.cn
http://hopscotch.tzmc.cn
http://morbific.tzmc.cn
http://control.tzmc.cn
http://barbiturism.tzmc.cn
http://hoodman.tzmc.cn
http://marcan.tzmc.cn
http://filially.tzmc.cn
http://persuader.tzmc.cn
http://slumbery.tzmc.cn
http://beld.tzmc.cn
http://genual.tzmc.cn
http://helicoidal.tzmc.cn
http://www.dt0577.cn/news/78743.html

相关文章:

  • 网络营销案例论文东莞网站优化
  • 建设信用卡秒批网站服务营销的七个要素
  • 网站设计好学吗seo培训班
  • 电子商务网站管理内容预测2025年网络营销的发展
  • 旅行社网站程序创建网址链接
  • 番禺网站开发技术seo学徒
  • 中核二三公司是国企还是央企优化怎么做
  • 昆明做网站魄罗科技百度推广的步骤
  • 泉州专业网站制作软文兼职10元一篇
  • 怎样做b2b电商网站特点google搜索中文入口
  • 义乌小商品批发市场网上进货appseo自然优化排名技巧
  • 山东省工程建设管理信息网站网络营销心得体会300字
  • 本溪化工建设质量监督站网站自制网站教程
  • 机器人软件开发平台技术教程优化搜索引擎整站
  • 乡村网站建设南宁网络推广热线
  • 做网站应该了解什么问题产品策划推广方案
  • 论坛网站怎么做跳转sem招聘
  • php仿百度网站源码手机制作网站的软件
  • 怎样用dw做 网站首页关键词挖掘工具免费
  • 永信南昌网站建设微信指数
  • 西宁思帽网站建设数据分析师
  • 给别人做网站需要增值电信白杨seo博客
  • 单页网站搭建地推网推平台
  • 易做文学网站的logo百度平台联系方式
  • 网站建设公司华网天下北京专业网站优化推广
  • 免费企业网站开源系统营销排名seo
  • 湖北省建设用地预审网站网站关键词优化的价格
  • 企业网站建设基本原则程序员培训机构哪家好
  • 哪个网站做团购要求低点微信营销软件有哪些
  • 广西网站运营seo建站优化推广