web-dev-qa-db-ja.com

「タスクのattempt_201104251139_0295_r_000006_0が600秒間ステータスを報告できませんでした」を修正する方法。

データセットから情報を抽出するmapreduceジョブを作成しました。データセットは、映画に関するユーザーの評価です。ユーザー数は約25万人、映画の数は約30万人です。マップの出力は_<user, <movie, rating>*> and <movie,<user,rating>*>_です。レデューサーでは、これらのペアを処理します。

しかし、ジョブを実行すると、マッパーは期待どおりに完了しますが、レデューサーは常に不平を言います

_Task attempt_* failed to report status for 600 seconds.
_

これはステータスの更新に失敗したためであることがわかっているため、次のようにコードにcontext.progress()への呼び出しを追加しました。

_int count = 0;
while (values.hasNext()) {
  if (count++ % 100 == 0) {
    context.progress();
  }
  /*other code here*/
}
_

残念ながら、これは役に立ちません。それでも、多くの削減タスクが失敗しました。

ここにログがあります:

_Task attempt_201104251139_0295_r_000014_1 failed to report status for 600 seconds. Killing!
11/05/03 10:09:09 INFO mapred.JobClient: Task Id : attempt_201104251139_0295_r_000012_1, Status : FAILED
Task attempt_201104251139_0295_r_000012_1 failed to report status for 600 seconds. Killing!
11/05/03 10:09:09 INFO mapred.JobClient: Task Id : attempt_201104251139_0295_r_000006_1, Status : FAILED
Task attempt_201104251139_0295_r_000006_1 failed to report status for 600 seconds. Killing!
_

ところで、このエラーは、reduce to copyフェーズで発生しました、ログには次のように書かれています:

_reduce > copy (28 of 31 at 26.69 MB/s) > :Lost task tracker: tracker_hadoop-56:localhost/127.0.0.1:34385
_

助けてくれてありがとう。

24
user572138

最も簡単な方法は、この構成パラメーターを設定することです。

<property>
  <name>mapred.task.timeout</name>
  <value>1800000</value> <!-- 30 minutes -->
</property>

mapred-site.xml

26
wlk

最も簡単な別の方法は、プログラム内のジョブ構成で設定することです

 Configuration conf=new Configuration();
 long milliSeconds = 1000*60*60; <default is 600000, likewise can give any value)
 conf.setLong("mapred.task.timeout", milliSeconds);

**設定する前に、mapred.task.timeoutとmapreduce.task.timeoutのどちらが正しいプロパティ名かについて、jobtracker GUIのジョブファイル(job.xml)ファイル内を確認してください。 。 。ジョブの実行中に、ジョブファイルで再度チェックして、そのプロパティが設定値に従って変更されているかどうかを確認します。

15
Moncy Augustin

新しいバージョンでは、この link で説明されているように、パラメータの名前がmapreduce.task.timeoutに変更されています(task.timeoutを検索)。さらに、上記のリンクで説明されているように、このタイムアウトを無効にすることもできます。

タスクが入力を読み取ったり、出力を書き込んだり、ステータス文字列を更新したりしない場合、タスクが終了するまでのミリ秒数。値0はタイムアウトを無効にします。

以下は、mapred-site.xmlの設定例です。

<property>
  <name>mapreduce.task.timeout</name>
  <value>0</value> <!-- A value of 0 disables the timeout -->
</property>
11
keelar

Hiveクエリとそのタイムアウトがある場合は、上記の構成を次のように設定できます。

set mapred.tasktracker.expiry.interval = 1800000;

set mapred.task.timeout = 1800000;

3
Animesh Raj Jha

から https://issues.Apache.org/jira/browse/HADOOP-176

原因は次のとおりです。

1. Tasktrackers run the maps successfully
2. Map outputs are served by jetty servers on the TTs.
3. All the reduce tasks connects to all the TT where maps are run. 
4. since there are lots of reduces wanting to connect the map output server, the jetty servers run out of threads (default 40)
5. tasktrackers continue to make periodic heartbeats to JT, so that they are not dead, but their jetty servers are (temporarily) down.
1
Bohdan