问题遇到的现象和发生背景
在做HDFS_API上传时,报的错误
问题相关代码,请勿粘贴截图
public class HdfsClient {
public void testmkdir() throws URISyntaxException, IOException, InterruptedException {
URI uri = new URI("hsds://hadoop102:8020");
Configuration configuration = new Configuration();
String user = "atguigu";
FileSystem fs = FileSystem.get(uri,configuration,user);
fs.mkdirs(new Path("xiyou/huaguoshan"));
fs.close();
}
public static void main(String[] args) throws URISyntaxException, IOException, InterruptedException {
HdfsClient h = new HdfsClient();
h.testmkdir();
}
}
运行结果及报错内容
我的解答思路和尝试过的方法
正常这个报错结尾应该是hdfs,可我这个不知道为什么是hsds,可能是我以前什么东西配错了
我想要达到的结果
我想知道这个问题到底是什么地方造成的,以及如何解决这个报错问题