当前位置:网站首页>数仓4.0笔记——用户行为数据采集二
数仓4.0笔记——用户行为数据采集二
2022-07-23 05:41:00 【丝丝呀】
1 Zookeeper安装
[[email protected] software]$ tar -zxvf apache-zookeeper-3.5.7-bin.tar.gz -C /opt/module/


修改名字,只留下对应版本号
[[email protected] module]$ cd zookeeper-3.5.7/
[[email protected] zookeeper-3.5.7]$ mkdir zkData
[[email protected] zookeeper-3.5.7]$ cd zkData/
[[email protected] zkData]$ vim myid


分发
[[email protected] zkData]$ xsync myid
并分别在hadoop103、hadoop104上修改myid文件中内容为3、4


配置zoo.cfg文件
[[email protected] conf]$ mv zoo_sample.cfg zoo.cfg

原本的样子
修改数据存储路径配置
dataDir=/opt/module/zookeeper-3.5.7/zkData
增加如下配置
#######################cluster##########################
server.2=hadoop102:2888:3888
server.3=hadoop103:2888:3888
server.4=hadoop104:2888:3888


在103上检查一下
配置好了,启动一下
[[email protected] zookeeper-3.5.7]$ bin/zkServer.sh start
[[email protected] zookeeper-3.5.7]$ bin/zkServer.sh start
[[email protected] zookeeper-3.5.7]$ bin/zkServer.sh start
查看总体进程
查看状态
[[email protected] zookeeper-3.5.7]$ bin/zkServer.sh status



2 ZK集群启动停止脚本
在hadoop102的/home/atguigu/bin目录下创建脚本

[[email protected] bin]$ vim zk.sh
在脚本中编写如下内容
#!/bin/bash
case $1 in
"start"){
for i in hadoop102 hadoop103 hadoop104
do
echo ---------- zookeeper $i 启动 ------------
ssh $i "/opt/module/zookeeper-3.5.7/bin/zkServer.sh start"
done
};;
"stop"){
for i in hadoop102 hadoop103 hadoop104
do
echo ---------- zookeeper $i 停止 ------------
ssh $i "/opt/module/zookeeper-3.5.7/bin/zkServer.sh stop"
done
};;
"status"){
for i in hadoop102 hadoop103 hadoop104
do
echo ---------- zookeeper $i 状态 ------------
ssh $i "/opt/module/zookeeper-3.5.7/bin/zkServer.sh status"
done
};;
esac

查看状态


边栏推荐
猜你喜欢

数仓4.0笔记——数仓环境搭建—— Yarn配置

Dynamically set the theme color of the card

NepCTF 2022 MISC <签到题>(极限套娃)

Genesis曾向三箭资本提供23.6亿美元的贷款

XML modeling

NepCTF2022 Writeup

DVWA learning notes
![[uiautomation] key instructions (and three call methods) + common mouse actions +sendkeys+inspect learning](/img/9c/84c92c894b19820560e14502472c8b.png)
[uiautomation] key instructions (and three call methods) + common mouse actions +sendkeys+inspect learning

NFT trading platform digital collection system | development and customization

NFT digital collection system development: the combination of music and NFT
随机推荐
自定义MVC(上)
中间人攻击arp欺骗及与beef-xss联动
Custom MVC (Part 1)
NFT digital collection platform development and construction, source code development digital collection
NFT trading platform digital collection system | development and customization
MySQL之函数&视图&导入导出
NFT数字藏品系统开发,数字藏品的发展趋势
数字藏品开发/元宇宙数字藏品开发
Compilation principle - detailed explanation of syntax analysis
Sqli lab 1-16 notes with customs clearance
利用动态规划解决最长增长子序列问题
mysql树形结构递归查询
Unable to negotiate with port 51732: no matching host key type found. Their offer:
Command Execution Vulnerability and defense
Precautions for realizing "real-time data response" on the page
Sqli lab pass 17-22 notes
Resizeobserver ignoring buried point records - loop limit exceeded
数字藏品开发/数字藏品系统开发解决方案
How to customize JSP Tags
PHP文件上传中fileinfo出现的安全问题