Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Zookeeper

We use zookeeper to track locks between the autonomous components. To make zookeeper easier to use, we use the netflix curator api http://curator.incubator.apache.org/

Autonomous component locking procedure

Each of the autonomous components will exist as cron jobs. Periodically, often every minute or thereabouts, the cron job will activate. It will then follow the procedure below.

  1. Lock SBOI+component name
  2. query SBOI for batches
  3. For each returned batch
  4. Attempt to lock the batch+component name
  5. if successful, break loop
  6. unlock SBOI+component name
  7. Do work on locked batch (if any)
  8. store results in DOMS
  9. unlock locked batch

 

The specific lock paths are as follows

SBOI lock = "/SBOI/" + runnable.getComponentName();

batch lock = "/"+runnable.getComponentName() + "/B" + batch.getBatchID() + "-RT" + batch.getRoundTripNumber();