dCachePnfs
index
/opt/d-cache/toolkit/development-api/python/API_1/dCachePnfs.py

 
Modules
       
logging
os
popen2
pwd
stat
sys
threading
time

 
Classes
       
PnfsEntry
PoolReplicaInfo
__builtin__.object
PnfsSizeWalker
PnfsReplicaSizeWalker
ThreadedPnfsReplicaSizeWalker

 
class PnfsEntry
     Methods defined here:
__init__(self, admin, pnfsid)
path(self)
replica_info_string(self, confirm=False)

 
class PnfsReplicaSizeWalker(PnfsSizeWalker)
    
Method resolution order:
PnfsReplicaSizeWalker
PnfsSizeWalker
__builtin__.object

Methods defined here:
__init__(self, admin, base_dir, **kw)
get_pools(self)
get_size(self, filename, dirname=None)
map_replica(self, pnfsid)
register_pool_replicas(self, pool, admin=None)
register_replicas(self)
run(self)

Methods inherited from PnfsSizeWalker:
get_directories(self)
Returns a list of all the directories.
get_directory_size(self, dir)
get_files(self)
get_pnfs_size(self, filename, dirname=None)
get_pnfsid(self, filename)
Returns the pnfsid of a given file.
get_total_size(self)
get_uid(self, file)
get_user(self, file)
map_user(self, uid)
verify_pnfs_dir(self, dir)
Verify that the directory `dir` is on a PNFS filesystem
visitor(self, arg, dirname, names)
walk(self, top, func, arg)

Data and other attributes inherited from PnfsSizeWalker:
__dict__ = <dictproxy object>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'PnfsSizeWalker' objects>
list of weak references to the object (if defined)

 
class PnfsSizeWalker(__builtin__.object)
    Given a base directory, recursively look up all the children file pnfsids.
 
  Methods defined here:
__init__(self, base_dir, log_level=20, **kw)
get_directories(self)
Returns a list of all the directories.
get_directory_size(self, dir)
get_files(self)
get_pnfs_size(self, filename, dirname=None)
get_pnfsid(self, filename)
Returns the pnfsid of a given file.
get_size = get_pnfs_size(self, filename, dirname=None)
get_total_size(self)
get_uid(self, file)
get_user(self, file)
map_user(self, uid)
run(self)
verify_pnfs_dir(self, dir)
Verify that the directory `dir` is on a PNFS filesystem
visitor(self, arg, dirname, names)
walk(self, top, func, arg)

Data and other attributes defined here:
__dict__ = <dictproxy object>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'PnfsSizeWalker' objects>
list of weak references to the object (if defined)

 
class PoolReplicaInfo
     Methods defined here:
__eq__(self, other)
__init__(self, info_string)
parse_si(self, si_string)
parse_state(self, state_string)
Example state string: '<-P-------E-(0)[0]>'

 
class ThreadedPnfsReplicaSizeWalker(PnfsReplicaSizeWalker)
    
Method resolution order:
ThreadedPnfsReplicaSizeWalker
PnfsReplicaSizeWalker
PnfsSizeWalker
__builtin__.object

Methods defined here:
register_replicas(self)
Map pnfsids to their locations on the pools.
 
Since polling each pool is expensive, this is done using
a queue and threads.

Methods inherited from PnfsReplicaSizeWalker:
__init__(self, admin, base_dir, **kw)
get_pools(self)
get_size(self, filename, dirname=None)
map_replica(self, pnfsid)
register_pool_replicas(self, pool, admin=None)
run(self)

Methods inherited from PnfsSizeWalker:
get_directories(self)
Returns a list of all the directories.
get_directory_size(self, dir)
get_files(self)
get_pnfs_size(self, filename, dirname=None)
get_pnfsid(self, filename)
Returns the pnfsid of a given file.
get_total_size(self)
get_uid(self, file)
get_user(self, file)
map_user(self, uid)
verify_pnfs_dir(self, dir)
Verify that the directory `dir` is on a PNFS filesystem
visitor(self, arg, dirname, names)
walk(self, top, func, arg)

Data and other attributes inherited from PnfsSizeWalker:
__dict__ = <dictproxy object>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'PnfsSizeWalker' objects>
list of weak references to the object (if defined)

 
Data
        NUM_WORKERS = 8
PnfsManager = 'PnfsManager'
PoolManager = 'PoolManager'
WORKER_POLL_INTERVAL = 1
log = <logging.Logger instance>