Class SiteCatalogEntry3
- java.lang.Object
-
- edu.isi.pegasus.planner.catalog.site.classes.SiteData
-
- edu.isi.pegasus.planner.catalog.site.classes.AbstractSiteData
-
- edu.isi.pegasus.planner.catalog.site.classes.SiteCatalogEntry3
-
- All Implemented Interfaces:
java.lang.Cloneable
public class SiteCatalogEntry3 extends AbstractSiteData
This data class describes a site in the site catalog.- Version:
- $Revision$
- Author:
- Karan Vahi
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.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 java.lang.String
mID
The site identifier.private Profiles
mProfiles
The profiles asscociated with the site.private java.util.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 java.lang.String
PEGASUS_BIN_DIR
The name of the environment variable PEGASUS_BIN_DIR.static java.lang.String
PEGASUS_HOME
The name of the environment variable PEGASUS_HOME.static java.lang.String
VDS_HOME
The name of the environment variable VDS_HOME.
-
Constructor Summary
Constructors Constructor Description SiteCatalogEntry3()
The default constructor.SiteCatalogEntry3(java.lang.String id)
The overloaded constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
accept(SiteDataVisitor visitor)
Accept method for the visitor interfacevoid
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.java.lang.Object
clone()
Returns the clone of the object.SysInfo.Architecture
getArchitecture()
Returns the architecture of the site.java.lang.String
getEnvironmentVariable(java.lang.String variable)
Returns an environment variable associated with the site.java.util.Iterator
getFileServerIterator()
Not implmented as yet.java.util.List
getFileServers()
Not implemented as yet.java.lang.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.java.util.Iterator<GridGateway>
getGridGatewayIterator()
Return an iterator to value set of the Map.java.util.List
getGridGateways()
Not implemented as yetHeadNodeFS
getHeadNodeFS()
Returns the headnode filesystem.java.lang.String
getInternalMountPointOfWorkDirectory()
Returns the work directory for the compute jobs on a site.SysInfo.OS
getOS()
Returns the OS of the site.java.lang.String
getOSRelease()
Returns the OS release of the site.java.lang.String
getOSVersion()
Returns the OS version of the site.java.lang.String
getPegasusHome()
Deprecated.Profiles
getProfiles()
Returns the profiles associated with the site.java.util.Iterator<ReplicaCatalog>
getReplicaCatalogIterator()
Return an iterator to the replica catalog associated with the site.java.lang.String
getSiteHandle()
Returns the site handle for the siteSysInfo
getSysInfo()
Returns the System Information associated with the Site.java.lang.String
getVDSHome()
Deprecated.VDSSysInfo
getVDSSysInfo()
Returns the sysinfo for the site.WorkerNodeFS
getWorkerNodeFS()
Returns the worker node filesystem.void
initialize(java.lang.String id)
Initializes the object.boolean
removeGridGateway(java.lang.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.void
setArchitecture(SysInfo.Architecture arch)
Sets the architecture of the site.void
setGlibc(java.lang.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(java.lang.String release)
Sets the OS release of the site.void
setOSVersion(java.lang.String version)
Sets the OS version of the site.void
setProfiles(Profiles profiles)
Sets the profiles associated with the file server.void
setSiteHandle(java.lang.String id)
Sets the site handle for the sitevoid
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(java.io.Writer writer, java.lang.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
-
-
-
-
Field Detail
-
PEGASUS_BIN_DIR
public static final java.lang.String PEGASUS_BIN_DIR
The name of the environment variable PEGASUS_BIN_DIR.- See Also:
- Constant Field Values
-
PEGASUS_HOME
public static final java.lang.String PEGASUS_HOME
The name of the environment variable PEGASUS_HOME.- See Also:
- Constant Field Values
-
VDS_HOME
public static final java.lang.String VDS_HOME
The name of the environment variable VDS_HOME.- See Also:
- Constant Field Values
-
mID
private java.lang.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 java.util.Map<GridGateway.JOB_TYPE,GridGateway> mGridGateways
Map of grid gateways at the site for submitting different job types.
-
mReplicaCatalogs
private java.util.List<ReplicaCatalog> mReplicaCatalogs
The list of replica catalog associated with the site.
-
-
Method Detail
-
getFileServerIterator
public java.util.Iterator getFileServerIterator()
Not implmented as yet.- Returns:
- UnsupportedOperationException
-
getFileServers
public java.util.List getFileServers()
Not implemented as yet.- Returns:
- UnsupportedOperationException
-
getGridGateways
public java.util.List getGridGateways()
Not implemented as yet- Returns:
- UnsupportedOperationException
-
initialize
public void initialize(java.lang.String id)
Initializes the object.- Parameters:
id
- the site identifier.
-
setSiteHandle
public void setSiteHandle(java.lang.String id)
Sets the site handle for the site- Parameters:
id
- the site identifier.
-
getSiteHandle
public java.lang.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(java.lang.String release)
Sets the OS release of the site.- Parameters:
release
- the os releaseof the site.
-
getOSRelease
public java.lang.String getOSRelease()
Returns the OS release of the site.- Returns:
- the OS
-
setOSVersion
public void setOSVersion(java.lang.String version)
Sets the OS version of the site.- Parameters:
version
- the os versionof the site.
-
getOSVersion
public java.lang.String getOSVersion()
Returns the OS version of the site.- Returns:
- the OS
-
setGlibc
public void setGlibc(java.lang.String version)
Sets the glibc version on the site.- Parameters:
version
- the glibc version of the site.
-
getGlibc
public java.lang.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 java.lang.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 java.lang.String getVDSHome()
Deprecated.Returns the value of VDS_HOME for a site.- Returns:
- value if set else null.
-
getPegasusHome
@Deprecated public java.lang.String getPegasusHome()
Deprecated.Returns the value of PEGASUS_HOME for a site.- Returns:
- value if set else null.
-
getEnvironmentVariable
public java.lang.String getEnvironmentVariable(java.lang.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
-
getGridGatewayIterator
public java.util.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(java.lang.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 java.util.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(java.io.Writer writer, java.lang.String indent) throws java.io.IOException
Writes out the xml description of the object.- Specified by:
toXML
in classAbstractSiteData
- 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:
java.io.IOException
- if something fishy happens to the stream.
-
clone
public java.lang.Object clone()
Returns the clone of the object.- Overrides:
clone
in classAbstractSiteData
- Returns:
- the clone
-
accept
public void accept(SiteDataVisitor visitor) throws java.io.IOException
Accept method for the visitor interface- Specified by:
accept
in classAbstractSiteData
- Parameters:
visitor
- the visitor- Throws:
java.io.IOException
- in case of error
-
-