Class HadoopEoulsanRuntime
- java.lang.Object
-
- fr.ens.biologie.genomique.eoulsan.AbstractEoulsanRuntime
-
- fr.ens.biologie.genomique.eoulsan.HadoopEoulsanRuntime
-
public final class HadoopEoulsanRuntime extends AbstractEoulsanRuntime
This class define the Runtime to execute low level IO operation for Eoulsan in Hadoop mode.- Since:
- 1.0
- Author:
- Laurent Jourdren
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class fr.ens.biologie.genomique.eoulsan.AbstractEoulsanRuntime
AbstractEoulsanRuntime.EoulsanExecMode
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.hadoop.conf.ConfigurationgetConfiguration()Get Hadoop configuration.InputStreamgetInputStream(String dataSource)Create an InputStream to load data.AbstractEoulsanRuntime.EoulsanExecModegetMode()Get Eoulsan mode.OutputStreamgetOutputStream(String dataSource)Create an OutputStream to load data.InputStreamgetRawInputStream(String dataSource)Create a raw InputStream (without decompression of input data) to load data.FilegetTempDirectory()Get the temporary directory.static HadoopEoulsanRuntimenewEoulsanRuntime(org.apache.hadoop.conf.Configuration conf)Public constructor, initialize the runtime.-
Methods inherited from class fr.ens.biologie.genomique.eoulsan.AbstractEoulsanRuntime
createFileInTempDir, createTempDir, createTempDir, createTempFile, decompressInputStreamIsNeeded, getSettings
-
-
-
-
Method Detail
-
getConfiguration
public org.apache.hadoop.conf.Configuration getConfiguration()
Get Hadoop configuration.- Returns:
- Hadoop Configuration object
-
getMode
public AbstractEoulsanRuntime.EoulsanExecMode getMode()
Description copied from class:AbstractEoulsanRuntimeGet Eoulsan mode.- Specified by:
getModein classAbstractEoulsanRuntime- Returns:
- the Eoulsan mode
-
getTempDirectory
public File getTempDirectory()
Description copied from class:AbstractEoulsanRuntimeGet the temporary directory.- Specified by:
getTempDirectoryin classAbstractEoulsanRuntime- Returns:
- the temporary directory as a File object
-
getInputStream
public InputStream getInputStream(String dataSource) throws IOException
Description copied from class:AbstractEoulsanRuntimeCreate an InputStream to load data.- Specified by:
getInputStreamin classAbstractEoulsanRuntime- Parameters:
dataSource- the source of the data to load- Returns:
- an InputStream corresponding to the source
- Throws:
IOException- if an error occurs the InputStream
-
getRawInputStream
public InputStream getRawInputStream(String dataSource) throws IOException
Description copied from class:AbstractEoulsanRuntimeCreate a raw InputStream (without decompression of input data) to load data.- Specified by:
getRawInputStreamin classAbstractEoulsanRuntime- Parameters:
dataSource- the source of the data to load- Returns:
- an InputStream corresponding to the source
- Throws:
IOException- if an error occurs the InputStream
-
getOutputStream
public OutputStream getOutputStream(String dataSource) throws IOException
Description copied from class:AbstractEoulsanRuntimeCreate an OutputStream to load data.- Specified by:
getOutputStreamin classAbstractEoulsanRuntime- Parameters:
dataSource- the source of the data to load- Returns:
- an OutputStream corresponding to the source
- Throws:
IOException- if an error occurs the OutputStream
-
newEoulsanRuntime
public static HadoopEoulsanRuntime newEoulsanRuntime(org.apache.hadoop.conf.Configuration conf) throws IOException
Public constructor, initialize the runtime. This constructor is useful in mappers or reducers for initialize Eoulsan DataProtocols.- Parameters:
conf- Hadoop configuration of the application- Throws:
IOException
-
-