class Commands::StepCommand
Attributes
apps_path[RW]
args[RW]
beta_path[RW]
enable_debugging_path[RW]
hive_cmd[RW]
hive_path[RW]
pig_cmd[RW]
pig_path[RW]
script_runner_path[RW]
step_action[RW]
step_name[RW]
Public Class Methods
new(*args)
click to toggle source
Calls superclass method
Commands::Command::new
# File lib/commands.rb, line 213 def initialize(*args) super(*args) @args = [] end
Public Instance Methods
default_enable_debugging_path()
click to toggle source
# File lib/commands.rb, line 244 def default_enable_debugging_path File.join(get_field(:apps_path), "libs/state-pusher/0.1") end
default_hive_cmd()
click to toggle source
# File lib/commands.rb, line 235 def default_hive_cmd [ File.join(get_field(:hive_path), "hive-script"), "--base-path", get_field(:hive_path) ] end
default_hive_path()
click to toggle source
# File lib/commands.rb, line 231 def default_hive_path File.join(get_field(:apps_path), "libs/hive/") end
default_pig_cmd()
click to toggle source
# File lib/commands.rb, line 226 def default_pig_cmd [ File.join(get_field(:pig_path), "pig-script"), "--base-path", get_field(:pig_path) ] end
default_pig_path()
click to toggle source
# File lib/commands.rb, line 222 def default_pig_path File.join(get_field(:apps_path), "libs/pig/") end
default_resize_jobflow_cmd()
click to toggle source
# File lib/commands.rb, line 240 def default_resize_jobflow_cmd File.join(get_field(:apps_path), "libs/resize-job-flow/0.1/resize-job-flow.jar") end
default_script_runner_path()
click to toggle source
# File lib/commands.rb, line 218 def default_script_runner_path File.join(get_field(:apps_path), "libs/script-runner/script-runner.jar") end
ensure_install_cmd(jobflow, sc, install_step_class)
click to toggle source
# File lib/commands.rb, line 269 def ensure_install_cmd(jobflow, sc, install_step_class) has_install = false install_step = install_step_class.new_from_commands(commands, self) if install_step.jobflow_has_install_step(jobflow) then return sc else new_sc = [] has_install_pi = false for sc_cmd in sc do if sc_cmd.is_a?(install_step_class) then if has_install_pi then next else has_install_pi = true end end if sc_cmd.is_a?(self.class) then if ! has_install_pi then has_install_pi = true new_sc << install_step install_step.validate end end new_sc << sc_cmd end end return new_sc end
extra_args()
click to toggle source
# File lib/commands.rb, line 261 def extra_args if @args != nil && @args.size > 0 then return ["--args"] + @args else return [] end end
reorder_steps(jobflow, sc)
click to toggle source
# File lib/commands.rb, line 298 def reorder_steps(jobflow, sc) return sc end
script_args()
click to toggle source
# File lib/commands.rb, line 253 def script_args if @arg then [ @arg ] + @args else @args end end
validate()
click to toggle source
Calls superclass method
Commands::Command#validate
# File lib/commands.rb, line 248 def validate super require(:apps_path, "--apps-path path must be defined") end