Github user sudheeshkatkam commented on a diff in the pull request:
https://github.com/apache/drill/pull/723#discussion_r97907175
--- Diff:
exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/columnreaders/AsyncPageReader.java
---
@@ -41,26 +42,33 @@
import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.concurrent.Callable;
+import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Future;
+import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;
import static org.apache.parquet.column.Encoding.valueOf;
class AsyncPageReader extends PageReader {
static final org.slf4j.Logger logger =
org.slf4j.LoggerFactory.getLogger(AsyncPageReader.class);
-
private ExecutorService threadPool;
- private Future<ReadStatus> asyncPageRead;
+ private long queueSize;
+ private LinkedBlockingQueue<ReadStatus> pageQueue;
+ private ConcurrentLinkedQueue<Future<Boolean>> asyncPageRead;
--- End diff --
Nice comments below about how consumer and producer create new tasks when
this queue is full/not. Please add the same comments here to clarify the
overall flow.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---