.net - Dataproc 不会解压缩作为存档传递的文件
问题描述
我正在尝试使用 .NET spark Job 提交 Dataproc。
命令行如下所示:
gcloud dataproc jobs submit spark \
--cluster=<cluster> \
--region=<region> \
--class=org.apache.spark.deploy.dotnet.DotnetRunner \
--jars=gs://bucket/microsoft-spark-2.4.x-0.11.0.jar \
--archives=gs://bucket/dotnet-build-output.zip \
-- find
此命令行应调用find
函数以显示当前目录中的文件。
我只看到 2 个文件:
././microsoft-spark-2.4.x-0.11.0.jar
././microsoft-spark-2.4.x-0.11.0.jar.crc
最终 GCP 不会从指定为--archives
. 指定的文件存在并且路径是从 GCP UI 复制的。我也尝试从存档(存在)中运行一个确切的程序集文件,但它合理地失败了File does not exist
解决方案
我认为问题在于您的命令在主节点上运行的 Spark 驱动程序中运行,因为 Dataproc 默认以客户端模式运行。您可以通过--properties spark.submit.deployMode=cluster
在提交作业时添加来更改它。
根据--archives
flag的使用帮助:
--archives=[ARCHIVE,...] Comma separated list of archives to be extracted into the working directory of each executor. Must be one of the following file formats: .zip, .tar, .tar.gz, or .tgz.
存档只会被提取到工作节点中。我测试了提交一个--archives=gs://my-bucket/foo.zip
包含 2 个文件foo.txt
和的作业deps.txt
,然后我可以在工作节点上找到提取的文件:
my-cluster-w-0:~$ sudo ls -l /hadoop/yarn/nm-local-dir/usercache/root/filecache/40/foo.zip/
total 4
-r-x------ 1 yarn yarn 11 Jul 2 22:09 deps.txt
-r-x------ 1 yarn yarn 0 Jul 2 22:09 foo.txt
推荐阅读
- angular - Kendo Ui 数字文本框微调器
- r - 提取列表向量的每个第 n 个元素
- javascript - javascript mousemove 隐藏一个 div - 无活动 - 并在鼠标移动时再次显示 div - 活动
- angular - 当我放两个 let 时,Angular Mat Table 排序不起作用
- atom-editor - 如何阻止 Atom 语法影响某些行
- powerbi - PowerBI 自动刷新
- php - Laravel 向数组添加额外数据
- javascript - 赛普拉斯获取特定路径内的元素
- jquery - 将画布大小调整为图像问题
- mysql - 如何在mysql中执行与特定行的连接