【问题标题】:Failed to load data from S3无法从 S3 加载数据
【发布时间】:2015-02-05 17:37:56
【问题描述】:

我在 amazon ec2 上启动了两个 m1.medium 节点来执行我的 pig 脚本,但看起来它在第一行失败了(甚至在 MapReduce 开始之前):raw = LOAD 's3n://uw-cse-344-oregon.aws.amazon.com/btc-2010-chunk-000' USING TextLoader as (line:chararray);

我得到的错误信息:

2015-02-04 02:15:39,804 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - 1 map-reduce job(s) waiting for submission.
2015-02-04 02:15:39,821 [JobControl] INFO  org.apache.hadoop.mapred.JobClient - Default number of map tasks: null
2015-02-04 02:15:39,822 [JobControl] INFO  org.apache.hadoop.mapred.JobClient - Setting default number of map tasks based on cluster size to : 20
... (omitted)
2015-02-04 02:18:40,955 [main] WARN  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - Ooops! Some job has failed! Specify -stop_on_failure if you want Pig to stop immediately on failure.
2015-02-04 02:18:40,956 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - job job_201502040202_0002 has failed! Stop running all dependent jobs
2015-02-04 02:18:40,956 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - 100% complete
2015-02-04 02:18:40,997 [main] ERROR org.apache.pig.tools.pigstats.SimplePigStats - ERROR 2997: Unable to recreate exception from backed error: Error: Java heap space
2015-02-04 02:18:40,997 [main] ERROR org.apache.pig.tools.pigstats.PigStatsUtil - 1 map reduce job(s) failed!
2015-02-04 02:18:40,997 [main] INFO  org.apache.pig.tools.pigstats.SimplePigStats - Script Statistics: HadoopVersion    PigVersion  UserId  StartedAt   FinishedAt  Features 1.0.3  0.11.1.1-amzn   hadoop 2015-02-04 02:15:32  2015-02-04 02:18:40 GROUP_BY

Failed!

Failed Jobs:
JobId   Alias   Feature Message Outputs
job_201502050202_0002   ngroup,raw,triples,tt   GROUP_BY,COMBINER   Message: Job failed! Error - # of failed Map Tasks exceeded allowed limit. FailedCount: 1. LastFailedTask: task_201502050202_0002_m_000022

Input(s):
Failed to read data from "s3n://uw-cse-344-oregon.aws.amazon.com/btc-2010-chunk-000"

Output(s):

Counters:
Total records written : 0
Total bytes written : 0
Spillable Memory Manager spill count : 0
Total bags proactively spilled: 0
Total records proactively spilled: 0

我认为代码应该没问题,因为我曾经成功加载过具有相同语法的其他数据,并且指向s3n://uw-cse-344-oregon.aws.amazon.com/btc-2010-chunk-000 的链接看起来有效。我怀疑这可能与我的一些 EC2 设置有关,但不确定如何进一步调查或缩小问题范围。有人有线索吗?

【问题讨论】:

    标签: amazon-ec2 amazon-s3 mapreduce apache-pig aws-ec2


    【解决方案1】:

    “Java 堆空间”错误信息提供了一些线索。您的文件似乎很大(~2GB)。确保您有足够的内存供每个任务运行程序读取数据。

    【讨论】:

    • 是的...看起来这是根本原因,看起来 m1.medium 对这个数据集来说是不够的。感谢您对此有所了解!
    【解决方案2】:

    目前通过将我的节点从 m1.medium 更改为 m3.large 解决了这个问题,感谢@Nat 指出错误消息时的良好提示关于 java 堆空间。稍后我会更新更多细节。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-08-08
      • 2023-04-08
      • 1970-01-01
      • 1970-01-01
      • 2015-01-12
      • 1970-01-01
      • 1970-01-01
      • 2022-12-03
      相关资源
      最近更新 更多