| java.lang.Object org.griphyn.cPlanner.selector.replica.Default
All known Subclasses: org.griphyn.cPlanner.selector.replica.Restricted,
Default | public class Default implements ReplicaSelector(Code) | | 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.
author: Karan Vahi version: $Revision: 386 $ |
Field Summary | |
final protected static String | FILE_URL_SCHEME The scheme name for file url. | 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. | protected boolean | mUseSymLinks This member variable if set causes the source url for the pull nodes from
the RLS to have file:// url if the pool attributed associated with the pfn
is same as a particular jobs execution pool. |
Constructor Summary | |
public | Default(PegasusProperties properties) The overloaded constructor, that is called by load method. |
FILE_URL_SCHEME | final protected static String FILE_URL_SCHEME(Code) | | The scheme name for file url.
|
mLogger | protected LogManager mLogger(Code) | | The handle to the logging object that is used to log the various debug
messages.
|
mProps | protected PegasusProperties mProps(Code) | | The properties object containing the properties passed to the planner.
|
mUseSymLinks | protected boolean mUseSymLinks(Code) | | This member variable if set causes the source url for the pull nodes from
the RLS to have file:// url if the pool attributed associated with the pfn
is same as a particular jobs execution pool.
|
Default | public Default(PegasusProperties properties)(Code) | | The overloaded constructor, that is called by load method.
Parameters: properties - the PegasusProperties object containing allthe properties required by Pegasus. |
description | public String description()(Code) | | Returns a short description of the replica selector.
string corresponding to the description. |
replaceProtocolFromURL | protected ReplicaCatalogEntry replaceProtocolFromURL(ReplicaCatalogEntry rce)(Code) | | Replaces the gsiftp URL scheme from the url, and replaces it with the
file url scheme and returns in a new object. The original object
passed as a parameter still remains the same.
Parameters: rce - the ReplicaCatalogEntry object whose url need to bereplaced. the object with the url replaced. |
selectReplica | public ReplicaCatalogEntry selectReplica(ReplicaLocation rl, String preferredSite)(Code) | | This chooses a location amongst all the locations returned by the replica
location service. If a location is found with re attribute same as the
preference pool, it is taken. Else a random location is selected and
returned. If more than one location for the lfn is found at the preference
pool, then also a random location amongst the ones at the preference pool
is selected.
Parameters: rl - the ReplicaLocation object containing allthe pfn's associated with that LFN. Parameters: preferredSite - the preffered site for picking up the replicas. ReplicaCatalogEntry corresponding to the location selected. See Also: org.griphyn.cPlanner.classes.ReplicaLocation |
selectReplicas | public ReplicaLocation selectReplicas(ReplicaLocation rl, String preferredSite)(Code) | | This chooses a location amongst all the locations returned by the
Replica Mechanism. If a location is found with re/pool attribute same
as the preference pool, it is taken. This returns all the locations which
match to the preference pool. This function is called to determine if a
file does exist on the output pool or not beforehand. We need all the
location to ensure that we are able to make a match if it so exists.
Else a random location is selected and returned
Parameters: rl - the ReplicaLocation object containing allthe pfn's associated with that LFN. Parameters: preferredSite - the preffered site for picking up the replicas. ReplicaLocation corresponding to the replicas selected. See Also: org.griphyn.cPlanner.classes.ReplicaLocation |
|
|