java hadoop 超时_hadoop map端的超时参数

当Hadoop任务10分钟未报告进度,会被杀死。对于CPU密集型任务,如模拟,应定期报告进度以避免超时。任务卡死可能由于SocketTimeoutException,通常在等待通道准备好读取时超时。Hadoop通过dfs.client.socket-timeout配置超时,超时无数据读取则抛出异常。DFSInputStream在遇到超时时会尝试重试或切换DataNode。
摘要由CSDN通过智能技术生成

Report progress

If your task reports no progress for 10 minutes (see the mapred.task.timeout property) then it will be killed by Hadoop. Most tasks don’t encounter this situation since they report progress implicitly by reading input and writing output. However, some jobs which don’t process records in this way may fall foul of this behavior and have their tasks killed. Simulations are a good example, since they do a lot of CPU-intensive processing in each map and typically only write the result at the end of the computation. They should be written in such a way as to report progress on a regular basis (more frequently than every 10 minutes). This may be achieved in a number of ways:

Call setStatus() on Reporter to set a human-readable description of

the task’s progress

Call incrCounter() on Reporter to increment a user counter

Call progress() on Reporter to tell Hadoop that your task is still there (and making progress)

但是,事情还没完,集群中会不定时地有任务卡死在某个点上导致任务无法继续下去:

"main" prio=10 tid=0x000000000293f000 nid=0x1e06 runnable [0x0000000041b20000]

java.lang.Thread.State: RUNNABLE

at sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)

at sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:228)

at sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:81)

at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:87)

- locked <0x00000006e243c3f0> (a sun.nio.ch.Util

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值