run_if ( $condition, $args )

Create a new run-if bootstrap action which lets you conditionally run bootstrap actions.

Access

public static

Parameters

Parameter

Type

Required

Description

$condition

string

Required

The condition to evaluate. If true, the bootstrap action executes.

$args

array

Optional

An indexed array of arguments to pass to the script.

Returns

Type

Description

array

A configuration set to be provided when running a job flow.

Source

Method defined in utilities/hadoopbootstrap.class.php | Toggle source view (7 lines) | View on GitHub

public static function run_if($condition, $args = null)
{
    if (!$args) $args = array();
    $args = is_array($args) ? $args : array($args);

        return self::script_runner('s3://' . self::$region . '.elasticmapreduce/bootstrap-actions/run-if', $args);
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback