Skip to content

Commit

Permalink
OOZIE-1473 getKey() not overridden in some commands causing duplicate…
Browse files Browse the repository at this point in the history
…s in queue
  • Loading branch information
shwethags committed Jan 28, 2014
1 parent fee10db commit f60ae54
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@ public String getEntityKey() {
return actionId;
}

@Override
public String getKey() {
return getName() + "_" + actionId;
}

/* (non-Javadoc)
* @see org.apache.oozie.command.XCommand#isLockRequired()
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ public String getEntityKey() {
return jobId;
}

@Override
public String getKey() {
return getName() + "_" + jobId;
}

@Override
protected boolean isLockRequired() {
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ public String getEntityKey() {
return actionBean.getJobId();
}

@Override
public String getKey() {
return getName() + "_" + actionBean.getId();
}

/* (non-Javadoc)
* @see org.apache.oozie.command.XCommand#isLockRequired()
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ public String getEntityKey() {
return this.jobId;
}

@Override
public String getKey() {
return getName() + "_" + actionId;
}

@Override
protected void loadState() throws CommandException {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ public String getEntityKey() {
return this.jobId;
}

@Override
public String getKey() {
return getName() + "_" + jobId + "_" + actionId;
}

@Override
protected void loadState() throws CommandException {
try {
Expand Down

0 comments on commit f60ae54

Please sign in to comment.