trino容器对接hudi(五)
前提:本文是基于已经部署了trino容器的基础上进行的。冒烟测试是在trino对接ldap后并且ranger已经对接了metastore权限后,并且spark组件已经对接hudi,并且成功创建hudi表的基础上进行的。冒烟测试spark建hudi表部分可参考trino组件对接hudi文章。trino容器测试直接对现成的hudi表进行查询,trino不支持hudi表的修改,只能查询。
前提文章见:helm安装部署trino对接hive(一)、trino容器对接ldap(二)、ranger对接metastore(三)
安装部署
1、增加hudi connector
增加connector的配置暴露在values.yaml中,直接在values.yaml中进行设置。
vim values.yaml hudi: |- connector.name=hudi hive.metastore.uri=thrift://hadoop001:9083 hive.config.resources=/opt/apache/trino-hiveconf/hdfs-site.xml,/opt/apache/trino-hiveconf/core-site.xml,/opt/apache/trino-hiveconf/hive-site.xml hive.metastore.thrift.impersonation.enabled=true
2、重启trino容器
helm -n trino-test uninstall trino helm install trino /root/jiuyue/helm/trino/ -n trino-test
冒烟测试
/root/jiuyue/image/trino/trino-cli-416-executable.jar --server https://172.16.121.114:31443 --keystore-path /root/jiuyue/helm/conf/trino/ldap_conf/trino.jks --keystore-password admin@123 --catalog hudi --user test --password --debug Password: #输入test用户的ldap密码 trino> use hudi_hive; USE trino:hudi_hive>show tables; Table ------------------ fare_adjustment host_hudi hudi_table hudi_table2 hudi_table_keyed student tbl_customer (7 rows) trino:hudi_hive> select * from hudi_table2; _hoodie_commit_time | _hoodie_commit_seqno | _hoodie_record_key | _hoodie_partition_path | _hoodie_file_> ---------------------+-----------------------+--------------------------------------+------------------------+-----------------------------------------> 20231123161346626 | 20231123161346626_2_0 | 3eeb61f7-c2b0-4636-99bd-5d7a5a1d2c04 | city=chennai | b0b19f4e-7530-4df6-ab29-638afcea17ef-0_2> 20231123222905887 | 20231123222905887_2_1 | c8abbe79-8d89-47ea-b4ce-4d224bae5bfa | city=chennai | b0b19f4e-7530-4df6-ab29-638afcea17ef-0_2> 20231123161346626 | 20231123161346626_1_0 | e3cf430c-889d-4015-bc98-59bdce1e530c | city=sao_paulo | 5d42cc1a-c3cb-499b-a203-98b4372c30b6-0_1> 20231123161346626 | 20231123161346626_0_0 | 334e26e9-8355-45cc-97c6-c31daf0df330 | city=san_francisco | 9d63dd6d-16dc-4a0d-bdb1-4be1aceab3a5-0_0> 20231123222905887 | 20231123222905887_0_1 | e96c4396-3fad-413a-a942-4cb36106d721 | city=san_francisco | 9d63dd6d-16dc-4a0d-bdb1-4be1aceab3a5-0_0> 20231123161346626 | 20231123161346626_0_2 | 9909a8b1-2d15-4d3d-8ec9-efc48c536a00 | city=san_francisco | 9d63dd6d-16dc-4a0d-bdb1-4be1aceab3a5-0_0> 20231123161346626 | 20231123161346626_1_1 | 7a84095f-737f-40bc-b62f-6b69664712d2 | city=sao_paulo | 5d42cc1a-c3cb-499b-a203-98b4372c30b6-0_1> 20231123222905887 | 20231123222905887_1_2 | ea4c36ff-2069-4148-9927-ef8c1a5abd24 | city=sao_paulo | 5d42cc1a-c3cb-499b-a203-98b4372c30b6-0_1> 20231123161346626 | 20231123161346626_0_3 | 1dced545-862b-4ceb-8b43-d2a568f6616b | city=san_francisco | 9d63dd6d-16dc-4a0d-bdb1-4be1aceab3a5-0_0> 20231123222905887 | 20231123222905887_0_4 | 3f3d9565-7261-40e6-9b39-b8aa784f95e2 | city=san_francisco | 9d63dd6d-16dc-4a0d-bdb1-4be1aceab3a5-0_0> (10 rows)
merger:trino语法不支持
delete: trino hudi connector不支持修改表行数
时间旅行:语法不支持