org.griphyn.cPlanner.poolinfo
Class Abstract

java.lang.Object
  extended by org.griphyn.cPlanner.poolinfo.PoolInfoProvider
      extended by org.griphyn.cPlanner.poolinfo.Abstract
Direct Known Subclasses:
Text, XML

public abstract class Abstract
extends PoolInfoProvider

An abstract implementation of the PoolInfoProvider. Implementations should extend it, only if they are statically loading information into a PoolConfig object. The object once populated contains all the contents of the catalog.

Version:
$Revision: 50 $
Author:
Karan Vahi
See Also:
mPoolConfig

Field Summary
protected  PoolConfig mPoolConfig
          Handle to the PoolConfig object
 
Fields inherited from class org.griphyn.cPlanner.poolinfo.PoolInfoProvider
mDeepStorageStructure, mLogger, mLogMsg, mPoolProvider, mProps, mStorageDir, mUserOpts, mWorkDir, PEGASUS_HOME, VDS_HOME
 
Constructor Summary
Abstract()
           
 
Method Summary
 List getGridFTPServers(String siteID)
          It returns all the gridftp servers corresponding to a specified pool.
 List getJobmanagers(String siteID)
          It returns all the jobmanagers corresponding to a specified site.
 List getJobmanagers(String siteID, String universe)
          It returns all the jobmanagers corresponding to a specified pool and universe.
 SiteInfo getPoolEntry(String siteID, String universe)
          Gets the pool information from the pool.config file on the basis of the name of the pool, and the universe.
 List getPoolProfile(String siteID)
          It returns the profile information associated with a particular pool.
 List getPools()
          It returns all the pools available in the site catalog
 SysInfo getSysinfo(String siteID)
          Returns the System information for a single site.
 Map getSysinfos(List siteids)
          Returns the System information for a bunch of sites.
 boolean removeGridFtp(String siteID, String urlPrefix)
          This is a soft state remove, that removes a gridftp server from a particular pool entry.
 boolean removeJobManager(String siteID, String universe, String jobManagerContact)
          This is a soft state remove, that removes a jobmanager from a particular pool entry.
 
Methods inherited from class org.griphyn.cPlanner.poolinfo.PoolInfoProvider
getEnvironmentVariable, getExecPoolWorkDir, getExecPoolWorkDir, getExecPoolWorkDir, getExecPoolWorkDir, getPegasusHome, getPoolMode, getPoolProfile, getSeMountPoint, getTXPoolEntry, getURLPrefix, getVDS_HOME, loadNonSingletonObjects, loadSingletonObjects, logMessage, nonSingletonInstance, selectGridFtp, selectLRC, selectWorkdir, singletonInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mPoolConfig

protected PoolConfig mPoolConfig
Handle to the PoolConfig object

Constructor Detail

Abstract

public Abstract()
Method Detail

getSysinfos

public Map getSysinfos(List siteids)
Returns the System information for a bunch of sites.

Specified by:
getSysinfos in class PoolInfoProvider
Parameters:
siteids - List The siteid whose system information is required
Returns:
Map The key is the siteid and the value is a SysInfo object
See Also:
SysInfo

getSysinfo

public SysInfo getSysinfo(String siteID)
Returns the System information for a single site.

Specified by:
getSysinfo in class PoolInfoProvider
Parameters:
siteID - String The site whose system information is requested
Returns:
SysInfo The system information as a SysInfo object
See Also:
SysInfo

getPoolEntry

public SiteInfo getPoolEntry(String siteID,
                             String universe)
Gets the pool information from the pool.config file on the basis of the name of the pool, and the universe.

Specified by:
getPoolEntry in class PoolInfoProvider
Parameters:
siteID - the name of the site
universe - the execution universe for the job
Returns:
the corresponding pool object for the entry if found else null

getPoolProfile

public List getPoolProfile(String siteID)
It returns the profile information associated with a particular pool. If the pool provider has no such information it should return null. The name of the object may purport that it is specific to GVDS format, but in fact it a tuple consisting of namespace, key and value that can be used by other Pool providers too.

Specified by:
getPoolProfile in class PoolInfoProvider
Parameters:
siteID - the name of the site, whose profile information you want.
Returns:
List of Profile objects null if the information about the site is not with the pool provider.
See Also:
Profile

getJobmanagers

public List getJobmanagers(String siteID)
It returns all the jobmanagers corresponding to a specified site.

Specified by:
getJobmanagers in class PoolInfoProvider
Parameters:
siteID - the name of the site at which the jobmanager runs.
Returns:
list of JobManager, each referring to one jobmanager contact string. An empty list if no jobmanagers found.

getJobmanagers

public List getJobmanagers(String siteID,
                           String universe)
It returns all the jobmanagers corresponding to a specified pool and universe.

Specified by:
getJobmanagers in class PoolInfoProvider
Parameters:
siteID - the name of the site at which the jobmanager runs.
universe - the gvds universe with which it is associated.
Returns:
list of JobManager, each referring to one jobmanager contact string. An empty list if no jobmanagers found.

getGridFTPServers

public List getGridFTPServers(String siteID)
It returns all the gridftp servers corresponding to a specified pool.

Specified by:
getGridFTPServers in class PoolInfoProvider
Parameters:
siteID - the name of the site at which the jobmanager runs.
Returns:
List of GridFTPServer, each referring to one GridFtp Server.

getPools

public List getPools()
It returns all the pools available in the site catalog

Specified by:
getPools in class PoolInfoProvider
Returns:
List of names of the pools available as String

removeJobManager

public boolean removeJobManager(String siteID,
                                String universe,
                                String jobManagerContact)
This is a soft state remove, that removes a jobmanager from a particular pool entry. The cause of this removal could be the inability to authenticate against it at runtime. The successful removal lead Pegasus not to schedule job on that particular jobmanager.

Specified by:
removeJobManager in class PoolInfoProvider
Parameters:
siteID - the name of the site at which the jobmanager runs.
universe - the gvds universe with which it is associated.
jobManagerContact - the contact string to the jobmanager.
Returns:
true if was able to remove the jobmanager from the cache false if unable to remove, or the matching entry is not found or if the implementing class does not maintain a soft state.

removeGridFtp

public boolean removeGridFtp(String siteID,
                             String urlPrefix)
This is a soft state remove, that removes a gridftp server from a particular pool entry. The cause of this removal could be the inability to authenticate against it at runtime. The successful removal lead Pegasus not to schedule any transfers on that particular gridftp server.

Specified by:
removeGridFtp in class PoolInfoProvider
Parameters:
siteID - the name of the site at which the gridftp runs.
urlPrefix - the url prefix containing the protocol,hostname and port.
Returns:
true if was able to remove the gridftp from the cache false if unable to remove, or the matching entry is not found or if the implementing class does not maintain a soft state. or the information about site is not in the site catalog.


Copyright © 2007 The University of Southern California. All Rights Reserved.