public SpillingBuffer(IOManager ioManager, MemorySegmentSource memSource, int segmentSize) { super(memSource.nextSegment(), segmentSize, 0); this.fullSegments = new ArrayList<MemorySegment>(16); this.memorySource = memSource; this.ioManager = ioManager; }
public SpillingBuffer(IOManager ioManager, MemorySegmentSource memSource, int segmentSize) { super(memSource.nextSegment(), segmentSize, 0); this.fullSegments = new ArrayList<MemorySegment>(16); this.memorySource = memSource; this.ioManager = ioManager; }
public SpillingBuffer(IOManager ioManager, MemorySegmentSource memSource, int segmentSize) { super(memSource.nextSegment(), segmentSize, 0); this.fullSegments = new ArrayList<MemorySegment>(16); this.memorySource = memSource; this.ioManager = ioManager; }
public SpillingBuffer(IOManager ioManager, MemorySegmentSource memSource, int segmentSize) { super(memSource.nextSegment(), segmentSize, 0); this.fullSegments = new ArrayList<MemorySegment>(16); this.memorySource = memSource; this.ioManager = ioManager; }
@Override protected MemorySegment nextSegment(MemorySegment current, int positionInCurrent) throws EOFException { final MemorySegment next = this.memorySource.nextSegment(); if (next != null) { this.fullSegments.add(next); this.segmentNum++; return next; } else { throw new EOFException(); } }
@Override protected MemorySegment nextSegment(MemorySegment current, int bytesUsed) throws IOException { MemorySegment next = this.memSource.nextSegment(); if(next == null) { throw new EOFException(); } this.pages.add(next); this.currentPageNumber++; return next; }
@Override protected MemorySegment nextSegment(MemorySegment current, int positionInCurrent) throws EOFException { final MemorySegment next = this.memorySource.nextSegment(); if (next != null) { this.fullSegments.add(next); this.segmentNum++; return next; } else { throw new EOFException(); } }
@Override protected MemorySegment nextSegment(MemorySegment current, int bytesUsed) throws IOException { MemorySegment next = this.memSource.nextSegment(); if(next == null) { throw new EOFException(); } this.pages.add(next); this.currentPageNumber++; return next; }
@Override protected MemorySegment nextSegment(MemorySegment current, int bytesUsed) throws IOException { MemorySegment next = this.memSource.nextSegment(); if(next == null) { throw new EOFException(); } this.pages.add(next); this.currentPageNumber++; return next; }
@Override protected MemorySegment nextSegment(MemorySegment current, int bytesUsed) throws IOException { MemorySegment next = this.memSource.nextSegment(); if(next == null) { throw new EOFException(); } this.pages.add(next); this.currentPageNumber++; return next; }
@Override protected MemorySegment nextSegment(MemorySegment current, int positionInCurrent) throws EOFException { final MemorySegment next = this.memorySource.nextSegment(); if (next != null) { this.fullSegments.add(next); this.segmentNum++; return next; } else { throw new EOFException(); } }
@Override protected MemorySegment nextSegment(MemorySegment current, int positionInCurrent) throws EOFException { final MemorySegment next = this.memorySource.nextSegment(); if (next != null) { this.fullSegments.add(next); this.segmentNum++; return next; } else { throw new EOFException(); } }
public SimpleCollectingOutputView(List<MemorySegment> fullSegmentTarget, MemorySegmentSource memSource, int segmentSize) { super(memSource.nextSegment(), segmentSize, 0); this.segmentSizeBits = MathUtils.log2strict(segmentSize); this.fullSegments = fullSegmentTarget; this.memorySource = memSource; this.fullSegments.add(getCurrentSegment()); }
public SimpleCollectingOutputView(List<MemorySegment> fullSegmentTarget, MemorySegmentSource memSource, int segmentSize) { super(memSource.nextSegment(), segmentSize, 0); this.segmentSizeBits = MathUtils.log2strict(segmentSize); this.fullSegments = fullSegmentTarget; this.memorySource = memSource; this.fullSegments.add(getCurrentSegment()); }
public SimpleCollectingOutputView(List<MemorySegment> fullSegmentTarget, MemorySegmentSource memSource, int segmentSize) { super(memSource.nextSegment(), segmentSize, 0); this.segmentSizeBits = MathUtils.log2strict(segmentSize); this.fullSegments = fullSegmentTarget; this.memorySource = memSource; this.fullSegments.add(getCurrentSegment()); }
public SimpleCollectingOutputView(List<MemorySegment> fullSegmentTarget, MemorySegmentSource memSource, int segmentSize) { super(memSource.nextSegment(), segmentSize, 0); this.segmentSizeBits = MathUtils.log2strict(segmentSize); this.fullSegments = fullSegmentTarget; this.memorySource = memSource; this.fullSegments.add(getCurrentSegment()); }
@Override protected MemorySegment nextSegment(MemorySegment current, int bytesUsed) throws IOException { final MemorySegment next; if (this.writer == null) { // Must first add current segment: // This may happen when you need to spill: // A partition called nextSegment, can not get memory, need to spill, the result // give itself to the spill, Since it is switching currentSeg, it is necessary // to give the previous currSeg to spill. this.targetList.add(current); next = this.memSource.nextSegment(); buildStageSegments.add(next); } else { this.writer.writeBlock(current); try { next = this.writer.getReturnQueue().take(); } catch (InterruptedException iex) { throw new IOException("Hash Join Partition was interrupted while " + "grabbing a new write-behind buffer."); } } this.currentBlockNumber++; return next; }
@Override protected MemorySegment nextSegment(MemorySegment current, int bytesUsed) throws IOException { finalizeSegment(current, bytesUsed); final MemorySegment next; if (this.writer == null) { this.targetList.add(current); next = this.memSource.nextSegment(); } else { this.writer.writeBlock(current); try { next = this.writer.getReturnQueue().take(); } catch (InterruptedException iex) { throw new IOException("Hash Join Partition was interrupted while grabbing a new write-behind buffer."); } } this.currentBlockNumber++; return next; }
@Override protected MemorySegment nextSegment(MemorySegment current, int bytesUsed) throws IOException { finalizeSegment(current, bytesUsed); final MemorySegment next; if (this.writer == null) { this.targetList.add(current); next = this.memSource.nextSegment(); } else { this.writer.writeBlock(current); try { next = this.writer.getReturnQueue().take(); } catch (InterruptedException iex) { throw new IOException("Hash Join Partition was interrupted while grabbing a new write-behind buffer."); } } this.currentBlockNumber++; return next; }
@Override protected MemorySegment nextSegment(MemorySegment current, int bytesUsed) throws IOException { finalizeSegment(current, bytesUsed); final MemorySegment next; if (this.writer == null) { this.targetList.add(current); next = this.memSource.nextSegment(); } else { this.writer.writeBlock(current); try { next = this.writer.getReturnQueue().take(); } catch (InterruptedException iex) { throw new IOException("Hash Join Partition was interrupted while grabbing a new write-behind buffer."); } } this.currentBlockNumber++; return next; }