disco.task – Disco Tasks

This module defines objects for interfacing with tasks assigned by the master.

class disco.task.Task(host='', jobfile='', jobname='', master=None, disco_port=None, put_port=None, ddfs_data='', disco_data='', stage=None, group=None, grouping=None, taskid=-1)

Encapsulates the information specific to a particular task coming from the master.


The name of the host this task is running on.


The name of the job this task is part of.


The name of the master host for this task.


The phase which this task is part of. Currently either map or reduce.


The id of this task, assigned by the master.


A unique id for this particular task instance.


Gets an out-of-band result for the task with the key key.

Given the semantics of OOB results, this means that only the reduce phase can access results produced in the preceding map phase.

Returns:The name joined to the taskpath.
put(key, value)

Stores an out-of-band result value (bytes) with the key key.

Key must be unique in this job. Maximum key length is 256 characters. Only characters in the set [a-zA-Z_\-:0-9@] are allowed in the key.

Returns:Additional Job Data needed for instantiating the disco.job.Job on the node.