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

2024-06-09 10:32

本文主要是介绍运行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 morecontributor license agreements.  See the NOTICE file distributed withthis 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 withthe License.  You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed 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 andlimitations 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参数

这篇关于运行hadoop fs -ls 命令显示本地目录问题的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1044926

相关文章

解决IDEA报错:编码GBK的不可映射字符问题

《解决IDEA报错:编码GBK的不可映射字符问题》:本文主要介绍解决IDEA报错:编码GBK的不可映射字符问题,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录IDEA报错:编码GBK的不可映射字符终端软件问题描述原因分析解决方案方法1:将命令改为方法2:右下jav

MyBatis模糊查询报错:ParserException: not supported.pos 问题解决

《MyBatis模糊查询报错:ParserException:notsupported.pos问题解决》本文主要介绍了MyBatis模糊查询报错:ParserException:notsuppo... 目录问题描述问题根源错误SQL解析逻辑深层原因分析三种解决方案方案一:使用CONCAT函数(推荐)方案二:

Redis 热 key 和大 key 问题小结

《Redis热key和大key问题小结》:本文主要介绍Redis热key和大key问题小结,本文给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友参考下吧... 目录一、什么是 Redis 热 key?热 key(Hot Key)定义: 热 key 常见表现:热 key 的风险:二、

IntelliJ IDEA 中配置 Spring MVC 环境的详细步骤及问题解决

《IntelliJIDEA中配置SpringMVC环境的详细步骤及问题解决》:本文主要介绍IntelliJIDEA中配置SpringMVC环境的详细步骤及问题解决,本文分步骤结合实例给大... 目录步骤 1:创建 Maven Web 项目步骤 2:添加 Spring MVC 依赖1、保存后执行2、将新的依赖

Spring 中的循环引用问题解决方法

《Spring中的循环引用问题解决方法》:本文主要介绍Spring中的循环引用问题解决方法,本文给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友参考下吧... 目录什么是循环引用?循环依赖三级缓存解决循环依赖二级缓存三级缓存本章来聊聊Spring 中的循环引用问题该如何解决。这里聊

Spring Boot中JSON数值溢出问题从报错到优雅解决办法

《SpringBoot中JSON数值溢出问题从报错到优雅解决办法》:本文主要介绍SpringBoot中JSON数值溢出问题从报错到优雅的解决办法,通过修改字段类型为Long、添加全局异常处理和... 目录一、问题背景:为什么我的接口突然报错了?二、为什么会发生这个错误?1. Java 数据类型的“容量”限制

关于MongoDB图片URL存储异常问题以及解决

《关于MongoDB图片URL存储异常问题以及解决》:本文主要介绍关于MongoDB图片URL存储异常问题以及解决方案,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐... 目录MongoDB图片URL存储异常问题项目场景问题描述原因分析解决方案预防措施js总结MongoDB图

SpringBoot项目中报错The field screenShot exceeds its maximum permitted size of 1048576 bytes.的问题及解决

《SpringBoot项目中报错ThefieldscreenShotexceedsitsmaximumpermittedsizeof1048576bytes.的问题及解决》这篇文章... 目录项目场景问题描述原因分析解决方案总结项目场景javascript提示:项目相关背景:项目场景:基于Spring

解决Maven项目idea找不到本地仓库jar包问题以及使用mvn install:install-file

《解决Maven项目idea找不到本地仓库jar包问题以及使用mvninstall:install-file》:本文主要介绍解决Maven项目idea找不到本地仓库jar包问题以及使用mvnin... 目录Maven项目idea找不到本地仓库jar包以及使用mvn install:install-file基

Python如何精准判断某个进程是否在运行

《Python如何精准判断某个进程是否在运行》这篇文章主要为大家详细介绍了Python如何精准判断某个进程是否在运行,本文为大家整理了3种方法并进行了对比,有需要的小伙伴可以跟随小编一起学习一下... 目录一、为什么需要判断进程是否存在二、方法1:用psutil库(推荐)三、方法2:用os.system调用