我使用的是单节点hadoop版本release-3.3.1-RC3。在 web ui hadoop 中,实用程序 -> 浏览文件系统下,可以直接在浏览器中查看文件的内容(开头和结尾)。但我得到了错误
Couldn't preview the file. NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'http://desktop-ht79hb0.:9864/webhdfs/v1/user/lemit/output/part-r-00000?op=OPEN&namenoderpcaddress=localhost:9000&length=32768&offset=0&_=1674670084685'.
,但是通过控制台中的 hdfs dfs
我可以查看文件的内容。
我尝试过的:按照错误链接(没有帮助),更改端口(没有帮助),更改 /etc/hosts 文件(没有帮助) 我期望的是:能够在浏览器中使用 webhdfs 查看文件
更改/etc/hosts文件
更改 C:\Windows\System32\drivers tc\hosts
更改 hdfs-site.xml,添加属性
dfs.webhdfs.启用 真的