远程访问HDFS [英] Accessing HDFS Remotedly
问题描述
我的hadoop服务器在某些服务器上运行,例如在IP 192.168.11.7上运行 并具有如下所示的core-site.xml:
I have hadoop server runs on certain server, let's say on IP 192.168.11.7 and have its core-site.xml as follows :
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://localhost:9000</value>
</property>
我已经运行了hdfs,即使用命令:
I already run my hdfs, i.e. with command :
sbin/start-dfs.sh
现在,我想使用浏览器从本地计算机访问HDFS.有可能吗?
Now, I want to access the HDFS from my local computer with browser. Is it possible?
我尝试了 http://192.168.11.7:9000 或
I tried http://192.168.11.7:9000 or http://192.168.11.7:50075, but no avail. i.e. This site can’t be reached
非常感谢您
已
这是我的hdfs-site.xml的内容:
This is the content of my hdfs-site.xml :
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.webhdfs.enabled</name>
<value>true</value>
</property>
<property>
<name>dfs.namenode.http-address</name>
<value>0.0.0.0:50070</value>
</property>
和我的core-site.xml:
and my core-site.xml :
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://localhost:9000</value>
</property>
<property>
<name>dfs.datanode.http.address</name>
<value>0.0.0.0:50075</value>
</property>
但是当我从本地计算机访问它时: http://192.168.11.7:50075 仍然没有有用的 有什么问题吗?
but when I access it from ly local computer : http://192.168.11.7:50075, still no avail Is there something wrong?
谢谢
推荐答案
请注意:
<property>
<name>fs.defaultFS</name>
<value>hdfs://localhost:9000</value>
</property>
不适用于用户及其浏览器.当需要访问HDFS时,Java程序会读取该值. 您正在寻找的是此键:
is not for users and their browsers. This value is read by Java programs when need to access HDFS. What you are looking is this key:
<property>
<name>dfs.datanode.http.address</name>
<value>0.0.0.0:50075</value>
</property>
这是datanode公开其状态的地方. 要使用网络浏览器浏览HDFS,您需要激活webhdfs.
This is where the datanode exposes its status. To surf into HDFS using a web browser you need to activate webhdfs.
<property>
<name>dfs.webhdfs.enabled</name>
<value>true</value>
</property>
<property>
<name>dfs.namenode.http-address</name>
<value>0.0.0.0:50070</value>
</property>
进入hdfs-site.xml
into hdfs-site.xml
然后转到http://hostname:50070
以从那里访问webHDFS UI,您可以检查所有内容.
then go to http://hostname:50070
to access webHDFS UI from there you can check everything.
这篇关于远程访问HDFS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!