public class OSGMM extends java.lang.Object implements SiteCatalog
pegasus.transfer.srm.[sitename].service.url pegasus.transfer.srm.[sitename].service.mountpoint
Modifier and Type | Class and Description |
---|---|
private static 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 java.lang.String |
DEFAULT_CONDOR_COLLECTOR
The default condor collector to query to for non LIGO VO's
|
static java.lang.String |
DEFAULT_CONDOR_COLLECTOR_PROPERTY_KEY
The property key without the pegasus prefix'es to get the condor collector host.
|
static java.lang.String |
DEFAULT_GRID
The default Grid to retreive the sites for.
|
static java.lang.String |
DEFAULT_GRID_PROPERTY_KEY
The property key without the pegasus prefix'es to get the grid.
|
static java.lang.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 java.lang.String |
DEFAULT_RETRIEVE_VALIDATED_SITES_PROPERTY_KEY
The property key without the pegasus prefix'es to get the VO.
|
static java.lang.String |
DEFAULT_VO
The default VO to use to query the condor collector.
|
static java.lang.String |
DEFAULT_VO_PROPERTY_KEY
The property key without the pegasus prefix'es to get the VO.
|
static java.lang.String |
ENGAGE_VO
The name of the ENGAGE VO
|
static java.lang.String |
LIGO_VO
The name of the LIGO VO
|
private java.lang.String |
mCollectorHost
The collector host to query to.
|
(package private) java.util.List<java.lang.String> |
mCondorStatusError
The List storing the stderr of condor-status.
|
(package private) java.util.List<java.lang.String> |
mCondorStatusOutput
The List storing the output of condor-status.
|
private java.lang.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 java.lang.String |
mVO
The VO to which the user belongs to.
|
static java.lang.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(java.util.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 java.lang.String |
createPropertyKey(java.lang.String site,
java.lang.String suffix)
Creates the property key
|
java.util.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.
|
java.util.Properties |
generateSRMProperties(java.lang.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.
|
java.util.Set<java.lang.String> |
list()
Lists the site handles for all the sites in the Site Catalog.
|
int |
load(java.util.List<java.lang.String> sites)
Loads up the Site Catalog implementation with the sites whose
site handles are specified.
|
SiteCatalogEntry |
lookup(java.lang.String handle)
Retrieves the
SiteCatalogEntry for a site. |
int |
remove(java.lang.String handle)
Removes a site catalog entry matching the the handle.
|
public static final java.lang.String DEFAULT_CONDOR_COLLECTOR_PROPERTY_KEY
public static final java.lang.String PEGASUS_PROPERTY_PREFIX
public static final java.lang.String ENGAGE_VO
public static final java.lang.String DEFAULT_CONDOR_COLLECTOR
public static final java.lang.String LIGO_VO
public static final java.lang.String DEFAULT_LIGO_CONDOR_COLLECTOR
public static final java.lang.String DEFAULT_VO_PROPERTY_KEY
public static final java.lang.String DEFAULT_VO
public static final java.lang.String DEFAULT_GRID_PROPERTY_KEY
public static final java.lang.String DEFAULT_GRID
public static final java.lang.String DEFAULT_RETRIEVE_VALIDATED_SITES_PROPERTY_KEY
public static final boolean DEFAULT_RETRIEVE_VALIDATED_SITES
java.util.List<java.lang.String> mCondorStatusOutput
java.util.List<java.lang.String> mCondorStatusError
private SiteStore mSiteStore
private LogManager mLogger
private java.lang.String mVO
private java.lang.String mCollectorHost
private java.lang.String mGrid
private static SiteInfo convertToSiteInfo(edu.clemson.SiteCatalogGenerator.Site s) throws java.lang.Exception
s
- the Site object to convert.java.lang.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 java.util.Set<java.lang.String> list() throws SiteCatalogException
SiteCatalog
list
in interface SiteCatalog
SiteCatalogException
- in case of error.public int load(java.util.List<java.lang.String> sites) throws SiteCatalogException
load
in interface SiteCatalog
sites
- the list of sites to be loaded.SiteCatalogException
- in case of error.public SiteCatalogEntry lookup(java.lang.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(java.lang.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(java.util.Properties props) throws SiteCatalogException
connect
in interface Catalog
props
- is the property table with sufficient settings to
to connect to the implementation.SiteCatalogException
public java.util.Properties generateSRMProperties()
public java.util.Properties generateSRMProperties(java.lang.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 java.lang.String createPropertyKey(java.lang.String site, java.lang.String suffix)
site
- the name of sitesuffix
- the suffix to be added to site.public boolean isClosed()
isClosed
in interface Catalog
Catalog.close()