public class Replica extends java.lang.Object implements OutputMapper
pegasus.dir.storage.mapper Replica pegasus.dir.storage.mapper.replicapegasus.dir.storage.mapper.replica.file the RC file at the backend to use, \ if using a file based RC
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
DEFAULT_REPLICA_BACKEND
The default replica catalog backend.
|
private static java.lang.String |
DESCRIPTION
Short description.
|
protected LogManager |
mLogger
The handle to the logger.
|
protected java.lang.String |
mOutputSite
The output site where the data needs to be placed.
|
protected ReplicaCatalog |
mRCCatalog |
protected SiteStore |
mSiteStore
Handle to the Site Catalog contents.
|
static java.lang.String |
PROPERTY_PREFIX
The prefix for the property subset for connecting to the individual
catalogs.
|
static java.lang.String |
READ_ONLY_KEY
The name of the key that disables writing back to the cache file.
|
private static java.lang.String |
SHORT_NAME
The short name for this backend.
|
VERSION
Constructor and Description |
---|
Replica()
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
description()
Returns a short description of the mapper.
|
protected java.lang.String |
getErrorMessagePrefix()
Returns the prefix message to be attached to an error message
|
private java.lang.String |
getShortName() |
void |
initialize(PegasusBag bag,
ADag workflow)
Initializes the mappers.
|
java.lang.String |
map(java.lang.String lfn,
java.lang.String site,
FileServerType.OPERATION operation)
Maps a LFN to a location on the filsystem of a site and returns a single
externally accessible URL corresponding to that location.
|
java.lang.String |
map(java.lang.String lfn,
java.lang.String site,
FileServerType.OPERATION operation,
boolean existing)
Maps a LFN to a location on the filsystem of a site and returns a single
externally accessible URL corresponding to that location.
|
java.util.List<java.lang.String> |
mapAll(java.lang.String lfn,
java.lang.String site,
FileServerType.OPERATION operation)
Maps a LFN to a location on the filsystem of a site and returns all the possible
equivalent externally accessible URL corresponding to that location.
|
public static final java.lang.String PROPERTY_PREFIX
private static final java.lang.String DESCRIPTION
public static final java.lang.String READ_ONLY_KEY
private static final java.lang.String SHORT_NAME
private java.lang.String DEFAULT_REPLICA_BACKEND
protected LogManager mLogger
protected SiteStore mSiteStore
protected java.lang.String mOutputSite
protected ReplicaCatalog mRCCatalog
public void initialize(PegasusBag bag, ADag workflow) throws MapperException
initialize
in interface OutputMapper
bag
- the bag of objects that is useful for initialization.workflow
- the workflow refined so far.MapperException
- if unable to construct URL for any reasonpublic java.lang.String map(java.lang.String lfn, java.lang.String site, FileServerType.OPERATION operation) throws MapperException
map
in interface OutputMapper
lfn
- the lfnsite
- the output siteoperation
- whether we want a GET or a PUT URLMapperException
- if unable to construct URL for any reasonpublic java.lang.String map(java.lang.String lfn, java.lang.String site, FileServerType.OPERATION operation, boolean existing) throws MapperException
map
in interface OutputMapper
lfn
- the lfnsite
- the output siteoperation
- whether we want a GET or a PUT URLexisting
- indicates whether to create a new location/placement for a file,
or rely on existing placement on the site.MapperException
- if unable to construct URL for any reasonpublic java.util.List<java.lang.String> mapAll(java.lang.String lfn, java.lang.String site, FileServerType.OPERATION operation) throws MapperException
mapAll
in interface OutputMapper
lfn
- the lfnsite
- the output siteoperation
- whether we want a GET or a PUT URLMapperException
- if unable to construct URL for any reasonprotected java.lang.String getErrorMessagePrefix()
private java.lang.String getShortName()
public java.lang.String description()
description
in interface OutputMapper