public class TaskHeartbeatThread extends Object
Constructor and Description |
---|
TaskHeartbeatThread(org.apache.hadoop.util.Progressable context,
long periodMillis)
Creates a new thread to keep a task alive
Does not start the thread until you call
start() |
TaskHeartbeatThread(org.apache.hadoop.mapreduce.TaskAttemptContext context)
Same as
#TaskHeartbeatThread(TaskAttemptContext, long)
but with a default period of 1 minute |
public TaskHeartbeatThread(org.apache.hadoop.util.Progressable context, long periodMillis)
start()
context
- the task attempt context, used to send progress signals to the taskperiodMillis
- how often to wake up and send a progress signal in millisecondspublic TaskHeartbeatThread(org.apache.hadoop.mapreduce.TaskAttemptContext context)
#TaskHeartbeatThread(TaskAttemptContext, long)
but with a default period of 1 minutepublic void start()
stop()
is calledpublic void stop()
try { ... } finally {heartBeat.stop()}}
to ensure that the
heartBeat is stopped. If the heartBeat remains alive failed jobs can remain 'running'
indefinitely.protected void progress()
Copyright © 2014. All rights reserved.