edu.isi.pegasus.planner.catalog.site.classes
Class SiteCatalogEntry

java.lang.Object
  extended by edu.isi.pegasus.planner.catalog.site.classes.SiteData
      extended by edu.isi.pegasus.planner.catalog.site.classes.AbstractSiteData
          extended by edu.isi.pegasus.planner.catalog.site.classes.SiteCatalogEntry
All Implemented Interfaces:
Cloneable

public class SiteCatalogEntry
extends AbstractSiteData

This data class describes a site in the site catalog.

Version:
$Revision: 5078 $
Author:
Karan Vahi

Field Summary
private  Map<GridGateway.JOB_TYPE,GridGateway> mGridGateways
          Map of grid gateways at the site for submitting different job types.
private  HeadNodeFS mHeadFS
          The handle to the head node filesystem.
private  String mID
          The site identifier.
private  Profiles mProfiles
          The profiles asscociated with the site.
private  List<ReplicaCatalog> mReplicaCatalogs
          The list of replica catalog associated with the site.
private  SysInfo mSysInfo
          The System Information for the Site.
private  WorkerNodeFS mWorkerFS
          The handle to the worker node filesystem.
static String PEGASUS_BIN_DIR
          The name of the environment variable PEGASUS_BIN_DIR.
static String PEGASUS_HOME
          The name of the environment variable PEGASUS_HOME.
static String VDS_HOME
          The name of the environment variable VDS_HOME.
 
Constructor Summary
SiteCatalogEntry()
          The default constructor.
SiteCatalogEntry(String id)
          The overloaded constructor.
 
Method Summary
 void addGridGateway(GridGateway g)
          Add a GridGateway to the site.
 void addProfile(Profile p)
          Adds a profile.
 void addReplicaCatalog(ReplicaCatalog catalog)
          Add a Replica Catalog to the site.
 Object clone()
          Returns the clone of the object.
 SysInfo.Architecture getArchitecture()
          Returns the architecture of the site.
 String getEnvironmentVariable(String variable)
          Returns an environment variable associated with the site.
 Iterator getFileServerIterator()
          Not implmented as yet.
 List getFileServers()
          Not implemented as yet.
 String getGlibc()
          Returns the glibc version of the site.
 GridGateway getGridGateway(GridGateway.JOB_TYPE type)
          Returns a grid gateway object corresponding to a job type.
 Iterator<GridGateway> getGridGatewayIterator()
          Return an iterator to value set of the Map.
 List getGridGateways()
          Not implemented as yet
 HeadNodeFS getHeadNodeFS()
          Returns the headnode filesystem.
 String getInternalMountPointOfWorkDirectory()
          Returns the work directory for the compute jobs on a site.
 SysInfo.OS getOS()
          Returns the OS of the site.
 String getOSRelease()
          Returns the OS release of the site.
 String getOSVersion()
          Returns the OS version of the site.
 String getPegasusHome()
          Deprecated. 
 Profiles getProfiles()
          Returns the profiles associated with the site.
 Iterator<ReplicaCatalog> getReplicaCatalogIterator()
          Return an iterator to the replica catalog associated with the site.
 String getSiteHandle()
          Returns the site handle for the site
 SysInfo getSysInfo()
          Returns the System Information associated with the Site.
 String getVDSHome()
          Deprecated. 
 VDSSysInfo getVDSSysInfo()
          Returns the sysinfo for the site.
 WorkerNodeFS getWorkerNodeFS()
          Returns the worker node filesystem.
 void initialize(String id)
          Initializes the object.
 boolean removeGridGateway(String contact)
          This is a soft state remove, that removes a GridGateway from a particular site.
 GridGateway selectGridGateway(GridGateway.JOB_TYPE type)
          Selects a grid gateway object corresponding to a job type.
 ReplicaCatalog selectReplicaCatalog()
          Selects a Random ReplicaCatalog.
 FileServer selectStorageFileServerForStageout()
          A convenience method that selects a file server for staging the data out to a site.
 void setArchitecture(SysInfo.Architecture arch)
          Sets the architecture of the site.
 void setGlibc(String version)
          Sets the glibc version on the site.
 void setHeadNodeFS(HeadNodeFS system)
          Sets the headnode filesystem.
 void setOS(SysInfo.OS os)
          Sets the OS of the site.
 void setOSRelease(String release)
          Sets the OS release of the site.
 void setOSVersion(String version)
          Sets the OS version of the site.
 void setProfiles(Profiles profiles)
          Sets the profiles associated with the file server.
 void setSiteHandle(String id)
          Sets the site handle for the site
 void setSysInfo(SysInfo sysinfo)
          Sets the System Information associated with the Site.
 void setVDSSysInfo(VDSSysInfo sysinfo)
          Sets the sysinfo for the site.
 void setWorkerNodeFS(WorkerNodeFS system)
          Sets the worker node filesystem.
 void toXML(Writer writer, String indent)
          Writes out the xml description of the object.
 
Methods inherited from class edu.isi.pegasus.planner.catalog.site.classes.AbstractSiteData
toString, toXML, writeAttribute
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PEGASUS_BIN_DIR

public static final String PEGASUS_BIN_DIR
The name of the environment variable PEGASUS_BIN_DIR.

See Also:
Constant Field Values

PEGASUS_HOME

public static final String PEGASUS_HOME
The name of the environment variable PEGASUS_HOME.

See Also:
Constant Field Values

VDS_HOME

public static final String VDS_HOME
The name of the environment variable VDS_HOME.

See Also:
Constant Field Values

mID

private String mID
The site identifier.


mSysInfo

private SysInfo mSysInfo
The System Information for the Site.


mProfiles

private Profiles mProfiles
The profiles asscociated with the site.


mHeadFS

private HeadNodeFS mHeadFS
The handle to the head node filesystem.


mWorkerFS

private WorkerNodeFS mWorkerFS
The handle to the worker node filesystem.


mGridGateways

private Map<GridGateway.JOB_TYPE,GridGateway> mGridGateways
Map of grid gateways at the site for submitting different job types.


mReplicaCatalogs

private List<ReplicaCatalog> mReplicaCatalogs
The list of replica catalog associated with the site.

Constructor Detail

SiteCatalogEntry

public SiteCatalogEntry()
The default constructor.


SiteCatalogEntry

public SiteCatalogEntry(String id)
The overloaded constructor.

Parameters:
id - the site identifier.
Method Detail

getFileServerIterator

public Iterator getFileServerIterator()
Not implmented as yet.

Returns:
UnsupportedOperationException

getFileServers

public List getFileServers()
Not implemented as yet.

Returns:
UnsupportedOperationException

getGridGateways

public List getGridGateways()
Not implemented as yet

Returns:
UnsupportedOperationException

initialize

public void initialize(String id)
Initializes the object.

Parameters:
id - the site identifier.

setSiteHandle

public void setSiteHandle(String id)
Sets the site handle for the site

Parameters:
id - the site identifier.

getSiteHandle

public String getSiteHandle()
Returns the site handle for the site

Returns:
the site identifier.

setSysInfo

public void setSysInfo(SysInfo sysinfo)
Sets the System Information associated with the Site.

Parameters:
sysinfo - the system information of the site.

getSysInfo

public SysInfo getSysInfo()
Returns the System Information associated with the Site.

Returns:
SysInfo the system information.

setArchitecture

public void setArchitecture(SysInfo.Architecture arch)
Sets the architecture of the site.

Parameters:
arch - the architecture.

getArchitecture

public SysInfo.Architecture getArchitecture()
Returns the architecture of the site.

Returns:
the architecture.

setOS

public void setOS(SysInfo.OS os)
Sets the OS of the site.

Parameters:
os - the os of the site.

getOS

public SysInfo.OS getOS()
Returns the OS of the site.

Returns:
the OS

setVDSSysInfo

public void setVDSSysInfo(VDSSysInfo sysinfo)
Sets the sysinfo for the site.

Parameters:
sysinfo -

getVDSSysInfo

public VDSSysInfo getVDSSysInfo()
Returns the sysinfo for the site.

Returns:
getVDSSysInfo

setOSRelease

public void setOSRelease(String release)
Sets the OS release of the site.

Parameters:
release - the os releaseof the site.

getOSRelease

public String getOSRelease()
Returns the OS release of the site.

Returns:
the OS

setOSVersion

public void setOSVersion(String version)
Sets the OS version of the site.

Parameters:
version - the os versionof the site.

getOSVersion

public String getOSVersion()
Returns the OS version of the site.

Returns:
the OS

setGlibc

public void setGlibc(String version)
Sets the glibc version on the site.

Parameters:
version - the glibc version of the site.

getGlibc

public String getGlibc()
Returns the glibc version of the site.

Returns:
the OS

setHeadNodeFS

public void setHeadNodeFS(HeadNodeFS system)
Sets the headnode filesystem.

Parameters:
system - the head node filesystem.

getHeadNodeFS

public HeadNodeFS getHeadNodeFS()
Returns the headnode filesystem.

Returns:
the head node filesystem.

setWorkerNodeFS

public void setWorkerNodeFS(WorkerNodeFS system)
Sets the worker node filesystem.

Parameters:
system - the head node filesystem.

getWorkerNodeFS

public WorkerNodeFS getWorkerNodeFS()
Returns the worker node filesystem.

Returns:
the worker node filesystem.

getInternalMountPointOfWorkDirectory

public String getInternalMountPointOfWorkDirectory()
Returns the work directory for the compute jobs on a site. Currently, the work directory is picked up from the head node shared filesystem.

Returns:
the internal mount point.

addProfile

public void addProfile(Profile p)
Adds a profile.

Parameters:
p - the profile to be added

setProfiles

public void setProfiles(Profiles profiles)
Sets the profiles associated with the file server.

Parameters:
profiles - the profiles.

getProfiles

public Profiles getProfiles()
Returns the profiles associated with the site.

Returns:
profiles.

getVDSHome

@Deprecated
public String getVDSHome()
Deprecated. 

Returns the value of VDS_HOME for a site.

Returns:
value if set else null.

getPegasusHome

@Deprecated
public String getPegasusHome()
Deprecated. 

Returns the value of PEGASUS_HOME for a site.

Returns:
value if set else null.

getEnvironmentVariable

public String getEnvironmentVariable(String variable)
Returns an environment variable associated with the site.

Parameters:
variable - the environment variable whose value is required.
Returns:
value of the environment variable if found, else null

getGridGateway

public GridGateway getGridGateway(GridGateway.JOB_TYPE type)
Returns a grid gateway object corresponding to a job type.

Parameters:
type - the job type
Returns:
GridGateway

selectGridGateway

public GridGateway selectGridGateway(GridGateway.JOB_TYPE type)
Selects a grid gateway object corresponding to a job type. It also defaults to other GridGateways if grid gateway not found for that job type.

Parameters:
type - the job type
Returns:
GridGateway

selectStorageFileServerForStageout

public FileServer selectStorageFileServerForStageout()
A convenience method that selects a file server for staging the data out to a site. It returns the file server to which the generated data is staged out / published. The FileServer selected is associated with the HeadNode Filesystem.

Returns:
the FileServer else null.

getGridGatewayIterator

public Iterator<GridGateway> getGridGatewayIterator()
Return an iterator to value set of the Map.

Returns:
Iterator

addGridGateway

public void addGridGateway(GridGateway g)
Add a GridGateway to the site.

Parameters:
g - the grid gateway to be added.

removeGridGateway

public boolean removeGridGateway(String contact)
This is a soft state remove, that removes a GridGateway from a particular site.

Parameters:
contact - the contact string for the grid gateway.
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.

getReplicaCatalogIterator

public Iterator<ReplicaCatalog> getReplicaCatalogIterator()
Return an iterator to the replica catalog associated with the site.

Returns:
Iterator

addReplicaCatalog

public void addReplicaCatalog(ReplicaCatalog catalog)
Add a Replica Catalog to the site.

Parameters:
catalog - the replica catalog to be added.

selectReplicaCatalog

public ReplicaCatalog selectReplicaCatalog()
Selects a Random ReplicaCatalog.

Returns:
ReplicaCatalog if more than one associates else returns null.

toXML

public void toXML(Writer writer,
                  String indent)
           throws IOException
Writes out the xml description of the object.

Specified by:
toXML in class AbstractSiteData
Parameters:
writer - is a Writer opened and ready for writing. This can also be a StringWriter for efficient output.
indent - the indent to be used.
Throws:
IOException - if something fishy happens to the stream.

clone

public Object clone()
Returns the clone of the object.

Overrides:
clone in class AbstractSiteData
Returns:
the clone


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