Interface OutputMapper
-
- All Known Implementing Classes:
AbstractFileFactoryBasedMapper,Fixed,Flat,Hashed,Replica
public interface OutputMapperThe interface that defines how to map the output files to a stage out site.- Author:
- vahi
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringVERSIONThe version of the API of the Output Mapper
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Stringdescription()Returns a short description of the mapper.voidinitialize(PegasusBag bag, ADag workflow)Initializes the mappers.java.lang.Stringmap(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.Stringmap(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.
-
-
-
Field Detail
-
VERSION
static final java.lang.String VERSION
The version of the API of the Output Mapper- See Also:
- Constant Field Values
-
-
Method Detail
-
initialize
void initialize(PegasusBag bag, ADag workflow) throws MapperException
Initializes the mappers.- Parameters:
bag- the bag of objects that is useful for initialization.workflow- the workflow refined so far.- Throws:
MapperException- if unable to construct URL for any reason
-
map
java.lang.String map(java.lang.String lfn, java.lang.String site, FileServerType.OPERATION operation) throws MapperExceptionMaps a LFN to a location on the filsystem of a site and returns a single externally accessible URL corresponding to that location.- Parameters:
lfn- the lfnsite- the output siteoperation- whether we want a GET or a PUT URL- Returns:
- the URL to file that was mapped
- Throws:
MapperException- if unable to construct URL for any reason
-
map
java.lang.String map(java.lang.String lfn, java.lang.String site, FileServerType.OPERATION operation, boolean existing) throws MapperExceptionMaps a LFN to a location on the filsystem of a site and returns a single externally accessible URL corresponding to that location.- Parameters:
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.- Returns:
- externally accessible URL to the mapped file.
- Throws:
MapperException- if unable to construct URL for any reason
-
mapAll
java.util.List<java.lang.String> mapAll(java.lang.String lfn, java.lang.String site, FileServerType.OPERATION operation) throws MapperExceptionMaps a LFN to a location on the filsystem of a site and returns all the possible equivalent externally accessible URL corresponding to that location. For example, if a file on the filesystem is accessible via multiple file servers it should return externally accessible URL's from all the File Servers on the site.- Parameters:
lfn- the lfnsite- the output siteoperation- whether we want a GET or a PUT URL- Returns:
- List
of externally accessible URLs to the mapped file. - Throws:
MapperException- if unable to construct URL for any reason
-
description
java.lang.String description()
Returns a short description of the mapper.- Returns:
-
-