NVIDIA 初创加速计划,免费加速您的创业启动 了解详情
写点什么

快速部署 DBus 体验实时数据流计算(中)

  • 2020-02-09
  • 本文字数:6523 字

    阅读完需:约 21 分钟

快速部署DBus体验实时数据流计算(中)

##接上文

三、安装 Dbus-allinone 包

3.1 下载

在百度网盘提供 dbus-allinone.tar.gz 包,访问 release 页面下载最新包:https://github.com/BriData/DBus/releases

3.2 安装

将下载的 dbus-allinone 包上传到服务器 /app 目录下,且必须在此目录下



\# 如果没有app目录,要先创建app目录 mkdir /app cd /app tar -zxvf dbus-allinone.tar.gz
复制代码

3.3 初始化数据库

以 root 身份登录 mysql 客户端,执行以下命令进行数据库初始化,会创建 dbmgr 库以及用户、canal 用户、dbus 库以及用户、testschema 库以及用户:



source /app/dbus-allinone/sql/init.sql
复制代码

3.4 启动

执行 start.sh 一键启动 dbus 所有服务,启动项比较多。



cd /app/dbus-allinone ./start.sh
复制代码


请耐心等待(大概需要 5 分钟左右时间),正确的启动日志如下:

<br >
Start grafana…<br >
Grafana started. pid: 23760</br ></br >

Start zookeeper…zookeeper pid 23818Zookeeper started.

Start kafka…No kafka server to stopkafka pid 24055kafka started.

Start Canal …canal started.

Start logstash…No logstash to stopnohup: appending output to `nohup.out’logstash pid 24151logstash started.

Start storm nimbus…No storm nimbus to stopStorm nimbus pid 24215Storm nimbus started.

Start storm supervisor…No storm supervisor to stopStorm supervisor pid 24674Storm supervisor started.

Start storm ui…No storm ui to stopStorm ui pid 24939Storm ui started. ui port: 6672

Stop storm topology.Storm topology stoped.

Start storm topology…Storm topology started.

Start Dbus Heartbeat…No Dbus Heartbeat to stopDbus Heartbeat pid 26854Dbus Heartbeat started.

Start Dbus keeper…=========================stop===========================keeper-proxy process not existgateway process not existkeeper-mgr process not existkeeper-service process not existregister-server process not exist

=========================start===========================register-server started. pid: 27077keeper-proxy  started. pid: 27172gateway started. pid: 27267keeper-mgr started. pid: 27504keeper-service started. pid: 27645Dbus keeper prot: 6090Dbus keeper started.

3.5 生成检查报告看是否启动正常

进入目录/app/dbus-allinone/allinone-auto-check-0.5.0,执行自动检测脚本 auto-check.sh,稍等待一会儿



cd /app/dbus-allinone/allinone-auto-check-0.5.0 ./auto-check.sh
复制代码


会在目录/app/dbus-allinone/allinone-auto-check-0.5.0/reports 下生产对应时间的检查报告,如下所示



[app@dbus-n1 reports]$ tree . └── 20180824111905 └── check_report.txt
复制代码


打开 check_report.txt 文件查看相应的检查报告,如下所示


(注意以 #开头为解释说明信息,报告中不会生成 )

<br >
# 出现以下信息说明dbusmgr库正常<br >
check db&user dbusmgr start:</br ></br >

table t_avro_schema data count: 0table t_data_schema data count: 4table t_data_tables data count: 4table t_dbus_datasource data count: 2table t_ddl_event data count: 0table t_encode_columns data count: 0table t_encode_plugins data count: 1table t_fullpull_history data count: 0table t_meta_version data count: 5table t_plain_log_rule_group data count: 1table t_plain_log_rule_group_version data count: 1table t_plain_log_rule_type data count: 0table t_plain_log_rules data count: 5table t_plain_log_rules_version data count: 5table t_project data count: 1table t_project_encode_hint data count: 1table t_project_resource data count: 1table t_project_sink data count: 1table t_project_topo data count: 1table t_project_topo_table data count: 1table t_project_topo_table_encode_output_columns data count: 1table t_project_topo_table_meta_version data count: 0table t_project_user data count: 1table t_query_rule_group data count: 0table t_sink data count: 1table t_storm_topology data count: 0table t_table_action data count: 0table t_table_meta data count: 7table t_user data count: 2

# 出现以下信息说明 dbus 库正常 check db&user dbus start:

table db_heartbeat_monitor data count: 15table test_table data count: 0table db_full_pull_requests data count: 0

# 出现以下信息说明 canal 用户正常 check db&user canal start:

master status File:mysql-bin.000002, Position:12047338table db_heartbeat_monitor data count: 15table test_table data count: 0table db_full_pull_requests data count: 0

# 出现以下信息说明 testschema 库正常 check db&user testschema start:

table test_table data count: 0

# 出现以下信息说明 zk 启动正常 check base component zookeeper start:

23818 org.apache.zookeeper.server.quorum.QuorumPeerMain

# 出现以下信息说明 kafka 启动正常 check base component kafka start:

24055 kafka.Kafka

# 出现以下信息说明 storm nimbus、supervisor、ui 启动正常 check base component storm start:

26500 org.apache.storm.daemon.worker25929 org.apache.storm.daemon.worker27596 org.apache.storm.LogWriter26258 org.apache.storm.LogWriter24215 org.apache.storm.daemon.nimbus27035 org.apache.storm.LogWriter27611 org.apache.storm.daemon.worker26272 org.apache.storm.daemon.worker24674 org.apache.storm.daemon.supervisor24939 org.apache.storm.ui.core26486 org.apache.storm.LogWriter27064 org.apache.storm.daemon.worker25915 org.apache.storm.LogWriter

# 出现以下信息说明 influxdb 启动正常 check base component influxdb start:

influxdb 10265     1  0 Aug08 ?        02:28:06 /usr/bin/influxd -pidfile /var/run/influxdb/influxd.pid -config /etc/influxdb/influxdb.confapp      28823 28746  0 11:19 pts/3    00:00:00 /bin/sh -c ps -ef | grep influxdbapp      28827 28823  0 11:19 pts/3    00:00:00 grep influxdb

# 出现以下信息说明 grafana 启动正常 check base component grafana start:

app      23760     1  0 11:09 pts/3    00:00:00 ./grafana-serverapp      28828 28746  0 11:19 pts/3    00:00:00 /bin/sh -c ps -ef | grep grafanaapp      28832 28828  0 11:19 pts/3    00:00:00 grep grafana

# 出现以下信息说明心跳 heartbeat 启动正常 check base component heartbeat start:

26854 com.creditease.dbus.heartbeat.start.Start

# 出现以下信息说明 logstash 启动正常 check base component logstash start:

24151 org.jruby.Main

# 出现以下信息说明 canal 启动正常 check canal start:

zk path [/DBus/Canal/otter-testdb] exists.24105 com.alibaba.otter.canal.deployer.CanalLauncher

# 出现以下信息说明 dispatcher-appender、mysql-extractor、splitter-puller、router 启动正常 check topology start:

api: [](http://dbus-n1:6672/api/v1/topology/summary)topology testlog-log-processor status is ACTIVEtopology testdb-mysql-extractor status is ACTIVEtopology testdb-splitter-puller status is ACTIVEtopology testdb-dispatcher-appender status is ACTIVEtopology tr-router status is ACTIVE

# 出现以下信息说明从数据库->extractor-dispatcher->appender 线路正常 check flow line start:

first step insert heart beat success.data arrive at topic: testdbdata arrive at topic: testdb.testschemadata arrive at topic: testdb.testschema.result

四、验证 all in one 包是否安装成功

4.1 登录 grafana 前提

需要在通过浏览器登录 grafana 的机器配置 host 文件,如果已经配置过请跳过此前提


如果验证机器是 windows 系统,修改 C:\Windows\System32\drivers\etc\hosts 文件设置相应的域名信息如下:



\# 192.168.0.1 替换成部署allinone包的服务器ip地址 192.168.0.1 dbus-n1
复制代码


如果验证机器是 linux 系统,修改/etc/hosts 文件设置相应的域名信息如下:



\# 192.168.0.1 替换成部署allinone包的服务器ip地址 192.168.0.1 dbus-n1
复制代码

4.2 登录 grafana

登录 grafana url 地址: http://dbus-n1:3000/login


1563345309714066583.png

4.3 mysql 插入数据验证


\#登录测试用户 mysql -utestschema -p #testschema账户密码:j0<c6cqcqr:testschema \#执行测试脚本 use testschema; INSERT INTO test_table (NAME, BIRTHDAY) VALUES ('testdataname', '2018-08-10 18:00:00'); INSERT INTO test_table (NAME, BIRTHDAY) VALUES ('testdataname', '2018-08-10 18:00:00'); INSERT INTO test_table (NAME, BIRTHDAY) VALUES ('testdataname', '2018-08-10 18:00:00'); INSERT INTO test_table (NAME, BIRTHDAY) VALUES ('testdataname', '2018-08-10 18:00:00'); INSERT INTO test_table (NAME, BIRTHDAY) VALUES ('testdataname', '2018-08-10 18:00:00'); </c6cqcqr:testschema
复制代码


1563345319357002768.png

4.4 查看 DBus 是否实时获取到数据

1563345328297060949.png


1563345334957076894.png


1563345341017091754.png


本文转载自宜信技术学院。


原文链接:http://college.creditease.cn/detail/274


2020-02-09 15:09747

评论

发布
暂无评论
发现更多内容

做了一份前端面试复习计划,保熟~

loveX001

JavaScript

前端面试指南之JS面试题总结

loveX001

JavaScript

CTPN+CRNN算法端到端实现文字识别的实战开发

华为云开发者联盟

人工智能 华为云 文字识别 12 月 PK 榜

损失高达3亿美元|如何保护源代码安全?

SEAL安全

12 月 PK 榜 源代码安全 最小权限管理 零信任模型

掌握 CORS 跨域请求,读这一篇文章就够了

范家鹏

HTTP CORS 跨域 异步请求 跨域资源共享

深入理解JS作用域链与执行上下文

loveX001

JavaScript

KAFKA EAGLE 监控MRS kafka之操作实践

华为云开发者联盟

开发 华为云 12 月 PK 榜

前端工程师leetcode算法面试必备-二分搜索算法(上)

js2030code

JavaScript LeetCode

用javascript分类刷leetcode3.动态规划(图文视频讲解)

js2030code

JavaScript LeetCode

Git实战(四)| Git分支管理实操,搞定在线合并和本地合并

霍格沃兹测试开发学社

软件测试 | 版本控制神器GitHub的基本使用与踩坑

测试人

GitHub 软件测试 自动化测试 测试开发

ZBC登录iZUMi Finance双挖池APY高达189%,极致通缩的典范

西柚子

Git实战(五)| 让工作更高效,搞定Git的分支管理

霍格沃兹测试开发学社

IoT高级设备检索——设备管理运维类

阿里云AIoT

数据库 监控 物联网 传感器 Cloud Native

面试官:MySQL 中 varchar(n) 中 n 最大取值为多少?

架构师之道

MySQL 编程 计算机

2小时开发《点球射门游戏》,动画演示思路(上),代码已开源

非喵鱼

Java 开源 游戏 12 月 PK 榜 世界杯足球游戏

借用FinClip把小程序游戏运行到自有App中

Onegun

小游戏 小游戏开发 微信小游戏

潦草手写体也能轻松识别,快速提取文字不用愁

HMS Core

HMS Core

算法 KECP 被顶会 EMNLP 收录,极少训练数据就能实现机器阅读理解

阿里云大数据AI技术

自然语言处理 机器学习 12 月 PK 榜 机器阅读

前端面试题(附答案)

loveX001

JavaScript

2 小时开发《点球射门游戏》,动画演示思路(下),代码已开源

非喵鱼

Java 开源 游戏 12 月 PK 榜 世界杯足球游戏

IPQ8074 Qualcomm Embedded Board Offers MU-MIMO 802.11ax WiFI 6//industrial wifi6 moudle

wallysSK

IPQ8074 ip8072

基于阿里云IoT平台OTA进行APP确认升级的方案——业务架构类

阿里云AIoT

物联网 UED 数据格式

跨机房ES同步实战

京东科技开发者

迁移 迁移数据 异步多活 Elastic Search 数据库·

区块链“入局”证券市场,未来前景有多大?

旺链科技

区块链 产业区块链 证券行业 12 月 PK 榜

我把Idea给改了,看看有没有你常用的功能,没有,你告诉我,我给你造了

非喵鱼

Java 开源 IDEA springboot 12 月 PK 榜

手把手教你构建数据安全体系,守住安全合规红线

王巍

数据安全

Idea居然还有比Navicat、Datagrid工具还好用、还快的插件,效率又可提升一倍了

非喵鱼

Java MySQL redis IDEA 12 月 PK 榜

前端刷完这12道滑动窗口,就可以出山面试了

js2030code

JavaScript LeetCode

百度 Android 直播秒开体验优化

百度Geek说

android 百度app 12 月 PK 榜 直播优化

MYSQL-INNODB索引构成详解

京东科技开发者

MySQL innodb 索引 B+树 InnoDB存储引擎

快速部署DBus体验实时数据流计算(中)_大数据_DBus_InfoQ精选文章