yt.fido File Storage and Management

In times past, this module was used for moving data and storing it in long-term storage. Now it is primarily used as a mechanism for loading parameter files without user intervention – in the case of object storage and serialization. (See Storing and Loading Objects.) There is still quite a bit of code that might be useful, but recent versions of Enzo have largely made it obsolete.

However, the yt.fido.ParameterFileStore is still quite useful for object serialization!

class yt.fido.ParameterFileStore(in_memory=False)

This class is designed to be a semi-persistent storage for parameter files. By identifying each parameter file with a unique hash, objects can be stored independently of parameter files – when an object is loaded, the parameter file is as well, based on the hash. For storage concerns, only a few hundred will be retained in cache.

check_pf(pf)
This will ensure that the parameter file (pf) handed to it is recorded in the storage unit. In doing so, it will update path and “last_seen” information.
flush_db()
This flushes the storage to disk.
get_pf_ctid(ctid)
This returns a parameter file based on a CurrentTimeIdentifier.
get_pf_hash(hash)
This returns a parameter file based on a hash.
init_db()
This function ensures that the storage database exists and can be used.
insert_pf(pf)
This will insert a new pf and flush the database to disk.
read_db()
This will read the storage device from disk.
wipe_hash(hash)
This removes a hash corresponding to a parameter file from the storage.

Comments

Feel free to leave comments! If you've got a GMail account, you can use https://www.google.com/accounts/o8/id as your OpenID URL.
comments powered by Disqus

Previous topic

yt.extensions Extensions API

Next topic

yt.lagos.ParallelTools Parallel Helper Functions

This Page