MemorySegment[] close() throws IOException { final MemorySegment current = getCurrentSegment(); if (current == null) { throw new IllegalStateException("Illegal State in HashPartition: No current buffer when finilizing build side."); } finalizeSegment(current, getCurrentPositionInSegment()); clear(); if (this.writer == null) { this.targetList.add(current); MemorySegment[] buffers = this.targetList.toArray(new MemorySegment[this.targetList.size()]); this.targetList.clear(); return buffers; } else { writer.writeBlock(current); return null; } }
MemorySegment[] close() throws IOException { final MemorySegment current = getCurrentSegment(); if (current == null) { throw new IllegalStateException("Illegal State in HashPartition: No current buffer when finilizing build side."); } finalizeSegment(current, getCurrentPositionInSegment()); clear(); if (this.writer == null) { this.targetList.add(current); MemorySegment[] buffers = this.targetList.toArray(new MemorySegment[this.targetList.size()]); this.targetList.clear(); return buffers; } else { writer.writeBlock(current); return null; } }
MemorySegment[] close() throws IOException { final MemorySegment current = getCurrentSegment(); if (current == null) { throw new IllegalStateException("Illegal State in HashPartition: No current buffer when finilizing build side."); } finalizeSegment(current, getCurrentPositionInSegment()); clear(); if (this.writer == null) { this.targetList.add(current); MemorySegment[] buffers = this.targetList.toArray(new MemorySegment[this.targetList.size()]); this.targetList.clear(); return buffers; } else { writer.writeBlock(current); return null; } }
MemorySegment[] close() throws IOException { final MemorySegment current = getCurrentSegment(); if (current == null) { throw new IllegalStateException("Illegal State in HashPartition: No current buffer when finilizing build side."); } finalizeSegment(current, getCurrentPositionInSegment()); clear(); if (this.writer == null) { this.targetList.add(current); MemorySegment[] buffers = this.targetList.toArray(new MemorySegment[this.targetList.size()]); this.targetList.clear(); return buffers; } else { writer.writeBlock(current); return null; } }
public void finalizeBuildPhase(IOManager ioAccess, FileIOChannel.Enumerator probeChannelEnumerator, LinkedBlockingQueue<MemorySegment> bufferReturnQueue) throws IOException { this.finalBufferLimit = this.buildSideWriteBuffer.getCurrentPositionInSegment(); this.partitionBuffers = this.buildSideWriteBuffer.close(); if (!isInMemory()) { // close the channel. note that in the spilled case, the build-side-buffer will have sent off // the last segment and it will be returned to the write-behind-buffer queue. this.buildSideChannel.close(); // create the channel for the probe side and claim one buffer for it this.probeSideChannel = ioAccess.createBlockChannelWriter(probeChannelEnumerator.next(), bufferReturnQueue); // creating the ChannelWriterOutputView without memory will cause it to draw one segment from the // write behind queue, which is the spare segment we had above. this.probeSideBuffer = new ChannelWriterOutputView(this.probeSideChannel, this.memorySegmentSize); } }
public void finalizeBuildPhase(IOManager ioAccess, FileIOChannel.Enumerator probeChannelEnumerator, LinkedBlockingQueue<MemorySegment> bufferReturnQueue) throws IOException { this.finalBufferLimit = this.buildSideWriteBuffer.getCurrentPositionInSegment(); this.partitionBuffers = this.buildSideWriteBuffer.close(); if (!isInMemory()) { // close the channel. note that in the spilled case, the build-side-buffer will have sent off // the last segment and it will be returned to the write-behind-buffer queue. this.buildSideChannel.close(); // create the channel for the probe side and claim one buffer for it this.probeSideChannel = ioAccess.createBlockChannelWriter(probeChannelEnumerator.next(), bufferReturnQueue); // creating the ChannelWriterOutputView without memory will cause it to draw one segment from the // write behind queue, which is the spare segment we had above. this.probeSideBuffer = new ChannelWriterOutputView(this.probeSideChannel, this.memorySegmentSize); } }
public void finalizeBuildPhase(IOManager ioAccess, FileIOChannel.Enumerator probeChannelEnumerator, LinkedBlockingQueue<MemorySegment> bufferReturnQueue) throws IOException { this.finalBufferLimit = this.buildSideWriteBuffer.getCurrentPositionInSegment(); this.partitionBuffers = this.buildSideWriteBuffer.close(); if (!isInMemory()) { // close the channel. note that in the spilled case, the build-side-buffer will have sent off // the last segment and it will be returned to the write-behind-buffer queue. this.buildSideChannel.close(); // create the channel for the probe side and claim one buffer for it this.probeSideChannel = ioAccess.createBlockChannelWriter(probeChannelEnumerator.next(), bufferReturnQueue); // creating the ChannelWriterOutputView without memory will cause it to draw one segment from the // write behind queue, which is the spare segment we had above. this.probeSideBuffer = new ChannelWriterOutputView(this.probeSideChannel, this.memorySegmentSize); } }
public void finalizeBuildPhase(IOManager ioAccess, FileIOChannel.Enumerator probeChannelEnumerator, LinkedBlockingQueue<MemorySegment> bufferReturnQueue) throws IOException { this.finalBufferLimit = this.buildSideWriteBuffer.getCurrentPositionInSegment(); this.partitionBuffers = this.buildSideWriteBuffer.close(); if (!isInMemory()) { // close the channel. note that in the spilled case, the build-side-buffer will have sent off // the last segment and it will be returned to the write-behind-buffer queue. this.buildSideChannel.close(); // create the channel for the probe side and claim one buffer for it this.probeSideChannel = ioAccess.createBlockChannelWriter(probeChannelEnumerator.next(), bufferReturnQueue); // creating the ChannelWriterOutputView without memory will cause it to draw one segment from the // write behind queue, which is the spare segment we had above. this.probeSideBuffer = new ChannelWriterOutputView(this.probeSideChannel, this.memorySegmentSize); } }
long getCurrentPointer() { return (((long) this.currentBlockNumber) << this.sizeBits) + getCurrentPositionInSegment(); }
long getCurrentPointer() { return (((long) this.currentBlockNumber) << this.sizeBits) + getCurrentPositionInSegment(); }
long getCurrentPointer() { return (((long) this.currentBlockNumber) << this.sizeBits) + getCurrentPositionInSegment(); }
long getCurrentPointer() { return (((long) this.currentBlockNumber) << this.sizeBits) + getCurrentPositionInSegment(); }