我有一個問題,如何獲取位于 dataproc hdfs 中的檔案的路徑/url?我想根據位于 dataproc hdfs 中的檔案運行 M/R 作業。
uj5u.com熱心網友回復:
以下是 Dataproc 集群中所有有效的 HDFS URI:
hdfs://<master-hostname>:8020/<path-to-file>hdfs://<master-hostname>/<path-to-file>hdfs:///<path-to-file>
第三一個作品,因為默認情況下在Dataproc群集的每個節點,該fs.defaultFS屬性被設定為hdfs://<master-hostname>中/etc/hadoop/conf/core-site.xml。并且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://www.uj5u.com/yidong/316044.html
