hadoop fs命令显示本地文件系统而不是hdfs [英] hadoop fs commands are showing the local filesystem not the hdfs

查看:283
本文介绍了hadoop fs命令显示本地文件系统而不是hdfs的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在几台笔记本电脑上安装了hadoop,以形成一个hadoop集群。首先我们以伪分布模式安装,除了一件事情是完美的(即所有服务都运行,并且当我使用 hadoop fs 进行测试时,它显示 HDFS )。在后面提到的笔记本电脑(有问题的笔记本电脑)中,`hadoop fs -ls 命令显示本地目录的信息而不是 hdfs ,命令 -cat -mkdir -put 。我可能做错了什么?



任何帮助将不胜感激



这是我的 core-site.xml

 <?xml version =1.0?> 
<?xml-stylesheet type =text / xslhref =configuration.xsl?>

<! - 将特定于站点的属性覆盖到此文件中。 - >

<配置>
<属性>
< name> hadoop.tmp.dir< / name>
<值> / home / hduser / hdfs_dir / tmp< /值>
< description>< / description>
< / property>

<属性>
<名称> fs.default.name< /名称>
<值> hdfs:// localhost:54310< /值>
< description>。< / description>
< / property>
< / configuration>

我必须说,这是所有其他笔记本电脑的相同文件,并且它们工作正常。

解决方案

我有同样的问题,我必须确保 fs.default.name 的值包含一个尾随的 / 来引用路径组件:

 <性> 
<名称> fs.default.name< /名称>
< value> hdfs:// localhost:54310 /< / value>
< description>。< / description>
< / property>


I installed hadoop in several laptops in order to form a hadoop cluster. First we installed in pseudo-distributed mode, and in all except one verything was perfect (i.e. all the services run, and when I do tests with hadoop fs it shows the hdfs). In the aftermentioned laptop (the one with problems) the `hadoop fs -lscommand shows the information of the local directory not the hdfs, the same happens with the commands -cat, -mkdir, -put. What could I be doing wrong?

Any help would be appreciated

Here is my core-site.xml

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

<!-- Put site-specific property overrides in this file. -->

<configuration>
<property>
 <name>hadoop.tmp.dir</name>
 <value>/home/hduser/hdfs_dir/tmp</value>
 <description></description>
</property>

<property>
 <name>fs.default.name</name>
 <value>hdfs://localhost:54310</value>
 <description>.</description>
</property>
</configuration>

I must said, that this is the same file for all the other laptops, and they work fine.

解决方案

I had the same problem, and I had to make sure fs.default.name's value included a trailing / to refer to the path component:

<property>
 <name>fs.default.name</name>
 <value>hdfs://localhost:54310/</value>
 <description>.</description>
</property>

这篇关于hadoop fs命令显示本地文件系统而不是hdfs的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆