一起养成写作习惯!这是我参与「掘金日新计划 · 4 月更文挑战」的第4天,点击查看活动详情。
20 配置浮动ip
005 006的浮动ip 采用pacemaker 配置 这个在下个文章介绍 安装相应的包
yum -y install pcs pacemaker corosync fence-agents-all
卸载的命令为 yum -y remove pcs pacemaker corosync fence-agents-all
启动pcs服务并设置开机自启
systemctl start pcsd.service
systemctl enable pcsd.service
第三步 设置密码 安装组件生成的 hacluster用户 ,用来本地启动pcs进程,需要设一个密码,每个节点密码相同 newpasswd
passwd hacluster
验证集群节点
pcs cluster auth hadoopHD005 hadoopHD006
Username: hacluster # 输入用户名 hacluster
Password: # 输入密码
启动集群pcs组
pcs cluster start --all
pcs cluster enable --name hadoophd # 设置开机启动
pcs property set stonith-enabled=false #两台集群需要关闭这个选项 pcs resource defaults resource-stickiness=100 添加浮动ip
pcs resource create VirtualIP ocf:heartbeat:IPaddr2 ip=10.10.10.1 cidr_netmask=24 nic=bond0 op monitor interval=15s --group hadoophd
切 vip
pcs resource enable VirtualIP
pcs status
ip addr
查看Hive 在查询的sql
yarn application -list
更新namenode相关属性:bin/hadoop dfsadmin –refreshServiceAcl
更新jobtracker相关属性:bin/hadoopmradmin –refreshServiceAcl
详细输出hive执行过程debug版 hive --hiveconf hive.root.logger=DEBUG,console -e "select count(1) from db9.sys_log_dnload_files_lte where bill_month = '20211101'"