trino组件对接ldap(二)

九月5个月前技术文章162


1、coordinater设置证书

keytool -genkeypair -validity 36500 -ext SAN=IP:172.16.121.0,DNS:hadoop001  -alias trino -keypass admin@123 -storepass admin@123 -keyalg RSA -dname CN=hadoop001,OU=,O=,L=,ST=,C= -keystore trino.jks

keytool -export -rfc -keystore trino.jks --alias trino -file trino.pem

2、在所有trino节点增加password-authenticator.properties配置文件

password-authenticator.name=ldap
ldap.url=ldap://172.16.121.210:30389
ldap.user-base-dn=ou=People,dc=dtstack,dc=com
ldap.user-bind-pattern=uid=${USER},ou=People,dc=dtstack,dc=com
ldap.allow-insecure=true

3、所有trino节点增加config.properties的配置

http-server.https.enabled=true
http-server.https.port=8443
http-server.https.keystore.key=admin@123
http-server.https.keystore.path=/opt/trino/etc/trino.jks
internal-communication.shared-secret=abc123
internal-communication.https.required=true
http-server.https.secure-random-algorithm=SHA1PRNG
http-server.authentication.allow-insecure-over-http=true
http-server.authentication.type=PASSWORD

4、所有节点hive.properties中增加配置

hive.metastore.thrift.impersonation.enabled=true

5、重启trino

#进入trino部署路径下
cd /opt/trino/bin
./launcher stop
./launcher start

图1.png

6、查看webui

帐号密码填入ldap的帐号密码


冒烟测试

1、使用test用户对test库下面的数据进行处理

#需要输入ldap中test的用户密码
/opt/trino/trino-cli --server https://172.16.121.0:8443 --keystore-path /opt/trino/etc/trino.jks --keystore-password admin@123  --catalog hive --user test --password --debug
password:

trino> use test;
USE
trino:test> show tables;
       Table        
--------------------
 alluxio_user2      
 alluxio_user3      
 alluxio_user4      
 alluxio_user5      
 alluxiotest        
 hive_student       
 hive_student1      
 student            
 test               
 test_hive_hdfs     
 test_spark_alluxio 
 test_spark_hdfs    
 testcc             
 u_user             
 u_user2            
(15 rows)

Query 20231122_092602_00075_qew3a, FINISHED, 3 nodes
https://172.16.121.0:8443/ui/query.html?20231122_092602_00075_qew3a
Splits: 53 total, 53 done (100.00%)
CPU Time: 0.0s total,   576 rows/s, 14.1KB/s, 14% active
Per Node: 0.0 parallelism,    15 rows/s,   397B/s
Parallelism: 0.1
Peak Memory: 1.62KB
0.32 [15 rows, 375B] [47 rows/s, 1.16KB/s]
trino:test> select * from student;
 id  |  name  | age | gender |  grade   
-----+--------+-----+--------+----------
 108 | 曾华   |  22 | male   | 95033    
 108 | 曾华   |  22 | male   | 95033    
   1 | Alice  |  18 | Female | Grade 12 
trino:test> insert into hive.test.student values(109,'曾华',22,'male','95033');
INSERT: 1 row

Query 20231122_092840_00077_qew3a, FINISHED, 2 nodes
https://172.16.121.0:8443/ui/query.html?20231122_092840_00077_qew3a
Splits: 50 total, 50 done (100.00%)
CPU Time: 0.1s total,     0 rows/s,     0B/s, 30% active
Per Node: 0.0 parallelism,     0 rows/s,     0B/s
Parallelism: 0.1
Peak Memory: 28.9KB
0.83 [0 rows, 0B] [0 rows/s, 0B/s]

trino:test> select * from student;
 id  |  name  | age | gender |  grade   
-----+--------+-----+--------+----------
 108 | 曾华   |  22 | male   | 95033    
 109 | 曾华   |  22 | male   | 95033        
   1 | Alice  |  18 | Female | Grade 12 
 108 | 曾华   |  22 | male   | 95033    

trino:test> select count(*) from student;
 _col0 
-------
     4
(1 row)


标签: trino

相关文章

hadoop集群集成Iceberg操作指导

hadoop集群集成Iceberg操作指导

hadoop集群集成Iceberg操作指导书一、    准备工作1.       大数据集群运行正常,完成hi...

helm安装部署trino对接hive(一)

helm安装部署trino对接hive(一)

前提:本文前提是基于hive组件已经提前安装的情况下,安装部署好trino容器之后进行对hive组件的对接。helm trino地址:https://artifacthub.io/packages/h...

trino容器对接hudi(五)

trino容器对接hudi(五)

前提:本文是基于已经部署了trino容器的基础上进行的。冒烟测试是在trino对接ldap后并且ranger已经对接了metastore权限后,并且spark组件已经对接hudi,并且成功创建hudi...

trino容器对接ldap(二)

trino容器对接ldap(二)

前提:本文前提是在trino容器已经对接上hive组件,并且ldap已经部署完成的基础上进行的对接。前提文章见:helm安装部署trino对接hive(一)安装部署1、设置证书因为不确定是在哪台机器中...

trino组件对接hudi(四)

trino组件对接hudi(四)

安装部署本文是基于已经部署了trino组件的环境上,进行的trino和hudi的对接,使trino组件能够正常查询hudi表。1、增加hudi connector配置在trino安装部署下的etc/c...

Trino配置yanagishima-23.0(包含编译)

Trino配置yanagishima-23.0(包含编译)

1 环境介绍1.1 本文采用trino 359yanagishima v23.02 编译yanagishima2.1 安装编译yanagishima需要的工具安装编译yanagishima需要的工具w...

发表评论    

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。