public abstract class AbstractFileFactoryBasedMapper extends java.lang.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 java.lang.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,
java.lang.String site)
Complains for a missing head node storage file server on a site for a job
|
protected java.lang.String |
constructURL(FileServer server,
java.lang.String addOn)
Returns the full path on remote output site, where the lfn will reside,
using the FileServer passed.
|
abstract java.lang.String |
createAndGetAddOn(java.lang.String lfn,
java.lang.String site,
boolean existing)
Returns the addOn part that is retrieved from the File Factory.
|
protected java.lang.String |
getErrorMessagePrefix()
Returns the prefix message to be attached to an error message
|
abstract java.lang.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(java.lang.String site)
Looks up the site catalog to return the storage directory for a site
|
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdescriptionprotected LogManager mLogger
protected org.griphyn.vdl.euryale.FileFactory mFactory
protected SiteStore mSiteStore
protected java.lang.String mOutputSite
protected Directory mStageoutDirectory
public AbstractFileFactoryBasedMapper()
public void initialize(PegasusBag bag, ADag workflow) throws MapperException
initialize in interface OutputMapperbag - 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 java.lang.String getShortName()
public abstract java.lang.String createAndGetAddOn(java.lang.String lfn,
java.lang.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 java.lang.String constructURL(FileServer server, java.lang.String addOn) throws MapperException
server - the file server to useaddOn - the addOn part containing the LFNMapperExceptionpublic java.lang.String map(java.lang.String lfn,
java.lang.String site,
FileServerType.OPERATION operation)
throws MapperException
map in interface OutputMapperlfn - 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 OutputMapperlfn - 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 OutputMapperlfn - the lfnsite - the output siteoperation - whether we want a GET or a PUT URLMapperException - if unable to construct URL for any reasonprotected Directory lookupStorageDirectory(java.lang.String site) throws MapperException
site - the siteMapperExceptionprotected void complainForStorageFileServer(FileServerType.OPERATION operation, java.lang.String site)
operation - the file server operationsite - the siteprotected java.lang.String getErrorMessagePrefix()