- 登录Cloudera Manager界面进入Impala服务,点击“配置”
- 进入角色组界面,新建Coordinator角色组,将一部分Impala Daemon节点划分为Coordinator Group角色组
4.进入Impala的配置页面,为我们划分的两个组配置高级参数
在Impala配置中搜索“Impala Daemon 命令行参数高级配置代码段(安全阀)”,为Default Group组配置-is_coordinator = false,为Coordinator Group配置-is_executor = true,如下截图所示:
cat /etc/haproxy/haproxy.cfg
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
maxconn 3000
timeout connect 5000
timeout client 1m
timeout server 1m
timeout http-keep-alive 10s
timeout check 10s
maxconn 3000
listen stats :1080#定义管理界面
#bind 10.1.56.21:1080
balance
mode http #管理界面所使用的协议
stats enable
stats uri /stats
stats refresh 30s
stats auth test:test
listen jdbchive :25005
#bind 0.0.0.0:25005#ha作为proxy所绑定的IP和端口
mode tcp#以4层方式代理,重要
option tcplog
balance source#调度算法 'leastconn' 最少连接数分配,或者 'roundrobin',轮询分
server hiveServer1 namenode:10000 check
server hiveServer2 datanode:10000 check
listen impalashell :25003
#bind 0.0.0.0:25003#ha作为proxy所绑定的IP和端口
mode tcp#以4层方式代理,重要
option tcplog
balance roundrobin#调度算法 'leastconn' 最少连接数分配,或者 'roundrobin',轮询分
server impalashell_dn1 namenode:21000 check
server impalashell_dn2 datanode:21000 check
listen impalajdbc :25004
#bind 0.0.0.0:25004#ha作为proxy所绑定的IP和端口
mode tcp#以4层方式代理,重要
option tcplog
balance source#调度算法 'leastconn' 最少连接数分配,或者 'roundrobin',轮询分
server impalajdbc_dn1 namenode:21050 check
server impalajdbc_dn2 datanode:21050 check
重启haproxy
测试
[email protected]:~$ impala-shell -i 10.1.56.21:25003
[10.1.56.21:25003] > use product;
Query: use product
[10.1.56.21:25003] > select * from fact_halog_from_benmu limit 10;
Query: select * from fact_halog_from_benmu limit 10
Query submitted at: 2019-01-17 11:13:00 (Coordinator: http://datanode:25000)
Query progress can be monitored at: http://datanode:25000/query_plan?query_id=7743d4c3bf721c26:6c4f2b5700000000
Fetched 0 row(s) in 5.97s