コード例 #1
0
ファイル: disco_worker.py プロジェクト: chenhao7512/disco
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)
コード例 #2
0
ファイル: core.py プロジェクト: jseppanen/disco
 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
コード例 #3
0
ファイル: task.py プロジェクト: AlexArgus/disco
    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)
コード例 #4
0
    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)
コード例 #5
0
ファイル: worker.py プロジェクト: jseppanen/disco
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)
コード例 #6
0
    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)
コード例 #7
0
ファイル: core.py プロジェクト: jamesaimonetti/disco
    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
コード例 #8
0
ファイル: core.py プロジェクト: mshron/disco
    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
コード例 #9
0
    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
コード例 #10
0
ファイル: core.py プロジェクト: hmas/disco
    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
コード例 #11
0
 def map(e, params):
     x = bytes_to_str(load_oob(Task.master, params['job'], e))
     assert x == 'value:{0}'.format(e)
     yield 'good', ''
コード例 #12
0
ファイル: test_oob.py プロジェクト: caox/disco
 def map(e, params):
     x = bytes_to_str(load_oob(Task.master, params['job'], e))
     assert x == 'value:{0}'.format(e)
     yield 'good', ''
コード例 #13
0
ファイル: test_oob.py プロジェクト: Dieterbe/disco
 def map(e, params):
     x = load_oob(Task.master, params['job'], e)
     assert x == 'value:%s' % e
     yield 'good', ''
コード例 #14
0
 def map(e, params):
     x = load_oob(Task.master, params['job'], e)
     assert x == 'value:%s' % e
     yield 'good', ''
コード例 #15
0
ファイル: core.py プロジェクト: chenhao7512/disco
 def oob_get(self, name, key):
         return util.load_oob(self.host, name, key)