belugabehr commented on a change in pull request #1280:
URL: https://github.com/apache/hive/pull/1280#discussion_r458795827
##########
File path: storage-api/src/java/org/apache/hive/common/util/BloomKFilter.java
##########
@@ -506,18 +505,19 @@ public ElementWrapper(byte[] bytes, int start, int
length, int modifiedStart, in
}
private static class BloomFilterMergeWorker implements Runnable {
- Queue<ElementWrapper> queue = new LinkedBlockingDeque<>();
+ ArrayBlockingQueue<ElementWrapper> queue;
private ExecutorService executor;
private byte[] bfAggregation;
private int bfAggregationStart;
private int bfAggregationLength;
- public BloomFilterMergeWorker(ExecutorService executor, byte[]
bfAggregation, int bfAggregationStart, int bfAggregationLength) {
+ public BloomFilterMergeWorker(ExecutorService executor, int batchSize,
byte[] bfAggregation, int bfAggregationStart, int bfAggregationLength) {
this.executor = executor;
Review comment:
@abstractdog Hey, ya, of course. This just goes with what I was saying
about the relationship between Runnable/Thread/Callable and ExecutorService.
The thread rarely needs a reference to its own ExecutorService. The only
reason this was being capture was to support `!executor.isTerminated()` which
is not the correct thing to do. Please remove the `this.executor` instance
variable and/or change the constructor to not include it.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]