How to enable default retry mechanism in Azkaban

476 Views Asked by At

There is a way we can specify the retry in job as below

from azkaban import Job, Project
project = Project('azkaban_basic_flow', root=__file__)
project.properties['retries'] = '3' #line 3
project.properties['retry.backoff'] = '60000' #line 4

Say we have 10 projects - We need to hard code the lines 3 and 4 in all 10 projects. Is there any way we can enable the default retry mechanism, So that it can be inherited to all projects by default.

1

There are 1 best solutions below

0
On

Global level properties should be defined in common.properties and that can be consumed through out the azkaban projects.(azkaban-version:3.1.0)

Steps to follow:

  1. Navigate to azkaban-exec-server-0.1.0-SNAPSHOT/plugins/jobtypes/ and create common.properties
  2. Place the content inside common.properties retries=3 retry.backoff=30000
  3. Use the property defined in common.properties inside azkaban-exec-server-0.1.0-SNAPSHOT/plugins/jobtypes/jobtype-name/plugin.properties.
  4. restart azkaban-executor to reflect the changes.
  5. Now the property can be access inside azkaban project using ${retries} and ${retry.backoff}

Reference documentation: azkaban documentation