<<

NAME

Inca::ReporterManager::ReporterInstanceManager - Manages reporter execution

SYNOPSIS

  use Inca::ReporterManager::ReporterInstanceManager;
  my $rim = new Inca::ReporterManager::ReporterInstanceManager();
  my $sc = new Inca::Config::Suite::SeriesConfig();
  $sc->setPath( "var/reporter-packages/bin/cluster.compiler.gcc.version-3" );
  $sc->setName( "cluster.compiler.gcc.version" );
  $sc->setVersion( "3" );
  $sc->setContext( "cluster.compiler.gcc.version -verbose=1 -log=3" );
  my $credentials = { cert => "t/certs/client_ca1cert.pem",
                      key => "t/certs/client_ca1keynoenc.pem", 
                      passphrase => undef,
                      trusted => "t/certs/trusted" };
  $rim = new Inca::ReporterManager::ReporterInstanceManager();
  $rim->setSeriesConfig( $sc );
  $rim->setId( "resourceA" );
  $rim->setCredentials( $credentials );
  $rim->setCheckPeriod(1);
  $rim->setPath( "t/stream_report" );
  $rim->setDepots( "incas://localhost:$port" );
  $rim->setReporterCache( $rc );
  my $success = $rim->runReporter();

DESCRIPTION

The Reporter Instance Manager (RIM) is responsible for launching a reporter instance and monitoring its execution. Specifically, it forks/execs the reporter and then monitors its system usage (CPU time, wall clock time, and memory) and if it exceeds a specified limit set for either wall clock time, CPU time, or memory, it will kill the reporter and formulate an error report. Otherwise upon reporter exit, the RIM will gather stderr, stdout, and usage statistics and send that to the first depot in its depot list. The depot will then get passed to all interested parties.

CLASS METHODS

new( %Options )

Class constructor which returns a new Inca::ReporterManager::ReporterInstanceManager object. The constructor may be called with any of the following attributes.

Options:

id

The resource identifier supplied by the reporter agent that the reporter manager will use to identify itself to the reporter depot.

config

An object of type Inca::Config::Suite::SeriesConfig which contains information about the reporter to execute.

checkPeriod

A positive integer indicating the period in seconds of which to check the reporter for exceeding resource limits [default: 5]

depotTimeout

A positive integer indicating the period in seconds of which to time out the connection to the depot [default: 120]

depotURIs

A list of depot uris. The report will be sent to the first depot in the list. If the first depot is unreachable, the next depots in the list will be tried.

reporterCache

An object of type Inca::ReporterManager::ReporterCache which is used to map reporter uris to a local path.

credentials

A reference to a hash array containing the credential information.

tmpDir

A string containing a path to a temporary file space that Inca can use while executing reporters

getAgent( )

Retrieve the uri of the Inca agent to contact in order to retrive a proxy credential to use for the reporter.

Returns:

A string containing the uri of the Inca agent to contact to retrieve a proxy credential.

getCheckPeriod( )

Get the period for how often to check the reporter for exceeding its limits.

Returns:

A positive integer indicating the period in seconds of which to check for resource limits.

getCredentials( )

Retrieve the security credentials.

Returns:

A reference to a hash array containing the paths to the security credentials.

getDepots( )

Retrieve the destination depots that are used to send the report on completion.

Returns:

An array of strings containing uris to depots [host:port, ...]

getDepotTimeout( )

Get the period in seconds of which to time out the connection to the depot

Returns:

A positive integer indicating the period in seconds of which to time out thec connection to the depot

getId( )

Get the resource identifier supplied by the reporter agent that the reporter manager will use to identify itself to the depot.

Returns:

A string indicating the id of the resource.

getReporterCache( )

Retrieve the reporter administrator to use in order to find a path to a local copy of a reporter (from its URI).

Returns:

An object of type Inca::ReporterManager::ReporterCache which is used to map reporter uris to a local path.

getSeriesConfig( )

Retrieve the series config that will be executed.

Returns:

An object of type Inca::Config::Suite::SeriesConfig which contains information about the reporter to execute.

getTmpDirectory( )

Retrieve the path to a temporary file space that Inca can use while executing reporters

Returns:

A string containing a path to a temporary file space.

hasAgent( )

Returns true if an agent uri has been specified and false otherwise.

Returns:

True if an agent uri has been specified and false otherwise.

hasCredentials( )

Return true if credentials have been specified; otherwise return false.

Returns:

A boolean indicating true if credentials have been specified and false if they has not.

hasSeriesConfig( )

Return true if a series config has been specified; otherwise return false.

Returns:

Returns true if a series config has been specified and false if it has not.

runReporter( )

Contact the reporter administrator, retrieve the local path to the reporter, and execute it.

Returns:

Returns false if there was a problem either retrieving the reporter, running it, or sending it to the depot. Otherwise returns true for success.

setAgent( $uri )

Set the uri of the Inca agent to contact in order to retrive a proxy credential to use for the reporter.

Arguments:

uri

A string containing the uri of the Inca agent to contact to retrieve a proxy credential.

setCheckPeriod( $secs )

Set the period for how often to check the reporter for exceeding its limits.

Arguments:

secs

A positive integer indicating the period in seconds of which to check for resource limits.

setCredentials( \%credentials )

Specify the credentials to use.

Arguments:

credentials

A reference to a hash array containing the credential information.

setDepots( @depot_uris )

Specify the destination depots that are used to send the report on completion. The report will be sent to the first depot in the list. If the first depot is unreachable, the next depots in the list will be tried.

Arguments:

depot_uris

Any number of strings containing a uri to a depot [host:port, ...]

setDepotTimeout( $secs )

Set the period for when the time has exceeded for sending the report to the depot.

Arguments:

secs

A positive integer indicating the period in seconds of which to time out the connection to the depot.

setId( $resourceId )

Set the resource identifier supplied by the reporter agent that the reporter manager will use to identify itself to the depot.

Arguments:

resourceId

A string indicating the id of the resource.

setReporterCache( $reporter_cache )

Specify the reporter administrator to use in order to find a path to a local copy of a reporter (from its URI).

Arguments:

reporter_cache

An object of type Inca::ReporterManager::ReporterCache which is used to map reporter uris to a local path.

setSeriesConfig( $config )

Set the series config to be executed.

Arguments:

config

An object of type Inca::Config::Suite::SeriesConfig which contains information about the reporter to execute.

setTmpDirectory( $path )

Specify a temporary file space that Inca can use while executing reporters.

Arguments:

path

A string containing a path to a temporary file space

AUTHOR

Shava Smallen <ssmallen@sdsc.edu>

CAVEATS/WARNINGS

None so far.

<<