script_runner ( $script, $args )

Runs a specified script on the master node of your cluster.

Access

public static

Parameters

Parameter

Type

Required

Description

$script

string

Required

The script to run with script-runner.jar.

$args

array

Optional

An indexed array of arguments to pass to the script.

Returns

Type

Description

array

A standard array that is intended to be passed into a CFStepConfig object.

Source

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

public static function script_runner($script, $args = null)
{
    if (!$args) $args = array();
    array_unshift($args, $script);

    return array(
        'Jar' => 's3://' . self::$region . '.elasticmapreduce/libs/script-runner/script-runner.jar',
        'Args' => $args
    );
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback