public class Default extends Object implements ReplicaSelector
In order to use the replica selector implemented by this class,
- the property pegasus.selector.replica must be set to value Default, or
the property should be left undefined in the properties.
| Modifier and Type | Field and Description |
|---|---|
private static String |
FILE_URLS_PRIORITY_KEY |
private static String |
mDescription
A short description of the replica selector.
|
protected edu.isi.pegasus.common.logging.LogManager |
mLogger
The handle to the logging object that is used to log the various debug
messages.
|
protected edu.isi.pegasus.planner.common.PegasusProperties |
mProps
The properties object containing the properties passed to the planner.
|
private static String |
NON_PREFERRED_SITE_PRIORITY_KEY |
private static String |
PREFERRED_SITE_PRIORITY_KEY |
LOCAL_SITE_HANDLE, PRIORITY_KEY, VERSION| Constructor and Description |
|---|
Default(edu.isi.pegasus.planner.common.PegasusProperties properties)
The overloaded constructor, that is called by load method.
|
| Modifier and Type | Method and Description |
|---|---|
String |
description()
Returns a short description of the replica selector.
|
boolean |
removeFileURL(edu.isi.pegasus.planner.catalog.replica.ReplicaCatalogEntry rce,
String preferredSite,
boolean allowLocalFileURLs)
A convenience function that determines whether we should be removing a
file URL from replica selection or not.
|
protected boolean |
removeFileURL(String pfn,
String site,
String preferredSite,
boolean allowLocalFileURLs)
A convenience function that determines whether we should be removing a
file URL from replica selection or not.
|
edu.isi.pegasus.planner.classes.ReplicaLocation |
selectAndOrderReplicas(edu.isi.pegasus.planner.classes.ReplicaLocation rl,
String preferredSite,
boolean allowLocalFileURLs)
This orders all valid location amongst all the locations returned by the
Replica Mechanism.
|
edu.isi.pegasus.planner.catalog.replica.ReplicaCatalogEntry |
selectReplica(edu.isi.pegasus.planner.classes.ReplicaLocation candidates,
String preferredSite,
boolean allowLocalFileURLs)
This chooses a location amongst all the locations returned by the replica
location service.
|
private static String mDescription
protected edu.isi.pegasus.common.logging.LogManager mLogger
protected edu.isi.pegasus.planner.common.PegasusProperties mProps
private static final String FILE_URLS_PRIORITY_KEY
private static final String PREFERRED_SITE_PRIORITY_KEY
private static final String NON_PREFERRED_SITE_PRIORITY_KEY
public Default(edu.isi.pegasus.planner.common.PegasusProperties properties)
properties - the PegasusProperties object containing all
the properties required by Pegasus.public edu.isi.pegasus.planner.catalog.replica.ReplicaCatalogEntry selectReplica(edu.isi.pegasus.planner.classes.ReplicaLocation candidates,
String preferredSite,
boolean allowLocalFileURLs)
selectReplica in interface ReplicaSelectorcandidates - the ReplicaLocation object containing all
the pfn's associated with that LFN.preferredSite - the preffered site for picking up the replicas.allowLocalFileURLs - indicates whether Replica Selector can select a replica
on the local site / submit host.ReplicaCatalogEntry corresponding to the location selected.org.griphyn.cPlanner.classes.ReplicaLocationpublic edu.isi.pegasus.planner.classes.ReplicaLocation selectAndOrderReplicas(edu.isi.pegasus.planner.classes.ReplicaLocation rl,
String preferredSite,
boolean allowLocalFileURLs)
selectAndOrderReplicas in interface ReplicaSelectorrl - the ReplicaLocation object containing all
the pfn's associated with that LFN.preferredSite - the preffered site for picking up the replicas.allowLocalFileURLs - indicates whether Replica Selector can select a replica
on the local site / submit host.ReplicaLocation corresponding to the replicas selectedpublic boolean removeFileURL(edu.isi.pegasus.planner.catalog.replica.ReplicaCatalogEntry rce,
String preferredSite,
boolean allowLocalFileURLs)
- if associated with the preference site or
- if local File URL are allowed and rce is associated
with local site
rce - the ReplicaCatalogEntry object.preferredSite - the preferred site.allowLocalFileURLs - indicates whether Replica Selector can select a replica
on the local site / submit host.protected boolean removeFileURL(String pfn, String site, String preferredSite, boolean allowLocalFileURLs)
- if associated with the preference site or
- if local File URL are allowed and rce is associated
with local site
pfn - the file urlsite - the site associated with the pfn.preferredSite - the preferred site.allowLocalFileURLs - indicates whether Replica Selector can select a replica
on the local site / submit host.public String description()
description in interface ReplicaSelector