提交命令行:hadoop jar /opt/hadoop-1.0.0/hadoop-examples-1.0.0.jar wordcount /user/admin/in/yellow.txt /user/admin/out/3
JobTracker已生成JobInProgress(job_201404200630_0001),包括以下TaskInProgress:
maps[0](task_201404200630_0001_m_000000)
maps[1](task_201404200630_0001_m_000001)
maps[2](task_201404200630_0001_m_000002)
reduces[0](task_201404200630_0001_r_000000)
reduces[1](task_201404200630_0001_r_000001)
cleanup[0](task_201404200630_0001_m_000003,map的cleanup)
cleanup[1](task_201404200630_0001_r_000002,reduce的cleanup)
setup[0](task_201404200630_0001_m_000004,map的setup)
setup[1](task_201404200630_0001_r_000003,reduce的setup)
RPC请求:heartbeat from10.1.1.102
处理:获得setup[0](TaskInProgress,attempt_201404200630_0001_m_000004),封装成MapTask(attempt_201404200630_0001_m_000004_0),再封装成LaunchTaskAction
返回:1个LaunchTaskAction(setup[0])
RPC请求:heartbeat from10.1.1.103
处理:没有获得Task
返回: []
RPC请求:heartbeat from10.1.1.102
处理: Task( attempt_201404200630_0001_m_000004)成功——>setup[0](task_201404200630_0001_m_000004)成功
获得maps[0](task_201404200630_0001_m_000000),封装成MapTask(attempt_201404200630_0001_m_000000_0),再封装成LaunchTaskAction
获得maps[1](task_201404200630_0001_m_000001),封装成MapTask(attempt_201404200630_0001_m_000001_0),再封装成LaunchTaskAction
获得setup[0](attempt_201404200630_0001_m_000004_0),再封装成KillTaskAction
返回:2个LaunchTaskAction(maps[0],maps[1]),1个KillTaskAction(setup[0])
RPC请求:heartbeat from10.1.1.103
处理:获得maps[2](task_201404200630_0001_m_000002),封装成MapTask(attempt_201404200630_0001_m_000002_0),再封装成LaunchTaskAction
返回: 1个LaunchTaskAction(maps[2])
RPC请求:heartbeat from10.1.1.102
处理: Task( attempt_201404200630_0001_m_000000_0)成功——>maps[0](task_201404200630_0001_m_000009)成功
Task( attempt_201404200630_0001_m_000001_0)成功——>maps[1](task_201404200630_0001_m_000001)成功
获得maps[2](task_201404200630_0001_m_000002),封装成MapTask(attempt_201404200630_0001_m_000002_1),再封装成LaunchTaskAction
获得reduces[0](task_201404200630_0001_r_000000),封装成ReduceTask(attempt_201404200630_0001_r_000000_0),再封装成LaunchTaskAction
返回:2个LaunchTaskAction(maps[2]、reduces[0])
RPC请求:heartbeat from10.1.1.103
处理:Task( attempt_201404200630_0001_m_000002_0)成功——>maps[2](task_201404200630_0001_m_000002)成功
获得reduces[1](task_201404200630_0001_r_000001),封装成ReduceTask(attempt_201404200630_0001_r_000001_0),再封装成LaunchTaskAction
返回:1个LaunchTaskAction(reduces[1])
RPC请求:heartbeat from10.1.1.102
处理:Task( attempt_201404200630_0001_m_000002_1)成功——>maps[2](task_201404200630_0001_m_000002)已经成功,故需要将其KILL
Task( attempt_201404200630_0001_r_000000_0 RUNNING ——> reduces[0](task_201404200630_0001_r_000000)RUNNING
返回:1个KillTaskAction(maps[2],attempt_201404200630_0001_m_000002_1)
RPC请求:heartbeat from10.1.1.103
处理:Task(attempt_201404200630_0001_r_000001_0) COMMIT_PENDING-->reduces[1](task_201404200630_0001_r_000001)COMMIT_PENDING
返回:1个CommitTaskAction(reduces[1],attempt_201404200630_0001_r_000001_0)
RPC请求:heartbeat from10.1.1.102
处理:Task(attempt_201404200630_0001_r_000000_0) COMMIT_PENDING-->reduces[0](task_201404200630_0001_r_000000)COMMIT_PENDING
返回:1个CommitTaskAction(reduces[0],attempt_201404200630_0001_r_000000_0)
RPC请求:heartbeat from10.1.1.103
处理:Task(attempt_201404200630_0001_r_000001_0) SUCCEEDED-->reduces[1](task_201404200630_0001_r_000001)SUCCEEDED
返回:1个KillTaskAction(reduces[1],attempt_201404200630_0001_r_000001_0)
RPC请求:heartbeat from10.1.1.102
处理:Task(attempt_201404200630_0001_r_000000_0) SUCCEEDED-->reduces[0](task_201404200630_0001_r_000000)SUCCEEDED
返回:1个LaunchTaskAction(cleanup[0],attempt_201404200630_0001_m_000003_0),1个KillTaskAction(reduces[0],attempt_201404200630_0001_r_000000_0)
RPC请求:heartbeat from 10.1.1.103
处理:
返回:[]
RPC请求:heartbeat from10.1.1.102
处理:Task(attempt_201404200630_0001_m_000003_0) SUCCEEDED-->cleanup[0](task_201404200630_0001_m_000003)SUCCEEDED
返回:KillJobAction(KILL_JOB:job_201404200630_0001)
RPC请求:heartbeat from10.1.1.103
处理:
返回:KillJobAction(KILL_JOB:job_201404200630_0001)
可见10.1.1.102执行了以下Task:
setup[0](Map的setup):Launch->RUNNING->SUCCEED->KILL
maps[0]:Launch->RUNNING-> SUCCEED
maps[1]:Launch->RUNNING-> SUCCEED
maps[2]:Launch->RUNNING-> SUCCEED->KILL
reduces[0]:Launch->RUNNING->COMMIT_PENDING->COMMIT->SUCCEED->KILL
cleanup[0](Map的cleanup):Launch->RUNNING->SUCCEED
Job: KILL
10.1.2.103执行了以下Task:
maps[2]:Launch->RUNNING-> SUCCEED
reduces[1]:Launch->RUNNING->COMMIT_PENDING->COMMIT->SUCCEED->KILL
Job: KILL
而setup[1](Reduce的setup)、cleanup[1](Reduce的cleanup)没有执行。