|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.isi.pegasus.planner.catalog.site.impl.OSGMM
public class OSGMM
The OSGMM implementation of the Site Catalog interface. This implementation also has a method to generate the SRM property mappings to be used by Pegasus. The following pegasus properties are created for the sites that have the SRM information available.
pegasus.transfer.srm.[sitename].service.url pegasus.transfer.srm.[sitename].service.mountpoint
| Nested Class Summary | |
|---|---|
private class |
OSGMM.ListCallback
An inner class, that implements the StreamGobblerCallback to store all the lines in a List |
| Field Summary | |
|---|---|
static String |
DEFAULT_CONDOR_COLLECTOR
The default condor collector to query to for non LIGO VO's |
static String |
DEFAULT_CONDOR_COLLECTOR_PROPERTY_KEY
The property key without the pegasus prefix'es to get the condor collector host. |
static String |
DEFAULT_GRID
The default Grid to retreive the sites for. |
static String |
DEFAULT_GRID_PROPERTY_KEY
The property key without the pegasus prefix'es to get the grid. |
static String |
DEFAULT_LIGO_CONDOR_COLLECTOR
The default condor collector to query to for LIGO VO |
static boolean |
DEFAULT_RETRIEVE_VALIDATED_SITES
The default VO to use to query the condor collector. |
static String |
DEFAULT_RETRIEVE_VALIDATED_SITES_PROPERTY_KEY
The property key without the pegasus prefix'es to get the VO. |
static String |
DEFAULT_VO
The default VO to use to query the condor collector. |
static String |
DEFAULT_VO_PROPERTY_KEY
The property key without the pegasus prefix'es to get the VO. |
static String |
ENGAGE_VO
The name of the ENGAGE VO |
static String |
LIGO_VO
The name of the LIGO VO |
private String |
mCollectorHost
The collector host to query to. |
(package private) List<String> |
mCondorStatusError
The List storing the stderr of condor-status. |
(package private) List<String> |
mCondorStatusOutput
The List storing the output of condor-status. |
private String |
mGrid
The grid to which the user belongs to. |
private LogManager |
mLogger
The handle to the log manager. |
private SiteStore |
mSiteStore
The SiteStore object where information about the sites is stored. |
private String |
mVO
The VO to which the user belongs to. |
static String |
PEGASUS_PROPERTY_PREFIX
The pegasus property prefix. |
| Fields inherited from interface edu.isi.pegasus.planner.catalog.SiteCatalog |
|---|
c_prefix, VERSION |
| Fields inherited from interface edu.isi.pegasus.planner.catalog.Catalog |
|---|
DB_ALL_PREFIX |
| Constructor Summary | |
|---|---|
OSGMM()
The default constructor. |
|
| Method Summary | |
|---|---|
void |
close()
Closes the connection. |
boolean |
connect(Properties props)
Issues the condor status command, and stores the results retrieved back into a List. |
private static SiteInfo |
convertToSiteInfo(edu.clemson.SiteCatalogGenerator.Site s)
An adapter method that converts the Site object to the SiteInfo object corresponding to the site catalog schema version 2. |
private String |
createPropertyKey(String site,
String suffix)
Creates the property key |
Properties |
generateSRMProperties()
Generates SRM properties that can be used by Pegasus to do SRM URL substitution for the case where all the data is accessible on the worker nodes locally. |
Properties |
generateSRMProperties(String line)
Generates SRM properties that can be used by Pegasus to do SRM URL substitution for the case where all the data is accessible on the worker nodes locally for a particular site. |
int |
insert(SiteCatalogEntry entry)
Inserts a new mapping into the Site catalog. |
boolean |
isClosed()
Returns if the connection is closed or not. |
Set<String> |
list()
Lists the site handles for all the sites in the Site Catalog. |
int |
load(List<String> sites)
Loads up the Site Catalog implementation with the sites whose site handles are specified. |
SiteCatalogEntry |
lookup(String handle)
Retrieves the SiteCatalogEntry for a site. |
int |
remove(String handle)
Removes a site catalog entry matching the the handle. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DEFAULT_CONDOR_COLLECTOR_PROPERTY_KEY
public static final String PEGASUS_PROPERTY_PREFIX
public static final String ENGAGE_VO
public static final String DEFAULT_CONDOR_COLLECTOR
public static final String LIGO_VO
public static final String DEFAULT_LIGO_CONDOR_COLLECTOR
public static final String DEFAULT_VO_PROPERTY_KEY
public static final String DEFAULT_VO
public static final String DEFAULT_GRID_PROPERTY_KEY
public static final String DEFAULT_GRID
public static final String DEFAULT_RETRIEVE_VALIDATED_SITES_PROPERTY_KEY
public static final boolean DEFAULT_RETRIEVE_VALIDATED_SITES
List<String> mCondorStatusOutput
List<String> mCondorStatusError
private SiteStore mSiteStore
private LogManager mLogger
private String mVO
private String mCollectorHost
private String mGrid
| Constructor Detail |
|---|
public OSGMM()
| Method Detail |
|---|
private static SiteInfo convertToSiteInfo(edu.clemson.SiteCatalogGenerator.Site s)
throws Exception
s - the Site object to convert.
Exception
public int insert(SiteCatalogEntry entry)
throws SiteCatalogException
SiteCatalog
insert in interface SiteCatalogentry - the SiteCatalogEntry object that describes
a site.
SiteCatalogException - in case of error.
public Set<String> list()
throws SiteCatalogException
SiteCatalog
list in interface SiteCatalogSiteCatalogException - in case of error.
public int load(List<String> sites)
throws SiteCatalogException
load in interface SiteCatalogsites - the list of sites to be loaded.
SiteCatalogException - in case of error.
public SiteCatalogEntry lookup(String handle)
throws SiteCatalogException
SiteCatalogSiteCatalogEntry for a site.
lookup in interface SiteCataloghandle - the site handle / identifier.
null
if no match is found.
SiteCatalogException - in case of error.
public int remove(String handle)
throws SiteCatalogException
SiteCatalog
remove in interface SiteCataloghandle - the site handle / identifier.
SiteCatalogException - in case of error.public void close()
close in interface Catalog
public boolean connect(Properties props)
throws SiteCatalogException
connect in interface Catalogprops - is the property table with sufficient settings to
to connect to the implementation.
SiteCatalogExceptionpublic Properties generateSRMProperties()
public Properties generateSRMProperties(String line)
CIT_CMS_T2;srm://cit-se.ultralight.org:8443/srm/v2/server?SFN=/mnt/hadoop/osg;/mnt/hadoop/osg;/mnt/hadoop/osg;/mnt/hadoop,/mnt/hadoop;The properties created have the following keys
pegasus.transfer.srm.[sitename].service.url pegasus.transfer.srm.[sitename].service.mountpointwhere [sitename] is replaced by the name of the site.
line - the line from condor_status output for a site.
private String createPropertyKey(String site,
String suffix)
site - the name of sitesuffix - the suffix to be added to site.
public boolean isClosed()
isClosed in interface CatalogCatalog.close()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||