运行 如果无法通过 SSH 连接到主节点,则在 dataproc 集群上执行 HDFS 命令

Running HDFS commands on a dataproc cluster if you can't SSH onto the master node

如果您无法通过 SSH 连接到主节点,是否有一种方法可以在 Dataproc 集群上提交 HDFS 命令。我在 Gcloud SDK 或其他 API 中找不到任何内容。

所以像这样:

gcloud dataproc jobs submit hdfs 'ls /hdfs/path/' --cluster=my-cluster --region=europe-west1

最简单的方法是 pig fs 通过 gcloud dataproc jobs submit pig --execute 'fs -ls /',或者 pig sh 作为其他 shell 命令的包罗万象。