public class OSGMM extends Object implements SiteCatalog
pegasus.transfer.srm.[sitename].service.url pegasus.transfer.srm.[sitename].service.mountpoint
Modifier and Type | Class and Description |
---|---|
private class |
OSGMM.ListCallback
An inner class, that implements the StreamGobblerCallback to store all
the lines in a List
|
Modifier and Type | Field and Description |
---|---|
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.
|
c_prefix, VERSION
DB_ALL_PREFIX
Constructor and Description |
---|
OSGMM()
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
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
private SiteStore mSiteStore
private LogManager mLogger
private String mVO
private String mCollectorHost
private String mGrid
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 SiteCatalog
entry
- the SiteCatalogEntry
object that describes
a site.SiteCatalogException
- in case of error.public Set<String> list() throws SiteCatalogException
SiteCatalog
list
in interface SiteCatalog
SiteCatalogException
- in case of error.public int load(List<String> sites) throws SiteCatalogException
load
in interface SiteCatalog
sites
- the list of sites to be loaded.SiteCatalogException
- in case of error.public SiteCatalogEntry lookup(String handle) throws SiteCatalogException
SiteCatalog
SiteCatalogEntry
for a site.lookup
in interface SiteCatalog
handle
- 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 SiteCatalog
handle
- the site handle / identifier.SiteCatalogException
- in case of error.public void close()
public boolean connect(Properties props) throws SiteCatalogException
connect
in interface Catalog
props
- is the property table with sufficient settings to
to connect to the implementation.SiteCatalogException
public 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 Catalog
Catalog.close()
Copyright © 2011 The University of Southern California. All Rights Reserved.