Class: Azkaban::PigJob
Instance Attribute Summary collapse
-
#parameters ⇒ Object
readonly
Returns the value of attribute parameters.
Attributes inherited from JobFile
#read_locks, #task, #uses_arg, #write_locks
Instance Method Summary collapse
- #handle_read_write_options(options, name) ⇒ Object
-
#initialize(task, ext) ⇒ PigJob
constructor
A new instance of PigJob.
- #uses(name) ⇒ Object
Methods inherited from JobFile
#[], #[]=, #reads, #set, #write, #writes
Constructor Details
#initialize(task, ext) ⇒ PigJob
Returns a new instance of PigJob.
150 151 152 153 154 |
# File 'lib/azkaban-rb/tasks.rb', line 150 def initialize(task, ext) super(task,ext) set "type"=>"pig" @parameters = {} end |
Instance Attribute Details
#parameters ⇒ Object (readonly)
Returns the value of attribute parameters.
148 149 150 |
# File 'lib/azkaban-rb/tasks.rb', line 148 def parameters @parameters end |
Instance Method Details
#handle_read_write_options(options, name) ⇒ Object
161 162 163 164 165 166 167 168 |
# File 'lib/azkaban-rb/tasks.rb', line 161 def (, name) = [0] if .size > 0 if && .instance_of?(Hash) && [:as] # set the pig parameter set "param.#{[:as]}" => name @parameters[[:as]] = name end end |
#uses(name) ⇒ Object
156 157 158 159 |
# File 'lib/azkaban-rb/tasks.rb', line 156 def uses(name) @uses_arg = name set "pig.script"=>name end |