def get(key, job = None): try: job = job or this_name() return load_oob("http://" + this_master(), job, key) except comm.CommException, x: data_err("OOB key (%s) not found at %s: HTTP status '%s'" %\ (key, url, x.http_code), key)
def oob_get(self, name, key): try: return util.load_oob(self.host, name, key) except CommError, e: if e.http_code == 404: raise DiscoError("Unknown key or job name") raise
def get(self, 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. """ from disco.util import load_oob return load_oob(self.master, self.jobname, key)
def get(key, job=None): """ Gets an out-of-band result assigned with the key *key*. The job name *job* defaults to the current job. Given the semantics of OOB results (see above), this means that the default value is only good for the reduce phase which can access results produced in the preceding map phase. """ return load_oob('http://%s' % Task.master, job or Task.name, key)
def get(self, key, job=None): """ Gets an out-of-band result assigned with the key *key*. The job name *job* defaults to the current job. Given the semantics of OOB results (see above), this means that the default value is only good for the reduce phase which can access results produced in the preceding map phase. """ return util.load_oob(self.master, job or self.jobname, key)
def oob_get(self, name, key): """ Returns an out-of-band value assigned to *key* for the job *name*. See :mod:`disco.node.worker` for more information on using OOB. """ try: return util.load_oob(self.master, name, key) except CommError, e: if e.code == 404: raise DiscoError("Unknown key or job name") raise
def oob_get(self, jobname, key): """ Returns an out-of-band value assigned to *key* for the job. OOB data can be stored and retrieved for job tasks using :meth:`disco.task.Task.get` and :meth:`disco.task.Task.put`. """ try: return util.load_oob(self.master, jobname, key) except CommError, e: if e.code == 404: raise DiscoError("Unknown key or jobname") raise
def oob_get(self, jobname, key): """ Returns an out-of-band value assigned to *key* for the job. OOB data can be stored and retrieved for job tasks using :meth:`disco.task.Task.get` and :meth:`disco.task.Task.put`. """ try: return util.load_oob(self.master, jobname, key) except CommError as e: if e.code == 404: raise DiscoError("Unknown key or jobname") raise
def map(e, params): x = bytes_to_str(load_oob(Task.master, params['job'], e)) assert x == 'value:{0}'.format(e) yield 'good', ''
def map(e, params): x = load_oob(Task.master, params['job'], e) assert x == 'value:%s' % e yield 'good', ''
def oob_get(self, name, key): return util.load_oob(self.host, name, key)