Reverting HBASE-2077 redux
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@916506 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bfce9fa0ef
commit
ee6ae40426
|
@ -90,19 +90,14 @@ public class Leases extends Thread {
|
||||||
if (lease == null) {
|
if (lease == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
// A lease expired. Run the expired code before removing from queue
|
||||||
|
// since its presence in queue is used to see if lease exists still.
|
||||||
|
if (lease.getListener() == null) {
|
||||||
|
LOG.error("lease listener is null for lease " + lease.getLeaseName());
|
||||||
|
} else {
|
||||||
|
lease.getListener().leaseExpired();
|
||||||
|
}
|
||||||
synchronized (leaseQueue) {
|
synchronized (leaseQueue) {
|
||||||
if (lease.getExpirationTime() <= System.currentTimeMillis()) {
|
|
||||||
leaseQueue.add(lease);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
// A lease expired. Run the expired code before removing from queue
|
|
||||||
// since its presence in queue is used to see if lease exists still.
|
|
||||||
if (lease.getListener() == null) {
|
|
||||||
LOG.error("lease listener is null for lease " + lease.getLeaseName());
|
|
||||||
} else {
|
|
||||||
lease.getListener().leaseExpired();
|
|
||||||
}
|
|
||||||
|
|
||||||
leases.remove(lease.getLeaseName());
|
leases.remove(lease.getLeaseName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue