Top Level Namespace

Defined Under Namespace

Modules: Azkaban, Rake

Instance Method Summary collapse

Instance Method Details

#command_job(*args, &b) ⇒ Object



213
214
215
# File 'lib/azkaban-rb/tasks.rb', line 213

def command_job(*args,&b) 
  make_job(Azkaban::CommandJob, args, b)
end

#java_job(*args, &b) ⇒ Object



205
206
207
# File 'lib/azkaban-rb/tasks.rb', line 205

def java_job(*args,&b) 
  make_job(Azkaban::JavaJob, args, b)
end

#java_process_job(*args, &b) ⇒ Object



209
210
211
# File 'lib/azkaban-rb/tasks.rb', line 209

def java_process_job(*args,&b) 
  make_job(Azkaban::JavaProcessJob, args, b)
end

#job(*args, &b) ⇒ Object



197
198
199
# File 'lib/azkaban-rb/tasks.rb', line 197

def job(*args,&b)  
  make_job(Azkaban::JobFile, args, b)
end

#make_job(job_class, args, b) ⇒ Object



217
218
219
220
221
222
# File 'lib/azkaban-rb/tasks.rb', line 217

def make_job(job_class,args,b)
  job = job_class.new(task(*args) { job.write }, ".job")
  unless b.nil?    
    job.instance_eval(&b)
  end
end

#pig_job(*args, &b) ⇒ Object



201
202
203
# File 'lib/azkaban-rb/tasks.rb', line 201

def pig_job(*args,&b) 
  make_job(Azkaban::PigJob, args, b)
end

#props(*args, &b) ⇒ Object



187
188
189
190
191
192
193
194
195
# File 'lib/azkaban-rb/tasks.rb', line 187

def props(*args, &b)
  task(*args) do |t|
    unless b.nil?
      job = Azkaban::JobFile.new(t, ".properties")
      job.instance_eval(&b)
      job.write
    end
  end
end