public class JobHistoryReaper extends InterruptingScheduledService
1. The master deletes the job (in ZooKeeperMasterModel
and then deletes its history. During this deletion, the agent creates a znode. The master's
deletion operations fail.
2. The master deletes all relevant history znodes successfully. The agent still hasn't
undeployed its job and continues writing history to ZooKeeper. This will recreate deleted history
znodes via TaskHistoryWriter.
Solve both of these cases by scheduling an instance of this class. It runs once a day once scheduled.
| Constructor and Description |
|---|
JobHistoryReaper(MasterModel masterModel,
ZooKeeperClient client) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
runOneIteration() |
protected ScheduledFuture<?> |
schedule(Runnable runnable,
ScheduledExecutorService executorService) |
beforeIteration, shutDown, startUppublic JobHistoryReaper(MasterModel masterModel, ZooKeeperClient client)
protected void runOneIteration()
runOneIteration in class InterruptingScheduledServiceprotected ScheduledFuture<?> schedule(Runnable runnable, ScheduledExecutorService executorService)
schedule in class InterruptingScheduledServiceCopyright © 2017. All rights reserved.