9. 该参数表示启用hms 滚动事件功能并以秒为单位设置轮询频率,建议该值小于5秒,参数默认值为0 ,表示不启用。配置该参数前需要确认hive-site.xml 的 Hive Metastore Server 高级配置代码段(安全阀)的配置已经生效,否则重启impala 时,Catalog Server 将无法正常启动。
10. 验证配置是否生效可以在Catalog Server WebUI 界面中 /varz 下查看
功能验证
11. 使用beeline 进入hive 中创建一个库,并查看
[root@sztcyl-inte-hadoop-node02 ~]# beeline
beeline> !connect jdbc:hive2://sztcyl-inte-hadoop-node04:10000/default
Connecting to jdbc:hive2://sztcyl-inte-hadoop-node04:10000/default
Enter username for jdbc:hive2://sztcyl-inte-hadoop-node04:10000/default: hive
Enter password for jdbc:hive2://sztcyl-inte-hadoop-node04:10000/default: ****
Connected to: Apache Hive (version 2.1.1-cdh6.3.2)
Driver: Hive JDBC (version 2.1.1-cdh6.3.2)
Transaction isolation: TRANSACTION_REPEATABLE_READ
0: jdbc:hive2://sztcyl-inte-hadoop-node04:100>
0: jdbc:hive2://sztcyl-inte-hadoop-node04:100/> show databases;
0: jdbc:hive2://sztcyl-inte-hadoop-node04:100/> create database ods_test;
0: jdbc:hive2://sztcyl-inte-hadoop-node04:100/> show databases;
12. 在Impala 中查看,显示已及时更新
[root@sztcyl-inte-hadoop-node02 ~]# impala-shell -i sztcyl-inte-hadoop-node04 -l -u hive --auth_creds_ok_in_clear
Starting Impala Shell using LDAP-based authentication
LDAP password for hive:
Opened TCP connection to sztcyl-inte-hadoop-node04:21000
Connected to sztcyl-inte-hadoop-node04:21000
Server version: impalad version 3.4.1-RELEASE RELEASE (build eb1ed66fa435a722fa8c6a7c58ff53edc10c572e)
***********************************************************************************
Welcome to the Impala shell.
(Impala Shell v3.1.0-cdh6.1.1 (97215ce) built on Thu Feb 7 23:24:56 PST 2019)
To see live updates on a query's progress, run 'set LIVE_SUMMARY=1;'.
***********************************************************************************
LDAP authentication is enabled, but the connection to Impala is not secured by TLS.
ALL PASSWORDS WILL BE SENT IN THE CLEAR TO IMPALA.
[sztcyl-inte-hadoop-node04:21000] default>
[sztcyl-inte-hadoop-node04:21000] default>
[sztcyl-inte-hadoop-node04:21000] default> show databases;
Query: show databases
+------------------+----------------------------------------------+
| name | comment |
+------------------+----------------------------------------------+
| _impala_builtins | System database for Impala builtin functions |
| db_ods | |
| db_ods_test | |
| db_test | |
| dc_dev | |
| default | Default Hive database |
| hive_test | |
| ods_test | |
| steven | |
| test | |
+------------------+----------------------------------------------+
Fetched 10 row(s) in 0.04s
[sztcyl-inte-hadoop-node04:21000] default>
13. create table测试
0: jdbc:hive2://sztcyl-inte-hadoop-node04:100/> use ods_test;
0: jdbc:hive2://sztcyl-inte-hadoop-node04:100/> create table test1(a string);
0: jdbc:hive2://sztcyl-inte-hadoop-node04:100/> create table test1(a string);
0: jdbc:hive2://sztcyl-inte-hadoop-node04:100/> show tables;
14. 在impala 中查看
15. hive中drop表测试
0: jdbc:hive2://sztcyl-inte-hadoop-node04:100/> drop table test1;
0: jdbc:hive2://sztcyl-inte-hadoop-node04:100/> show tables;
16. 在impala 中查看
[sztcyl-inte-hadoop-node04:21000] ods_test> show tables;
Query: show tables
+-------+
| name |
+-------+
| test2 |
+-------+
Fetched 1 row(s) in 0.01s