Hadoop proxy user

如何理解Proxy user(包括proxy、impersonation和常见的Proxy use case)
官方文档的一些configurations及相应解释

帮助理解的两个博客:
hadoop的用户代理机制
HDFS-- Hadoop中的ProxyUser

有了上面的前置知识,接下来,我们开始理解下面这段话:

Hive 的运行依赖于 Hadoop ( HDFS 、 MapReduce 、 YARN 都依赖),同时涉及到 HDFS 文件系统的访问

所以需要配置 Hadoop 的代理用户,即设置 hadoop 用户允许代理(模拟)其它用户

即需要配置如下内容在 Hadoop 的 core-site.xml 中,并分发到其它节点,且重启 HDFS 集群

python 复制代码
# hadoop.proxyuser.hadoop.hosts第2个hadoop可以替代成你信任的并想将其设置为proxy user的用户
<property>
    <name>hadoop.proxyuser.hadoop.hosts</name>
    <value>*</value>
</property>

<property>
    <name>hadoop.proxyuser.hadoop.groups</name>
    <value>*</value>
</property>

下面这几段话解决了我的困惑(即为什么明明是Hive存在与Hadoop的依赖和交互,照理说应该配置的HIve的Proxy,但是实际上配置的却是Hadoop):

Configuring a proxy user in Hadoop allows Hive to impersonate or act

on behalf of other users when accessing HDFS (Hadoop Distributed File

System). However, this doesn't mean that Hive itself inherently has

the capability to directly impersonate other users. Instead, Hive

leverages the proxy user settings configured in Hadoop to achieve this

functionality.

When a user submits a query or job to Hive, Hive interacts with Hadoop

components such as HDFS, MapReduce, or YARN on behalf of that user.

Hive uses the configured proxy user in Hadoop to authenticate and

execute actions on behalf of the user who submitted the query. This

ensures that the user's permissions and access controls are respected

when accessing data stored in HDFS or executing tasks on the Hadoop

cluster.

In summary, while Hive doesn't have its own built-in capability to

directly impersonate other users, it can utilize the proxy user

configuration in Hadoop to achieve user impersonation for accessing

HDFS or performing tasks within the Hadoop ecosystem.

简单说,就是当一个在上述配置文件中的user(针对上述配置文件来说,是任意user),试图利用Hive去和Hadoop产生交互时(例如对HDFS中的表进行查询),Hive就会利用proxy user(针对上述配置文件来说,是hadoop)来impersonate或act on behalf of 这个user来实现和Hadoop的交互,而无需作为这些用户进行身份验证。

proxy user'features

  • 值得信赖的;少;无需身份验证
  • 要去模拟或代表其他用户的
相关推荐
YH行业报告分析34 分钟前
2026年直流配电网市场结构性增长解析:分布式能源并网与智能电网升级驱动下的技术路线博弈
分布式·能源
2601_9545267544 分钟前
2026 生成式搜索引擎底层技术演进与 GEO优化服务商推荐:大模型检索增强(RAG)管道与语义对齐工程实战
大数据·人工智能·搜索引擎
A15362551 小时前
WMS 仓储管理系统推荐:企业如何选适配的仓储管理系统
大数据·人工智能
星野川崎2067 小时前
电商多店运维:云机24小时挂机频繁掉线、账号无故风控深度原因分析及解决方案
大数据·运维·服务器·云计算·电商
2601_967097227 小时前
园区巡检机器人推荐:4项评估维度与主流产品横评
大数据·人工智能·信息可视化
whcyhhh8 小时前
头歌实践教学平台:大数据存储2023(六)
大数据·数据库·python
世岩清上8 小时前
新能源宣传片怎么拍?如何用画面讲好你的绿色能源故事
大数据·人工智能·能源·宣传片·宣传片拍摄
剑胆琴心静水深流9 小时前
全栈之路6---web集成与呈现
前端·vue.js·spring boot·分布式·spring·前端框架·npm
Elastic 中国社区官方博客9 小时前
让大模型思考,让小模型执行:在 Elastic Workflows 中拆分 LLM 成本
大数据·运维·数据库·人工智能·elasticsearch·ai
Faith_xzc9 小时前
一条 SQL 顶一条 Flink 链路?Doris Streaming Job 持续导入全景解析
大数据·数据库·sql·flink