hive_pig_script ( $type, $args )

Prepares a Hive or Pig script before passing it to the script runner.

Access

public static

Parameters

Parameter

Type

Required

Description

$type

string

Required

The type of script to run. [Allowed values: hive, pig].

$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.

See Also

Source

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

public static function hive_pig_script($type, $args = null)
{
    if (!$args) $args = array();
    $args = is_array($args) ? $args : array($args);
    $args = array_merge(array('--base-path', 's3://' . self::$region . '.elasticmapreduce/libs/' . $type . '/'), $args);

        return self::script_runner('s3://' . self::$region . '.elasticmapreduce/libs/' . $type . '/' . $type . '-script', $args);
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback