运行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
<?xml version="1.0"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://hadoop01:8020</value>
</property> 
</configuration>

配置客户端,添加defaultFS参数

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值