简体   繁体   English

Hadoop文件系统的绝对路径是什么

[英]What is the absolute path of the Hadoop filesystem

I can access hadoop fs -ls / and I would like to know the absolute path of above /我可以访问hadoop fs -ls /我想知道上面的绝对路径/

I knew the / is a format looks like: "hdfs://host:port/" I also knew it is the value of the setting fs.defaultFS in core-site.xml .我知道/的格式类似于:“hdfs://host:port/” 我也知道它是core-site.xml中设置fs.defaultFS的值。

However, I checked my core-site.xml , and did not find fs.defaultFS 's value.但是,我检查了我的core-site.xml ,并没有找到fs.defaultFS的值。 There must be a default value of fs.defaultFS , what is it?必须有fs.defaultFS的默认值,它是什么?

You can find the default value in the file core-default.xml , it is usually file:/// 您可以在文件core-default.xml找到默认值,通常为file:///

Check core-site.xml for the value which is set by the user to override the default value which if present would something like 检查core-site.xml中用户设置的值,以覆盖默认值(如果存在)将类似于

<property>
  <name>fs.defaultFS</name>
  <value>hdfs://host:port</value>
</property>

the value can even be a service configured. 该值甚至可以是配置的服务。

It is the default prefix of the Hadoop file system, by default it might look for file:// which is your local file system. 它是Hadoop文件系统的默认前缀,默认情况下,它可能会查找file://这是您的本地文件系统)。

您可以从命令行中找到默认 FS 值:

hdfs getconf -confKey fs.defaultFS

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM