我有一个问题,如何获得路径/url的文件位于dataproc hdfs?我希望基于位于dataproc中的文件运行一个M/R作业。
发布于 2021-09-27 17:28:03
以下是Dataproc集群中所有有效的HDFS URI:
hdfs://<master-hostname>:8020/<path-to-file>hdfs://<master-hostname>/<path-to-file>hdfs:///<path-to-file>第三个可以工作,因为默认情况下,在Dataproc集群的每个节点中,fs.defaultFS属性在/etc/hadoop/conf/core-site.xml中被配置为hdfs://<master-hostname>。8020是默认的NameNode端口。
<property>
<name>fs.defaultFS</name>
<value>hdfs://<master-hostname></value>
<description>
The name of the default file system. A URI whose scheme and authority
determine the FileSystem implementation. The uri's scheme determines
the config property (fs.SCHEME.impl) naming the FileSystem
implementation class. The uri's authority is used to determine the
host, port, etc. for a filesystem.
</description>
</property>您可以在任何节点上运行hadoop fs -ls <uri>来列出文件。
https://stackoverflow.com/questions/69349242
复制相似问题