77.Oozie的HA启用

77.Oozie的HA启用_第1张图片

77.1 演示环境介绍

  • RedHat版本:7.3
  • CM和CDH版本:5.13.1
  • 已启用Kerberos

77.2 操作演示

  • 在集群中选择一台服务器作为OozieServer高可用节点
    • 安装Mysql驱动
[root@ip-186-31-30-69 ~]# mkdir /usr/share/java
[root@ip-186-31-30-69 ~]# scp mysql-connector-java-5.1.34.jar /usr/share/java
  • 创建MySQL驱动的软链
[root@ip-186-31-30-69 ~]# cd /usr/share/java/
[root@ip-186-31-30-69 java]# ln -s mysql-connector-java-5.1.34.jar mysql-connector-java.jar

安装Haproxy并配置oozie server:

#---------------------------------------------------------------------
# Example configuration for a possible web application.  See the
# full configuration options online.
#
#   http://haproxy.1wt.eu/download/1.4/doc/configuration.txt
#
#---------------------------------------------------------------------
#---------------------------------------------------------------------
# Global settings
#---------------------------------------------------------------------
global
    log         127.0.0.1 local2
    chroot      /var/lib/haproxy
    pidfile     /var/run/haproxy.pid
    maxconn     4000
    user        haproxy
    group       haproxy
    daemon
    # turn on stats unix socket
    stats socket /var/lib/haproxy/stats
#---------------------------------------------------------------------
# common defaults that all the 'listen' and 'backend' sections will
# use if not designated in their block
#---------------------------------------------------------------------
defaults
    mode                    http
    log                     global
    option                  httplog
    option                  dontlognull
    #option http-server-close
    #option forwardfor       except 127.0.0.0/8
    option                  redispatch
    retries                 3
    timeout http-request    10s
    timeout queue           1m
    timeout connect         10s
    timeout client          1m
    timeout server          1m
    timeout http-keep-alive 10s
    timeout check           10s
    maxconn                 3000
listen stats
    bind 0.0.0.0:1080
    mode http
    option httplog
    maxconn 5000
    stats refresh 30s
    stats  uri /stats 
listen ooziebalancer
    bind 0.0.0.0:11001
    mode tcp
    option tcplog
    balance leastconn
    server ip-186-31-30-69.ap-southeast-1.compute.internal ip-186-31-30-69.ap-southeast-1.compute.internal:11000 check
    server ip-186-31-16-68.ap-southeast-1.compute.internal ip-186-31-16-68.ap-southeast-1.compute.internal:11000 check
  • 启用Oozie服务HA
    • 管理员登录CM界面,进入oozie服务
    • 启用High Availability
    • 选择已安装MySQL驱动的节点作为Oozie Server
    • 填写Oozie HA时使用的Load Balancer地址(这里就是Haproxy服务所在地址)
      • ip-186-31-16-68.ap-southeast-1.compute.internal:11002
    • 启用Oozie的High Availability

总结

  • 集群的元数据存在在外部数据库MySQL中,在部署Oozie服务的节点需要安装MySQL的JDBC驱动
  • Oozie启用高可用时需要使用Haproxy或Keepalived等方式实现Oozie服务的高可用,这里使用Haproxy方式实现
  • Load Balancer配置为Haproxy服务所在host及监听的11002端口

大数据视频推荐:
CSDN
大数据语音推荐:
企业级大数据技术应用
大数据机器学习案例之推荐系统
自然语言处理
大数据基础
人工智能:深度学习入门到精通

你可能感兴趣的:(Hadoop,java,服务器,hadoop)