edu.isi.pegasus.planner.transfer.mapper.impl
public class Replica extends 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 String |
DEFAULT_REPLICA_BACKEND
The default replica catalog backend.
|
private static String |
DESCRIPTION
Short description.
|
protected LogManager |
mLogger
The handle to the logger.
|
protected 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 String |
PROPERTY_PREFIX
The prefix for the property subset for connecting to the individual
catalogs.
|
static String |
READ_ONLY_KEY
The name of the key that disables writing back to the cache file.
|
private static String |
SHORT_NAME
The short name for this backend.
|
VERSION
Constructor and Description |
---|
Replica()
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
description()
Returns a short description of the mapper.
|
protected String |
getErrorMessagePrefix()
Returns the prefix message to be attached to an error message
|
private String |
getShortName() |
void |
initialize(PegasusBag bag,
ADag workflow)
Initializes the mappers.
|
String |
map(String lfn,
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.
|
String |
map(String lfn,
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.
|
List<String> |
mapAll(String lfn,
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 String PROPERTY_PREFIX
private static final String DESCRIPTION
public static final String READ_ONLY_KEY
private static final String SHORT_NAME
private String DEFAULT_REPLICA_BACKEND
protected LogManager mLogger
protected SiteStore mSiteStore
protected 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 String map(String lfn, 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 String map(String lfn, 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 List<String> mapAll(String lfn, 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 String getErrorMessagePrefix()
private String getShortName()
public String description()
description
in interface OutputMapper