0

运行地图时,当减速器启动时,它从 0 变为 100 失败:

15/05/12 07:21:27 INFO terasort.TeraSort: starting
15/05/12 07:21:27 WARN util.NativeCodeLoader: Unable to load native-hadoop     library for your platform... using builtin-java classes where applicable
15/05/12 07:21:29 INFO input.FileInputFormat: Total input paths to process :    18000

Spent 1514ms computing base-splits.
Spent 109ms computing TeraScheduler splits.
Computing input splits took 1624ms
Sampling 10 splits of 18000
Making 1 from 100000 sampled records
Computing parititions took 315ms
Spent 1941ms computing partitions.
15/05/12 07:21:30 INFO client.RMProxy: Connecting to ResourceManager at    n1/192.168.2.1:8032
15/05/12 07:21:31 INFO mapreduce.JobSubmitter: number of splits:18000
15/05/12 07:21:31 INFO mapreduce.JobSubmitter: Submitting tokens for job: job_1431389162125_0001
15/05/12 07:21:31 INFO impl.YarnClientImpl: Submitted application application_1431389162125_0001
15/05/12 07:21:31 INFO mapreduce.Job: The url to track the job: http://n1:8088/proxy/application_1431389162125_0001/
15/05/12 07:21:31 INFO mapreduce.Job: Running job: job_1431389162125_0001
15/05/12 07:21:37 INFO mapreduce.Job: Job job_1431389162125_0001 running in uber mode : false
15/05/12 07:21:37 INFO mapreduce.Job:  map 0% reduce 0%
15/05/12 07:21:47 INFO mapreduce.Job:  map 1% reduce 0%
15/05/12 07:22:01 INFO mapreduce.Job:  map 2% reduce 0%
15/05/12 07:22:13 INFO mapreduce.Job:  map 3% reduce 0%
15/05/12 07:22:25 INFO mapreduce.Job:  map 4% reduce 0%
15/05/12 07:22:38 INFO mapreduce.Job:  map 5% reduce 0%
15/05/12 07:22:50 INFO mapreduce.Job:  map 6% reduce 0%
15/05/12 07:23:02 INFO mapreduce.Job:  map 7% reduce 0%
15/05/12 07:23:15 INFO mapreduce.Job:  map 8% reduce 0%
15/05/12 07:23:27 INFO mapreduce.Job:  map 9% reduce 0%
15/05/12 07:23:40 INFO mapreduce.Job:  map 10% reduce 0%
15/05/12 07:23:52 INFO mapreduce.Job:  map 11% reduce 0%
15/05/12 07:24:02 INFO mapreduce.Job:  map 100% reduce 100%
15/05/12 07:24:06 INFO mapreduce.Job: Job job_1431389162125_0001 failed with  state FAILED due to: Task failed task_1431389162125_0001_r_000000
Job failed as tasks failed. failedMaps:0 failedReduces:1

这是默认配置,每次都失败。

我插入到 xml 中的任何配置都已注释掉以找到此问题,但我仍然遇到仅在减少开始时作业失败的问题。

4

1 回答 1

0

Yarn 处理资源管理,还提供可以使用 MapReduce 和实时工作负载的批处理工作负载。

可以在 Yarn 容器级别以及映射器和减速器级别设置内存设置。以 Yarn 容器大小为增量请求内存。Mapper 和 reducer 任务在容器内运行。

mapreduce.map.memory.mb and mapreduce.reduce.memory.mb

上面的参数描述了map-reduce任务的内存上限,如果这个任务订阅的内存超过了这个限制,相应的容器将被杀死。

这些参数分别决定了可以分配给 mapper 和 reduce 任务的最大内存量。让我们看一个例子:Mapper 受配置参数 mapreduce.map.memory.mb 中定义的内存上限的限制。

然而,如果 yarn.scheduler.minimum-allocation-mb 的值大于 mapreduce.map.memory.mb 的这个值,那么 yarn.scheduler.minimum-allocation-mb 会受到尊重,并给出该大小的容器出去。

此参数需要仔细设置,如果设置不当,可能会导致性能不佳或 OutOfMemory 错误。

mapreduce.reduce.java.opts and mapreduce.map.java.opts

此属性值需要小于 mapreduce.map.memory.mb/mapreduce.reduce.memory.mb 中定义的 map/reduce 任务的上限,因为它应该适合 map/reduce 任务的内存分配。

于 2015-05-13T19:44:09.587 回答