|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.isi.pegasus.planner.selector.replica.Default
public class Default
The default replica selector that is used if non is specifed by the user. This gives preference to a replica residing on the same site as the site, where it is required to be staged to. If there is no such replica, then a random replica is selected.
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.
| Field Summary | |
|---|---|
protected static String |
FILE_URL_SCHEME
The scheme name for file url. |
private static String |
mDescription
A short description of the replica selector. |
protected LogManager |
mLogger
The handle to the logging object that is used to log the various debug messages. |
protected PegasusProperties |
mProps
The properties object containing the properties passed to the planner. |
| Fields inherited from interface edu.isi.pegasus.planner.selector.ReplicaSelector |
|---|
LOCAL_SITE_HANDLE, VERSION |
| Constructor Summary | |
|---|---|
Default(PegasusProperties properties)
The overloaded constructor, that is called by load method. |
|
| Method Summary | |
|---|---|
String |
description()
Returns a short description of the replica selector. |
boolean |
removeFileURL(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. |
ReplicaCatalogEntry |
selectReplica(ReplicaLocation rl,
String preferredSite,
boolean allowLocalFileURLs)
This chooses a location amongst all the locations returned by the replica location service. |
ReplicaLocation |
selectReplicas(ReplicaLocation rl,
String preferredSite,
boolean allowLocalFileURLs)
This chooses a location amongst all the locations returned by the Replica Mechanism. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static String mDescription
protected static final String FILE_URL_SCHEME
protected LogManager mLogger
protected PegasusProperties mProps
| Constructor Detail |
|---|
public Default(PegasusProperties properties)
properties - the PegasusProperties object containing all
the properties required by Pegasus.| Method Detail |
|---|
public ReplicaCatalogEntry selectReplica(ReplicaLocation rl,
String preferredSite,
boolean allowLocalFileURLs)
selectReplica 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.
ReplicaCatalogEntry corresponding to the location selected.org.griphyn.cPlanner.classes.ReplicaLocation
public ReplicaLocation selectReplicas(ReplicaLocation rl,
String preferredSite,
boolean allowLocalFileURLs)
selectReplicas 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 selected.org.griphyn.cPlanner.classes.ReplicaLocation
public boolean removeFileURL(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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||