Class: Commands::PutCommand
- Inherits:
-
AbstractSSHCommand
- Object
- Command
- AbstractSSHCommand
- Commands::PutCommand
- Defined in:
- lib/commands.rb
Constant Summary
Constants inherited from AbstractSSHCommand
AbstractSSHCommand::CLOSED_DOWN_STATES, AbstractSSHCommand::WAITING_OR_RUNNING_STATES
Instance Attribute Summary
Attributes inherited from AbstractSSHCommand
#dest, #hostname, #jobflow_detail, #jobflow_id, #key_pair_file, #no_wait
Attributes inherited from Command
#arg, #commands, #description, #logger, #name
Instance Method Summary collapse
Methods inherited from AbstractSSHCommand
Methods inherited from Command
#get_field, #has_value, #have, #initialize, #option, #require, #require_single_jobflow, #resolve, #validate
Constructor Details
This class inherits a constructor from Commands::Command
Instance Method Details
#enact(client) ⇒ Object
626 627 628 629 630 631 632 633 |
# File 'lib/commands.rb', line 626 def enact(client) super(client) if get_field(:dest) then exec "scp -i #{key_pair_file} #{@arg} hadoop@#{hostname}:#{get_field(:dest)}" else exec "scp -i #{key_pair_file} #{@arg} hadoop@#{hostname}:#{File.basename(@arg)}" end end |