hdfs client access the hdfs cluster not in one domain

本文档详细介绍了如何解决HDFS服务在互联网上暴露时遇到的路由问题,特别是当客户端无法正确解析DataNode主机名或无法访问内部IP时的情况。文章还提供了使用Python访问HDFS时需要注意的配置项。

https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-hdfs/HdfsMultihoming.html#Clients_use_Hostnames_when_connecting_to_DataNodes

sometimes when you access your hadoop cluster outside the internal cluster, you maybe encounter some route problem.

1, how to expose you hdfs service on internet?

the hdfs client communicate the master( if the master can access) ,but the master return datanodes's internal ip or hostname,

the client can not do the correct name resolution for the host name or can not access the internal ip.

for the name resolution, if the data node ip can access, you should set the parameter

dfs.client.use.datanode.hostnamefalseWhether clients should use datanode hostnames when connecting to datanodes.

2.if you use python to access hdfs, you should pay attention to another configure item.

  dfs.webhdfs.enabled  -> true

because python hdfs module use webhdfs to access hadoop by default.

转载于:https://www.cnblogs.com/huaxiaoyao/p/6007795.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值