Github user JamesRTaylor commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/171#discussion_r65807620
  
    --- Diff: 
phoenix-core/src/main/java/org/apache/phoenix/iterate/DeferredByteBufferSegmentQueue.java
 ---
    @@ -0,0 +1,123 @@
    +package org.apache.phoenix.iterate;
    +
    +import org.apache.commons.io.output.DeferredFileOutputStream;
    +import org.apache.phoenix.memory.MemoryManager;
    +import org.apache.phoenix.memory.MemoryManager.MemoryChunk;
    +
    +import java.io.*;
    +import java.util.*;
    +
    +public abstract class DeferredByteBufferSegmentQueue<T> extends 
BufferSegmentQueue<T> {
    +
    +    final MemoryChunk chunk;
    +
    +    public DeferredByteBufferSegmentQueue(int index, int thresholdBytes,
    +                                          boolean hasMaxQueueSize, 
MemoryManager memoryManager) {
    +        super(index, thresholdBytes, hasMaxQueueSize);
    +        chunk = memoryManager.allocate(thresholdBytes);
    --- End diff --
    
    FYI, SpoolingResultIterator is deprecated, so no need to refactor. Feel 
free to copy/paste code from there, though, as conceptually it's what you need.


---
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.
---

Reply via email to