m1 芯片 在 localhost 部署了 hadoop 如何设置连接的URL
来源:3-17 HDFS API编程之第一个应用程序的开发

慕盖茨9116835
2023-01-02
Configuration configuration = new Configuration();
FileSystem fileSystem = FileSystem.get(new URI(“hdfs://10.180.131.60:8020”), configuration);
这是我的ip
Exception in thread “main” java.net.ConnectException: Call From garendeMacBook-Pro.local/127.0.0.1 to 10.180.131.60:8020 failed on connection exception: java.net.ConnectException: Connection refused; For more details see: http://wiki.apache.org/hadoop/ConnectionRefused
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
Caused by: java.net.ConnectException: Connection refused
这是报错信息 谢谢
1回答
-
Michael_PK
2023-01-05
1)你这个确认下你的hadoop相关的进程正常吗?
2)10.180.131.60 这个机器是云主机吗?如果是的话,安全组中的端口都开放没?
00
相似问题