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.
- host¶
The name of the host this task is running on.
- master¶
The name of the master host for this task.
- taskid¶
The id of this task, assigned by the master.
- uid¶
A unique id for this particular task instance.
- get(key)¶
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.
- path(name)¶
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.
- disco.task.jobdata(*objs)¶
Returns: Additional Job Data needed for instantiating the disco.job.Job on the node.