向HDFS集群写10个128M的文件的时候出现异常。
[atguigu@hadoop103 mapreduce]$ hadoop jar /opt/module/hadoop-3.1.3/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-3.1.3-tests.jar TestDFSIO -write -nrFiles 10 -fileSize 128MB
你的配置可能有问题吧,以Java语言作为基础为例
FileSystem.get(conf)代表获取的是本地的,但是我看你上面好像用的是服务器,文件系统应该是
FileSystem.get(URI uri, Configuration conf)根据uri和conf来确定文件系统,例如
FileSystem hdfs = FileSystem.get(URI.create("hdfs://ip:9000/"), conf);
看下nn的日志里面报了什么错误,先盲猜一个文件都没写成功,报没有权限的错误