Hadoop—如何查看HDFS默认的ns命名空间和所有命名空间列表

技术公众号:后端技术解忧铺
关注微信公众号:CodingTechWork,一起学习进步。

问题1

如何查看hdfs的默认命名空间是哪个?

方案

1)通过查询core-site.xml中的fs.defaultFS配置值。
2)shell命令

hdfs getconf -confKey fs.default.name

或者

hdfs getconf -confKey fs.defaultFS

问题2

如何查看hdfs的所有命名空间列表?

方案

1)通过查询core-site.xml中的dfs.nameservices配置值
2)shell命令

hdfs getconf -confKey dfs.nameservices
posted @ 2021-08-20 17:32  Andya_net  阅读(62)  评论(0编辑  收藏  举报  来源