Skip to content

Eoulsan Runtime Class

Laurent Jourdren edited this page Mar 26, 2015 · 2 revisions

The Eoulsan Runtime class

WARNING: This documentation is outdated and will soon be updated.

The EoulsanRuntime is a lower level class of Eoulsan. There is 3 case where the call to the EoulsanRuntime is necessary:

  • Access to the Settings object outside a Step object:
Settings settings = EoulsanRuntime.getSettings();
  • Check if Eoulsan is running in Hadoop mode
boolean hadoopMode = EoulsanRuntime.getRuntime().isHadoopMode();
  • Initialize Eoulsan Runtime in a mapper or reducer class in Hadoop mode:
// Get configuration object from Hadoop context object (not Eoulsan!!!)
final Configuration conf = context.getConfiguration();
    
// Initialize Eoulsan Settings
if (!EoulsanRuntime.isRuntime()) {
  HadoopEoulsanRuntime.newEoulsanRuntime(conf);
}

Warnings about other methods of EoulsanRuntime

AbstractEoulsanRuntime contains many method for I/O. Do not use them, it is old staff that will be removed in next version of Eoulsan.

There also a isAmazonMode() method but it is not currently implemented (return always false).