Class: Commands::PigScriptCommand
- Inherits:
-
StepCommand
- Object
- Command
- StepCommand
- Commands::PigScriptCommand
- Defined in:
- lib/commands.rb
Instance Attribute Summary
Attributes inherited from StepCommand
#apps_path, #args, #beta_path, #enable_debugging_path, #hive_cmd, #hive_path, #pig_cmd, #pig_path, #script_runner_path, #step_action, #step_name
Attributes inherited from Command
#arg, #commands, #description, #logger, #name
Instance Method Summary collapse
Methods inherited from StepCommand
#default_enable_debugging_path, #default_hive_cmd, #default_hive_path, #default_pig_cmd, #default_pig_path, #default_resize_jobflow_cmd, #default_script_runner_path, #ensure_install_cmd, #extra_args, #initialize, #script_args, #validate
Methods inherited from Command
#enact, #get_field, #has_value, #have, #initialize, #option, #require, #require_single_jobflow, #resolve, #validate
Constructor Details
This class inherits a constructor from Commands::StepCommand
Instance Method Details
#reorder_steps(jobflow, sc) ⇒ Object
365 366 367 |
# File 'lib/commands.rb', line 365 def reorder_steps(jobflow, sc) return ensure_install_cmd(jobflow, sc, PigInteractiveCommand) end |
#steps ⇒ Object
348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 |
# File 'lib/commands.rb', line 348 def steps mandatory_args = [ "--run-pig-script", "--args", "-f" ] if @arg then mandatory_args << @arg end step = { "Name" => get_field(:step_name, "Run Pig Script"), "ActionOnFailure" => get_field(:step_action, "CANCEL_AND_WAIT"), "HadoopJarStep" => { "Jar" => get_field(:script_runner_path), "Args" => get_field(:pig_cmd) + mandatory_args + @args } } return [ step ] end |