Class: Commands::HiveScriptCommand

Inherits:
HiveCommand show all
Defined in:
lib/commands.rb

Instance Attribute Summary

Attributes inherited from HiveCommand

#hive_versions

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 HiveCommand

#get_version_args

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



455
456
457
# File 'lib/commands.rb', line 455

def reorder_steps(jobflow, sc)
  return ensure_install_cmd(jobflow, sc, HiveInteractiveCommand)
end

#stepsObject



439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
# File 'lib/commands.rb', line 439

def steps
  mandatory_args = [ "--run-hive-script", "--args", "-f" ]
  if @arg then
    mandatory_args << @arg
  end
  step = {
    "Name"            => get_field(:step_name, "Run Hive Script"),
    "ActionOnFailure" => get_field(:step_action, "CANCEL_AND_WAIT"),
    "HadoopJarStep"   => {
      "Jar" => get_field(:script_runner_path),
      "Args" => get_field(:hive_cmd) + get_version_args(true) + mandatory_args + @args
    }
  }
  [ step ]
end