运行hadoop fs -ls 命令显示本地目录问题

环境CentOS6.4 CDH5.2

安装完成后发生如下问题

[hdfs@hadoop01 ~]$ hadoop fs -ls /
Found 25 items
-rw-r--r--   1 root   root              0 2016-08-17 10:47 /.autofsck
dr-xr-xr-x   - root   root           4096 2016-08-01 17:21 /bin
dr-xr-xr-x   - root   root           1024 2016-07-05 09:08 /boot
drwxr-xr-x   - root   root           4096 2016-07-06 23:49 /data
drwxr-xr-x   - root   root           3640 2016-08-17 10:47 /dev
drwxr-xr-x   - root   root           4096 2016-08-15 20:30 /dfs
drwxr-xr-x   - root   root           4096 2016-08-17 10:50 /etc
drwxr-xr-x   - hadoop root           4096 2016-08-15 16:25 /hadoop
drwxr-xr-x   - root   root           4096 2016-07-17 15:29 /home
dr-xr-xr-x   - root   root           4096 2016-07-17 15:18 /lib
dr-xr-xr-x   - root   root          12288 2016-07-17 15:18 /lib64
drwx------   - root   root          16384 2016-07-05 09:05 /lost+found
drwxr-xr-x   - root   root           4096 2011-09-23 19:50 /media
drwxr-xr-x   - root   root           4096 2011-09-23 19:50 /mnt
drwxr-xr-x   - 1106   4001           4096 2015-08-22 05:34 /opt
dr-xr-xr-x   - root   root              0 2016-08-17 10:47 /proc
dr-xr-x---   - root   root           4096 2016-08-17 10:49 /root
dr-xr-xr-x   - root   root           4096 2016-08-01 15:29 /sbin
drwxr-xr-x   - root   root              0 2016-08-17 10:47 /selinux
drwxr-xr-x   - root   root           4096 2011-09-23 19:50 /srv
drwxr-xr-x   - root   root              0 2016-08-17 10:47 /sys
drwxrwxrwt   - root   root          12288 2016-08-17 10:57 /tmp
drwxr-xr-x   - root   oinstall       4096 2016-07-24 14:54 /u01
drwxr-xr-x   - root   root           4096 2016-08-01 10:53 /usr
drwxr-xr-x   - root   root           4096 2016-07-05 09:06 /var
解决方案:

[root@hadoop01 ~]# cat /opt/cloudera/parcels/CDH-5.2.6-1.cdh5.2.6.p0.2/etc/hadoop/conf.empty/core-site.xml






fs.defaultFS
hdfs://hadoop01:8020
 

配置客户端,添加defaultFS参数

你可能感兴趣的:(Apache,Hadoop)