问题使用云外壳连接到hdfs

问题描述 投票:1回答:2

我发现使用Google Cloud Shell访问我的hadoop数据文件系统非常困难(我已经在Google Cloud Platform上创建了一个集群以供学习)。

通用'hdfs dfs -ls'或'hadoop fs -ls gs://'似乎不起作用,我已经做了很多尝试但尝试出了一些错误怎么做。有人可以帮我吗?谢谢:)

hadoop google-cloud-platform hortonworks-data-platform cloudera-cdh google-cloud-dataproc
2个回答
1
投票

您可以使用Cloud Storage connector,它提供FileSystem抽象的实现,并且在不同的HDP版本中可用,以便于访问GCS,然后您应该可以使用'hadoop fs -ls gs:// CONFIGBUCKET / dir / file”在hadoop shell中。请检查this教程,并确保您正确地使用configured access to Google Cloud Storage


0
投票

要访问HDFS,最简单的方法是在Dataproc群集主节点上进行SSH并在那里使用Hadoop命令行实用程序,而不是未预先安装Hadoop实用程序的Cloud Shell:

gcloud compute ssh ${DATAPROC_CLUSTER_NAME}-m
hdfs dfs -ls
hadoop fs -ls gs:/
© www.soinside.com 2019 - 2024. All rights reserved.