object. */ public static function enable_debugging() { return self::script_runner('s3://us-east-1.elasticmapreduce/libs/state-pusher/0.1/fetch'); } /** * Step that installs Hive on your job flow. * * @return array A standard array that is intended to be passed into a object. * @link http://hive.apache.org Apache Hive */ public static function install_hive() { return self::hive_pig_script('hive', '--install-hive'); } /** * Step that runs a Hive script on your job flow. * * @param string $script (Required) The script to run with `script-runner.jar`. * @param array $args (Optional) An indexed array of arguments to pass to the script. * @return array A standard array that is intended to be passed into a object. * @link http://hive.apache.org Apache Hive */ public static function run_hive_script($script, $args = null) { if (!$args) $args = array(); $args = is_array($args) ? $args : array($args); $args = array_merge(array('--run-hive-script', '--args', '-f', $script), $args); return self::hive_pig_script('hive', $args); } /** * Step that installs Pig on your job flow. * * @return array A standard array that is intended to be passed into a object. * @link http://pig.apache.org Apache Pig */ public static function install_pig() { return self::hive_pig_script('pig', '--install-pig'); } /** * Step that runs a Pig script on your job flow. * * @param string $script (Required) The script to run with `script-runner.jar`. * @param array $args (Optional) An indexed array of arguments to pass to the script. * @return array A standard array that is intended to be passed into a object. * @link http://pig.apache.org Apache Pig */ public static function run_pig_script($script, $args = null) { if (!$args) $args = array(); $args = is_array($args) ? $args : array($args); $args = array_merge(array('--run-pig-script', '--args', '-f', $script), $args); return self::hive_pig_script('pig', $args); } }