python - Mrjob 步骤失败。怎么调试?
问题描述
我正在尝试mrjob
在 EMR 集群中运行示例。我在 AWS 仪表板中手动创建了 EMR 集群并按如下方式启动了 mrjob
python keywords.py -r emr s3://commoncrawl/crawl-data/CC-MAIN-2018-34/wet.paths.gz --cluster-id j-22GFG1FUGS12L
作业因以下错误消息而失败
Using configs in /etc/mrjob.conf
Using s3://mrjob-07d6e1cbb9127021/tmp/ as our temp dir on S3
emr_api_params is deprecated and does nothing. Please use extra_cluster_params instead
Could not infer endpoint for bucket commoncrawl; assuming defaults
Copying local files to s3://mrjob-07d6e1cbb9127021/tmp/keywords.ec2-user.20181002.164319.430013/files/...
Adding our job to existing cluster j-22GFG1FUGS12L
Creating temp directory /tmp/phonenumers.ec2-user.20181002.164319.430013
Connect to resource manager at: http://localhost:40750/cluster
Waiting for Step 1 of 1 (s-2OZF2A4TZTS06) to complete...
RUNNING for 0:00:18
FAILED
Cluster j-22GFG1FUGS12L is WAITING: Cluster ready after last step failed.
Attempting to fetch counters from logs...
Waiting 10 minutes for logs to transfer to S3... (ctrl-c to skip)
如何查看失败消息?
解决方案
请参阅EMR 文档如何获取作业和任务日志。因为挖掘集群日志并非易事,我建议使用mrjob 的本地 runner彻底测试 Python 代码。
推荐阅读
- php - 我没有通过while循环得到预期的结果
- r - 如何根据 R 中的另一个数据框更改列名?
- asp.net - ASP.NET Web API – FileNotFoundException: 无法加载文件或程序集
- c# - Angular7 - 从 API 调用中获取响应
- python - 从两个文件路径之一加载数据的最干净和最pythonic的方法是什么?为什么我不能捕获两个相同的异常?
- javascript - 如何将物品转入
- mysql - 如何从有序数据集中仅获取第一行组
- multithreading - 未从线程调用的重写虚函数
- sql-server - 使用 CTE 递归替换字符串
- pine-script - 在交易视图的每日开盘时绘制水平射线