edu.isi.pegasus.planner.transfer.mapper.impl
public abstract class AbstractFileFactoryBasedMapper extends Object implements OutputMapper
Modifier and Type | Field and Description |
---|---|
protected org.griphyn.vdl.euryale.FileFactory |
mFactory |
protected LogManager |
mLogger
The handle to the logger.
|
protected String |
mOutputSite
The output site where the data needs to be placed.
|
protected SiteStore |
mSiteStore
Handle to the Site Catalog contents.
|
protected Directory |
mStageoutDirectory
The stage out directory where the outputs are staged to.
|
VERSION
Constructor and Description |
---|
AbstractFileFactoryBasedMapper()
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
complainForStorageFileServer(FileServerType.OPERATION operation,
String site)
Complains for a missing head node storage file server on a site for a job
|
protected String |
constructURL(FileServer server,
String addOn)
Returns the full path on remote output site, where the lfn will reside,
using the FileServer passed.
|
abstract String |
createAndGetAddOn(String lfn,
String site,
boolean existing)
Returns the addOn part that is retrieved from the File Factory.
|
protected String |
getErrorMessagePrefix()
Returns the prefix message to be attached to an error message
|
abstract String |
getShortName()
Returns the short name for the implementation class.
|
void |
initialize(PegasusBag bag,
ADag workflow)
Initializes the mappers.
|
abstract org.griphyn.vdl.euryale.FileFactory |
instantiateFileFactory(PegasusBag bag,
ADag workflow)
Method that instantiates the FileFactory
|
protected Directory |
lookupStorageDirectory(String site)
Looks up the site catalog to return the storage directory for a site
|
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
description
protected LogManager mLogger
protected org.griphyn.vdl.euryale.FileFactory mFactory
protected SiteStore mSiteStore
protected String mOutputSite
protected Directory mStageoutDirectory
public AbstractFileFactoryBasedMapper()
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 abstract org.griphyn.vdl.euryale.FileFactory instantiateFileFactory(PegasusBag bag, ADag workflow)
bag
- the bag of objects that is useful for initialization.workflow
- the workflow refined so far.public abstract String getShortName()
public abstract String createAndGetAddOn(String lfn, String site, boolean existing)
lfn
- the LFN to be usedsite
- the site at which the LFN residesexisting
- indicates whether to create a new location/placement for a file,
or rely on existing placement on the site.protected String constructURL(FileServer server, String addOn) throws MapperException
server
- the file server to useaddOn
- the addOn part containing the LFNMapperException
public 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 Directory lookupStorageDirectory(String site) throws MapperException
site
- the siteMapperException
protected void complainForStorageFileServer(FileServerType.OPERATION operation, String site)
operation
- the file server operationsite
- the siteprotected String getErrorMessagePrefix()