[
https://issues.apache.org/jira/browse/OOZIE-2341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Purshotam Shah updated OOZIE-2341:
----------------------------------
Description:
{code}
instrumentation.incr(INSTRUMENTATION_GROUP, getName() + ".executions",
1);
Instrumentation.Cron callCron = new Instrumentation.Cron();
try {
callCron.start();
if (!isSynchronous) {
eagerLoadState();
eagerVerifyPrecondition();
}
try {
T ret = null;
if (!isSynchronous && isLockRequired() &&
!this.inInterruptMode()) {
Instrumentation.Cron acquireLockCron = new
Instrumentation.Cron();
acquireLockCron.start();
acquireLock();
acquireLockCron.stop();
instrumentation.addCron(INSTRUMENTATION_GROUP, getName() +
".acquireLock", acquireLockCron);
}
// executing interrupts only in case of the lock required
commands
if (lock != null) {
this.executeInterrupts();
}
if (isSynchronous || !isLockRequired() || (lock != null) ||
this.inInterruptMode()) {
if
(CallableQueueService.INTERRUPT_TYPES.contains(this.getType())
&& !used.compareAndSet(false, true)) {
LOG.debug("Command [{0}] key [{1}] already executed
for [{2}]", getName(), getEntityKey(), this.toString());
return null;
}
LOG.trace("Load state for [{0}]", getEntityKey());
loadState();
LOG.trace("Precondition check for command [{0}] key [{1}]",
getName(), getEntityKey());
verifyPrecondition();
LOG.debug("Execute command [{0}] key [{1}]", getName(),
getEntityKey());
Instrumentation.Cron executeCron = new
Instrumentation.Cron();
{code}
It doesn't take care of requeing, in case of locks not acquired.
{code}
instrumentation.incr(INSTRUMENTATION_GROUP, getName() + ".executions",
1);
{code}
It should be after lock is acquired.
> Oozie instrumentations counters for "executions" are not correct
> ----------------------------------------------------------------
>
> Key: OOZIE-2341
> URL: https://issues.apache.org/jira/browse/OOZIE-2341
> Project: Oozie
> Issue Type: Bug
> Reporter: Purshotam Shah
>
> {code}
> instrumentation.incr(INSTRUMENTATION_GROUP, getName() +
> ".executions", 1);
> Instrumentation.Cron callCron = new Instrumentation.Cron();
> try {
> callCron.start();
> if (!isSynchronous) {
> eagerLoadState();
> eagerVerifyPrecondition();
> }
> try {
> T ret = null;
> if (!isSynchronous && isLockRequired() &&
> !this.inInterruptMode()) {
> Instrumentation.Cron acquireLockCron = new
> Instrumentation.Cron();
> acquireLockCron.start();
> acquireLock();
> acquireLockCron.stop();
> instrumentation.addCron(INSTRUMENTATION_GROUP, getName()
> + ".acquireLock", acquireLockCron);
> }
> // executing interrupts only in case of the lock required
> commands
> if (lock != null) {
> this.executeInterrupts();
> }
> if (isSynchronous || !isLockRequired() || (lock != null) ||
> this.inInterruptMode()) {
> if
> (CallableQueueService.INTERRUPT_TYPES.contains(this.getType())
> && !used.compareAndSet(false, true)) {
> LOG.debug("Command [{0}] key [{1}] already executed
> for [{2}]", getName(), getEntityKey(), this.toString());
> return null;
> }
> LOG.trace("Load state for [{0}]", getEntityKey());
> loadState();
> LOG.trace("Precondition check for command [{0}] key
> [{1}]", getName(), getEntityKey());
> verifyPrecondition();
> LOG.debug("Execute command [{0}] key [{1}]", getName(),
> getEntityKey());
> Instrumentation.Cron executeCron = new
> Instrumentation.Cron();
> {code}
> It doesn't take care of requeing, in case of locks not acquired.
> {code}
> instrumentation.incr(INSTRUMENTATION_GROUP, getName() +
> ".executions", 1);
> {code}
> It should be after lock is acquired.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)