Wrong FS: hdfs://xxx/xxx expected: file:///
Eclipse调用HDFS API上传文件时出现了如下错误:
Exception in thread "main" java.lang.IllegalArgumentException: Wrong FS: hdfs://master:9000/user/Administrator, expected: file:///at org.apache.hadoop.fs.FileSystem.checkPath(FileSystem.java:659)at org.apache.hadoop.fs.RawLocalFileSystem.pathToFile(RawLocalFileSystem.java:82)at org.apache.hadoop.fs.RawLocalFileSystem.deprecatedGetFileStatus(RawLocalFileSystem.java:585)at org.apache.hadoop.fs.RawLocalFileSystem.getFileLinkStatusInternal(RawLocalFileSystem.java:803)at org.apache.hadoop.fs.RawLocalFileSystem.getFileStatus(RawLocalFileSystem.java:580)at org.apache.hadoop.fs.FilterFileSystem.getFileStatus(FilterFileSystem.java:425)at org.apache.hadoop.fs.FileSystem.exists(FileSystem.java:1414)at org.apache.hadoop.fs.FileUtil.checkDest(FileUtil.java:499)at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:351)at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:341)at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:292)at org.apache.hadoop.fs.LocalFileSystem.copyFromLocalFile(LocalFileSystem.java:82)at org.apache.hadoop.fs.FileSystem.copyFromLocalFile(FileSystem.java:1884)at com.hellohadoop.FileOperator.Upload(FileOperator.java:48)at com.hellohadoop.FileOperator.main(FileOperator.java:23)
解决的办法是把Hadoop集群的hdfs-site.xml和core-site.xml两个配置文件复制到项目的bin目录下面,就可以正常运行了。
转载于:https://www.cnblogs.com/mstk/p/6682130.html
Wrong FS: hdfs://xxx/xxx expected: file:///相关推荐
- hadoop程序问题:java.lang.IllegalArgumentException: Wrong FS: hdfs:/ expected file:///
FileSystem fs = FileSystem.get(conf); in=fs.open(newPath("hdfs://192.168.130.54:19000/user/hmai ...
- hadoop报错Wrong FS: hdfs:/, expected: file:///
在hadoop-2.2.0版本中对hdfs进行简单的测试操作,代码如下所示 Configuration conf = new Configuration(); try { ...
- RLException: XXX is neither a launch file in package XXX nor is XXX a launch file name问题解决
RLException: XXX is neither a launch file in package XXX nor is XXX a launch file name问题解决 参考文章: (1) ...
- 2021-06-17springboot本地正常启动,部属服务器找不到外部文件 file:/apps/xxx/xxx/xxx.jar!/BOOT-INF/classes!/
springboot本地正常启动,部属服务器找不到外部文件 file:/apps/xxx/xxx/xxx.jar!/BOOT-INF/classes!/ 废话不多,直接上代码 一.获取本地路径: 1. ...
- Spring项目启动报错No qualifying bean of type [xxx] available: expected single matching bean but found 2
启动报错: No qualifying bean of type [class1] available: expected single matching bean but found 2,class ...
- 使用git上传工程出现fatal:Unable to create ‘/xxx/xxx/xxx/.git/index.lock‘:File exists的解决办法
git上传工程出现fatal:Unable to create '/xxx/xxx/xxx/.git/index.lock':File exists的原因及解决方法 先说解决办法 再来说说原因 官方说 ...
- Cannot overwrite File XXX/xxx/xx/x/x/x.xxx:Permission denied
错误:Cannot overwrite File XXX/xxx/xx/x/x/x.xxx:Permission denied 原因: 读取文件权限不够导致的错误 或者文件编译位置改变 覆盖了你导入的 ...
- git命令出现fatal: Unable to create 'xxx/.git/index:File exists.问题
用git commit命令时,出现 fatal: Unable to create 'xxx/.git/index:File exists. Another git process seems to ...
- rpm提示:XXX conflicts with file form package XXX
最近为兼容云计算厂家提供的虚拟机备份恢复业务场景,甲方提供内部库以及相应demo作为引子,一个rpm包,一个引发血案的rpm包.包的样子就是一个普通的rpm包,平平无奇.而这个平平无奇的rpm包中依赖 ...
最新文章
- NVIDIA Tesla/Quadro和GeForce GPU的比较
- Spark自带的集群模式(Standalone),Spark/Spark-ha集群搭建
- SmartDraw2008破解过程总结
- udemy下载课程无法播放_最好的Udemy Web开发课程+热门免费课程
- 5G的基站覆盖范围300米,今后边远地区的手机通话怎样保证?
- 对支付宝微信们来说,扫码支付限额 500 元新规意味着什么?
- 10.2.0.3.0 oracle导出,oracle 数据库从10.2.0.4升级到11.2.0.3
- 整合nagios+cacti遇到问题及解决办法
- HarmonyOS移动应用学习笔记——2.HarmonyOS开发工具DevEco Studio安装
- kindeditor上传图片宽度自适应
- TcpClient Class
- 微波雷达人体感应技术,智能镜子感应雷达模块应用,让生活更有趣
- python假设检验和区间估计_用 Python 实现常用的假设检验
- 百度地图坐标转高德地图坐标
- 第一学:pytorch入门60min
- 关于vue的组件重新加载
- aix java解压,AIX 7.1 jar unzip解压报错问题解决
- JAVA-操作excel模版进行写入
- Proxy SwitchyOmega
- nginx反向代理websocket 小坑