Presto之hive.hdfs.impersonation.enabled & hive.hdfs.wire-encryption.enabled

一. hive.hdfs.impersonation.enabled

     1. hive.hdfs.impersonation.enabled设置为true后,Presto将使用hive.hdfs.presto.principal设置的用户去代理客户端用户与hdfs进行交互,但是hdfs端看到的用户都是客户端用户,因此如果创建文件,那么文件的属组将为客户端用户。如果hive.hdfs.impersonation.enabled=false,则Presto将直接使用hive.hdfs.presto.principal设置的用户与hdfs进行交互,所以如果新建文件,文件的数组将为hive.hdfs.presto.principal用户。

      2. hive.hdfs.impersonation.enabled的实现原理是通过创建访问Hdfs的Ugi来控制的。如果hive.hdfs.impersonation.enabled为true,则创建ProxyUGI:UserGroupInformation.createProxyUser(user, hadoopAuthentication.getUserGroupInformation()) ,如果为false,则直接使用hadoopAuthentication.getUserGroupInformation()的UGI访问hdfs。

      3. hive.hdfs.presto.principal可以代理哪些用户,是由core-site文件中的hadoop.proxyuser.xxx.hosts和hadoop.proxyuser.xxx.groups控制的,如果不在core-site中开放代理的白名单,Presto通过RPC连接hdfs的时候,将提示xxx is not allowed to impersonate yyy的错误。

二. hive.hdfs.wire-encryption.enabled

     1. hive.hdfs.wire-encryption.enabled配置的含义是指的是DataNode与客户端之间传递数据时候,是否会进行加密。如果将hive.hdfs.wire-encryption.enabled设置为true,Presto在访问hdfs时候会将配置dfs.encrypt.data.transfer设置为true和hadoop.rpc.protection设置为privacy实现Presto与DataNode之间数据传递加密。

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值