Previous topic

disco.core — Client interface for Disco

Next topic

disco.func — Functions for constructing Disco jobs

This Page

disco.ddfs — Client interface for Disco Distributed Filesystem

See also: Disco Distributed Filesystem.

Note

Parameters below which are indicated as tags can be specified as a tag:// URL, or the name of the tag.

class disco.ddfs.DDFS(master=None, proxy=None, settings={})

Opens and encapsulates a connection to a DDFS master.

Parameter:master – address of the master, for instance disco://localhost.
blobs(tag, ignore_missing=True)

Walks the tag graph starting at tag.

Yields only the terminal nodes of the graph (blobs).

Parameter:ignore_missing (bool) – Whether or not missing tags will raise a disco.error.CommError.
delete(tag)
Delete tag.
exists(tag)
Returns whether or not tag exists.
get(tag)
Return the tag object stored at tag.
list(prefix='')
Return a list of all tags starting wtih prefix.
push(tag, files, replicas=None, retries=10, delayed=False, update=False)

Pushes a bunch of files to ddfs and tags them with tag.

Parameter:files (a list of paths, (path, name)-tuples, or (fileobject, name)-tuples.) – the files to push as blobs to DDFS. If names are provided, they will be used as prefixes by DDFS for the blobnames. Names may only contain chars in r'[^A-Za-z0-9_\-@:]'.
put(tag, urls)

Put the list of urls to the tag tag.

Warning

Generally speaking, concurrent applications should use DDFS.tag() instead.

tag(tag, urls, **kwargs)
Append the list of urls to the tag.
walk(tag, ignore_missing=True, tagpath=())

Walks the tag graph starting at tag.

Yields a 3-tuple (tagpath, tags, blobs).

Parameter:ignore_missing (bool) – Whether or not missing tags will raise a disco.error.CommError.