Top Level Namespace

Defined Under Namespace

Modules: Azkaban, Rake Classes: RakeGraph

Instance Method Summary collapse

Instance Method Details

#command_job(*args, &b) ⇒ Object



234
235
236
# File 'lib/azkaban-rb/tasks.rb', line 234

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

#java_job(*args, &b) ⇒ Object



226
227
228
# File 'lib/azkaban-rb/tasks.rb', line 226

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

#java_process_job(*args, &b) ⇒ Object



230
231
232
# File 'lib/azkaban-rb/tasks.rb', line 230

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

#job(*args, &b) ⇒ Object



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

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

#make_job(job_class, args, b) ⇒ Object



238
239
240
241
242
243
# File 'lib/azkaban-rb/tasks.rb', line 238

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



222
223
224
# File 'lib/azkaban-rb/tasks.rb', line 222

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

#props(*args, &b) ⇒ Object



208
209
210
211
212
213
214
215
216
# File 'lib/azkaban-rb/tasks.rb', line 208

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