public void handleTakeTask(org.jboss.netty.handler.codec.http.HttpRequest request,
Take a task from the queue to execute. Post body must contain a workerId key, which must also be passed back
when finishing a task. Tasks are returned as a json object with taskId, jobId, clusterId, taskName and nodeId
as key value pairs, and with a config key whose value is a json object with all the configuration settings.
request - The request to take a task.
responder - Responder to send the response.
public void handleFinishTask(org.jboss.netty.handler.codec.http.HttpRequest request,
Finish a previously taken task by reporting a status code for execution of the task. Post body must contain
"workerId", "taskId", and "status" keys or a 400 is returned. A non-zero status indicates task failure.
If there was an error, logs can be stored by including "stdout" and "stderr" key values. Additional key values can
be returned as a json object assigned to the "result" key. These key values will be included in the config section
of future tasks that must take place on the node. If the worker id does not match the worker that took the task,
a 417 error is returned. This includes the case where the task is timed out by the server and the original
provisioner comes back and tries to finish the task.