Did I find the right examples for you? yes no

All Samples(21)  |  Call(10)  |  Derive(0)  |  Import(11)

src/c/i/ciel-HEAD/src/python/ciel/runtime/producer.py   ciel(Download)
from ciel.runtime.block_store import get_own_netloc, producer_filename,\
    filename_for_ref
from ciel.public.references import SWDataValue, encode_datavalue, SW2_ConcreteReference, \
    SW2_StreamReference, SW2_CompletedReference, SW2_SocketStreamReference,\
    decode_datavalue_string
                return SWDataValue(self.refid, encode_datavalue(fp.read()))
        else:
            return SW2_ConcreteReference(self.refid, size_hint=self.current_size, location_hints=[get_own_netloc()])
 
    def update_chunk_size(self):

src/c/i/ciel-HEAD/src/python/ciel/runtime/util/load.py   ciel(Download)
import random
import uuid
from ciel.public.references import SW2_ConcreteReference, SW2_FetchReference, SWReferenceJSONEncoder
import sys
import time
                    print >>sys.stderr, 'Uploading %s to (%s)' % (block_name, ",".join(targets))
                    upload_extent_to_targets(input_file, block_name, start, finish, targets, packet_size)
                    conc_ref = SW2_ConcreteReference(block_name, finish - start, targets)
                    output_references.append(conc_ref)
 
                    print >>sys.stderr, 'Uploading %s to (%s)' % (input_filename, ",".join(targets))
                    upload_extent_to_targets(input_file, block_name, 0, block_size, targets, packet_size)
                    conc_ref = SW2_ConcreteReference(block_name, block_size, targets)
                    output_references.append(conc_ref)
 
 
            # The refs will be updated as uploads succeed.
            conc_ref = SW2_ConcreteReference(block_name, size)
            output_ref_dict[block_name] = conc_ref
            output_references.append(conc_ref)
    upload_string_to_targets(index, block_name, index_targets)
 
    index_ref = SW2_ConcreteReference(block_name, len(index), index_targets)
 
    return index_ref

src/c/i/ciel-HEAD/src/python/ciel/runtime/block_store.py   ciel(Download)
# XXX: Hack because urlparse doesn't nicely support custom schemes.
import urlparse
from ciel.public.references import SW2_ConcreteReference, SW2_StreamReference,\
    SW2_FetchReference, SW2_FixedReference, SWRealReference, SWErrorReference,\
    SWDataValue, decode_datavalue
    def generate_pin_refs(self):
        ret = []
        for id in self.pin_set:
            ret.append(SW2_ConcreteReference(id, os.path.getsize(self.filename(id)), [self.netloc]))
        return ret

src/c/i/ciel-HEAD/src/python/ciel/runtime/pycurl_data_fetch.py   ciel(Download)
from ciel.runtime.pycurl_thread import pycURLContext, do_from_curl_thread
from ciel.runtime.block_store import get_fetch_urls_for_ref, create_fetch_file_for_ref, get_own_netloc
from ciel.public.references import SW2_ConcreteReference, SW2_FetchReference
import ciel.runtime.remote_stat as remote_stat
 
    def result(self, success):
        self.completed = True
        del active_http_transfers[self.ref.id]
        if success:
            ref = SW2_ConcreteReference(self.ref.id, self.last_progress, [get_own_netloc()])

src/c/i/ciel-HEAD/src/python/ciel/runtime/fetcher.py   ciel(Download)
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
from ciel.public.references import SW2_ConcreteReference, SW2_StreamReference, SW2_SocketStreamReference,\
    SWDataValue, SWErrorReference, SW2_FixedReference, decode_datavalue,\
    SW2_FetchReference, decode_datavalue_string, encode_datavalue,\
        # for it directly.
        id = parsed_url.path[1:]
        ref = SW2_ConcreteReference(id, None)
        ref.add_location_hint(parsed_url.netloc)
    else:

src/c/i/ciel-HEAD/src/python/ciel/runtime/master/recovery.py   ciel(Download)
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
from ciel.public.references import SW2_ConcreteReference, SW2_TombstoneReference
from cherrypy.process import plugins
import urllib2
    def recover_local_blocks(self):
        if not self.block_store.is_empty():
            for block_name, block_size in self.block_store.block_list_generator():
                conc_ref = SW2_ConcreteReference(block_name, block_size)
                conc_ref.add_location_hint(self.block_store.netloc)
                break
            block_name, block_size = BLOCK_LIST_RECORD_STRUCT.unpack(record)
            conc_ref = SW2_ConcreteReference(block_name, block_size)
            conc_ref.add_location_hint(worker.netloc)
 

src/c/i/ciel-HEAD/src/python/ciel/runtime/executors/__init__.py   ciel(Download)
from __future__ import with_statement
 
from ciel.public.references import \
    SWRealReference, SW2_FutureReference, SWDataValue, \
    SWErrorReference, SW2_SweetheartReference,\

src/c/i/ciel-HEAD/src/python/ciel/runtime/util/start_job.py   ciel(Download)
from ciel.runtime.util.sw_pprint import sw_pprint
 
from ciel.public.references import SWReferenceJSONEncoder,json_decode_object_hook,\
    SW2_FutureReference, SWDataValue, SWErrorReference,\
    SW2_SocketStreamReference, SW2_StreamReference, SW2_ConcreteReference,\

src/c/i/ciel-HEAD/src/python/ciel/runtime/executors/proc.py   ciel(Download)
import ciel
import os
from ciel.public.references import SW2_ConcreteReference, SW2_SweetheartReference,\
    SW2_FixedReference, SW2_FutureReference, SWErrorReference
import pickle

src/c/i/ciel-HEAD/src/python/ciel/runtime/master/scheduling_policy.py   ciel(Download)
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
from ciel.public.references import SW2_SweetheartReference, SW2_ConcreteReference,\
    SW2_StreamReference
import random

  1 | 2  Next