HBASE-18888 StealJobQueue should call super() to init the

PriorityBlockingQueue (Ram)
This commit is contained in:
Ramkrishna 2017-09-28 10:37:23 +05:30
parent 75febcea89
commit f73a3a6fb7
1 changed files with 1 additions and 15 deletions

View File

@ -50,21 +50,7 @@ public class StealJobQueue<T> extends PriorityBlockingQueue<T> {
private final transient Condition notEmpty = lock.newCondition(); private final transient Condition notEmpty = lock.newCondition();
public StealJobQueue(Comparator<? super T> comparator) { public StealJobQueue(Comparator<? super T> comparator) {
this.stealFromQueue = new PriorityBlockingQueue<T>(11, comparator) { this(11, 11, comparator);
private static final long serialVersionUID = -7070010365201826904L;
@Override
public boolean offer(T t) {
lock.lock();
try {
notEmpty.signal();
return super.offer(t);
} finally {
lock.unlock();
}
}
};
} }
public StealJobQueue(int initCapacity, int stealFromQueueInitCapacity, public StealJobQueue(int initCapacity, int stealFromQueueInitCapacity,