/** * Set new input for probe side * @throws java.io.IOException */ public void reopenProbe(MutableObjectIterator<V1> probeInput) throws IOException { reopenHashTable.reopenProbe(probeInput); } }
initTable(initialBucketCount, initialPartitionFanOut); ReOpenableHashPartition<BT, PT> part = (ReOpenableHashPartition<BT, PT>) this.partitionsBeingBuilt.get(i); if (part.isInMemory()) { ensureNumBuffersReturned(part.initialPartitionBuffersCount); part.restorePartitionBuffers(ioManager, availableMemory); final int hashCode = hash(pIter.getCurrentHashCode(), 0); final int posHashCode = hashCode % initialBucketCount; final long pointer = pIter.getPointer(); final int bucketInSegmentPos = (posHashCode & this.bucketsPerSegmentMask) << NUM_INTRA_BUCKET_BITS; final MemorySegment bucket = this.buckets[bucketArrayPos]; insertBucketEntry(part, bucket, bucketInSegmentPos, hashCode, pointer, true); this.writeBehindBuffers.add(getNextBuffer()); this.writeBehindBuffersAvailable++;
@Override public <BT, PT> MutableHashTable<BT, PT> getHashJoin( TypeSerializer<BT> buildSideSerializer, TypeComparator<BT> buildSideComparator, TypeSerializer<PT> probeSideSerializer, TypeComparator<PT> probeSideComparator, TypePairComparator<PT, BT> pairComparator, MemoryManager memManager, IOManager ioManager, AbstractInvokable ownerTask, double memoryFraction, boolean useBitmapFilters) throws MemoryAllocationException { final int numPages = memManager.computeNumberOfPages(memoryFraction); final List<MemorySegment> memorySegments = memManager.allocatePages(ownerTask, numPages); return new ReOpenableMutableHashTable<BT, PT>(buildSideSerializer, probeSideSerializer, buildSideComparator, probeSideComparator, pairComparator, memorySegments, ioManager, useBitmapFilters); }
@Override protected boolean prepareNextPartition() throws IOException { // check if there will be further partition processing. this.furtherPartitioning = false; for (int i = 0; i < this.partitionsBeingBuilt.size(); i++) { final HashPartition<BT, PT> p = this.partitionsBeingBuilt.get(i); if (!p.isInMemory() && p.getProbeSideRecordCount() != 0) { furtherPartitioning = true; break; } } if (furtherPartitioning) { ((ReOpenableMutableHashTable<BT, PT>) this).storeInitialHashTable(); } return super.prepareNextPartition(); }
initTable(initialBucketCount, initialPartitionFanOut); ReOpenableHashPartition<BT, PT> part = (ReOpenableHashPartition<BT, PT>) this.partitionsBeingBuilt.get(i); if (part.isInMemory()) { ensureNumBuffersReturned(part.initialPartitionBuffersCount); part.restorePartitionBuffers(ioManager, availableMemory); final int hashCode = hash(pIter.getCurrentHashCode(), 0); final int posHashCode = hashCode % initialBucketCount; final long pointer = pIter.getPointer(); final int bucketInSegmentPos = (posHashCode & this.bucketsPerSegmentMask) << NUM_INTRA_BUCKET_BITS; final MemorySegment bucket = this.buckets[bucketArrayPos]; insertBucketEntry(part, bucket, bucketInSegmentPos, hashCode, pointer, true); this.writeBehindBuffers.add(getNextBuffer()); this.writeBehindBuffersAvailable++;
@Override public <BT, PT> MutableHashTable<BT, PT> getHashJoin( TypeSerializer<BT> buildSideSerializer, TypeComparator<BT> buildSideComparator, TypeSerializer<PT> probeSideSerializer, TypeComparator<PT> probeSideComparator, TypePairComparator<PT, BT> pairComparator, MemoryManager memManager, IOManager ioManager, AbstractInvokable ownerTask, double memoryFraction, boolean useBitmapFilters) throws MemoryAllocationException { final int numPages = memManager.computeNumberOfPages(memoryFraction); final List<MemorySegment> memorySegments = memManager.allocatePages(ownerTask, numPages); return new ReOpenableMutableHashTable<BT, PT>(buildSideSerializer, probeSideSerializer, buildSideComparator, probeSideComparator, pairComparator, memorySegments, ioManager, useBitmapFilters); }
@Override protected boolean prepareNextPartition() throws IOException { // check if there will be further partition processing. this.furtherPartitioning = false; for (int i = 0; i < this.partitionsBeingBuilt.size(); i++) { final HashPartition<BT, PT> p = this.partitionsBeingBuilt.get(i); if (!p.isInMemory() && p.getProbeSideRecordCount() != 0) { furtherPartitioning = true; break; } } if (furtherPartitioning) { ((ReOpenableMutableHashTable<BT, PT>) this).storeInitialHashTable(); } return super.prepareNextPartition(); }
initTable(initialBucketCount, initialPartitionFanOut); ReOpenableHashPartition<BT, PT> part = (ReOpenableHashPartition<BT, PT>) this.partitionsBeingBuilt.get(i); if (part.isInMemory()) { ensureNumBuffersReturned(part.initialPartitionBuffersCount); part.restorePartitionBuffers(ioManager, availableMemory); final int hashCode = hash(pIter.getCurrentHashCode(), 0); final int posHashCode = hashCode % initialBucketCount; final long pointer = pIter.getPointer(); final int bucketInSegmentPos = (posHashCode & this.bucketsPerSegmentMask) << NUM_INTRA_BUCKET_BITS; final MemorySegment bucket = this.buckets[bucketArrayPos]; insertBucketEntry(part, bucket, bucketInSegmentPos, hashCode, pointer, true); this.writeBehindBuffers.add(getNextBuffer()); this.writeBehindBuffersAvailable++;
/** * Set new input for probe side * @throws IOException */ public void reopenProbe(MutableObjectIterator<V2> probeInput) throws IOException { reopenHashTable.reopenProbe(probeInput); } }
@Override public <BT, PT> MutableHashTable<BT, PT> getHashJoin( TypeSerializer<BT> buildSideSerializer, TypeComparator<BT> buildSideComparator, TypeSerializer<PT> probeSideSerializer, TypeComparator<PT> probeSideComparator, TypePairComparator<PT, BT> pairComparator, MemoryManager memManager, IOManager ioManager, AbstractInvokable ownerTask, double memoryFraction, boolean useBitmapFilters) throws MemoryAllocationException { final int numPages = memManager.computeNumberOfPages(memoryFraction); final List<MemorySegment> memorySegments = memManager.allocatePages(ownerTask, numPages); return new ReOpenableMutableHashTable<BT, PT>(buildSideSerializer, probeSideSerializer, buildSideComparator, probeSideComparator, pairComparator, memorySegments, ioManager, useBitmapFilters); }
@Override protected boolean prepareNextPartition() throws IOException { // check if there will be further partition processing. this.furtherPartitioning = false; for (int i = 0; i < this.partitionsBeingBuilt.size(); i++) { final HashPartition<BT, PT> p = this.partitionsBeingBuilt.get(i); if (!p.isInMemory() && p.getProbeSideRecordCount() != 0) { furtherPartitioning = true; break; } } if (furtherPartitioning) { ((ReOpenableMutableHashTable<BT, PT>) this).storeInitialHashTable(); } return super.prepareNextPartition(); }
initTable(initialBucketCount, initialPartitionFanOut); ReOpenableHashPartition<BT, PT> part = (ReOpenableHashPartition<BT, PT>) this.partitionsBeingBuilt.get(i); if (part.isInMemory()) { ensureNumBuffersReturned(part.initialPartitionBuffersCount); part.restorePartitionBuffers(ioManager, availableMemory); final int hashCode = hash(pIter.getCurrentHashCode(), 0); final int posHashCode = hashCode % initialBucketCount; final long pointer = pIter.getPointer(); final int bucketInSegmentPos = (posHashCode & this.bucketsPerSegmentMask) << NUM_INTRA_BUCKET_BITS; final MemorySegment bucket = this.buckets[bucketArrayPos]; insertBucketEntry(part, bucket, bucketInSegmentPos, hashCode, pointer, true); this.writeBehindBuffers.add(getNextBuffer()); this.writeBehindBuffersAvailable++;
/** * Set new input for probe side * @throws IOException */ public void reopenProbe(MutableObjectIterator<V1> probeInput) throws IOException { reopenHashTable.reopenProbe(probeInput); } }
@Override public <BT, PT> MutableHashTable<BT, PT> getHashJoin( TypeSerializer<BT> buildSideSerializer, TypeComparator<BT> buildSideComparator, TypeSerializer<PT> probeSideSerializer, TypeComparator<PT> probeSideComparator, TypePairComparator<PT, BT> pairComparator, MemoryManager memManager, IOManager ioManager, AbstractInvokable ownerTask, double memoryFraction, boolean useBitmapFilters) throws MemoryAllocationException { final int numPages = memManager.computeNumberOfPages(memoryFraction); final List<MemorySegment> memorySegments = memManager.allocatePages(ownerTask, numPages); return new ReOpenableMutableHashTable<BT, PT>(buildSideSerializer, probeSideSerializer, buildSideComparator, probeSideComparator, pairComparator, memorySegments, ioManager, useBitmapFilters); }
@Override protected boolean prepareNextPartition() throws IOException { // check if there will be further partition processing. this.furtherPartitioning = false; for (int i = 0; i < this.partitionsBeingBuilt.size(); i++) { final HashPartition<BT, PT> p = this.partitionsBeingBuilt.get(i); if (!p.isInMemory() && p.getProbeSideRecordCount() != 0) { furtherPartitioning = true; break; } } if (furtherPartitioning) { ((ReOpenableMutableHashTable<BT, PT>) this).storeInitialHashTable(); } return super.prepareNextPartition(); }
/** * Set new input for probe side * @throws java.io.IOException */ public void reopenProbe(MutableObjectIterator<V2> probeInput) throws IOException { reopenHashTable.reopenProbe(probeInput); } }
@Override public <BT, PT> MutableHashTable<BT, PT> getHashJoin( TypeSerializer<BT> buildSideSerializer, TypeComparator<BT> buildSideComparator, TypeSerializer<PT> probeSideSerializer, TypeComparator<PT> probeSideComparator, TypePairComparator<PT, BT> pairComparator, MemoryManager memManager, IOManager ioManager, AbstractInvokable ownerTask, double memoryFraction, boolean useBitmapFilters) throws MemoryAllocationException { final int numPages = memManager.computeNumberOfPages(memoryFraction); final List<MemorySegment> memorySegments = memManager.allocatePages(ownerTask, numPages); return new ReOpenableMutableHashTable<BT, PT>(buildSideSerializer, probeSideSerializer, buildSideComparator, probeSideComparator, pairComparator, memorySegments, ioManager, useBitmapFilters); }
/** * Set new input for probe side * @throws java.io.IOException */ public void reopenProbe(MutableObjectIterator<V1> probeInput) throws IOException { reopenHashTable.reopenProbe(probeInput); } }
@Override public <BT, PT> MutableHashTable<BT, PT> getHashJoin( TypeSerializer<BT> buildSideSerializer, TypeComparator<BT> buildSideComparator, TypeSerializer<PT> probeSideSerializer, TypeComparator<PT> probeSideComparator, TypePairComparator<PT, BT> pairComparator, MemoryManager memManager, IOManager ioManager, AbstractInvokable ownerTask, double memoryFraction, boolean useBitmapFilters) throws MemoryAllocationException { final int numPages = memManager.computeNumberOfPages(memoryFraction); final List<MemorySegment> memorySegments = memManager.allocatePages(ownerTask, numPages); return new ReOpenableMutableHashTable<BT, PT>(buildSideSerializer, probeSideSerializer, buildSideComparator, probeSideComparator, pairComparator, memorySegments, ioManager, useBitmapFilters); }
/** * Set new input for probe side * @throws java.io.IOException */ public void reopenProbe(MutableObjectIterator<V1> probeInput) throws IOException { reopenHashTable.reopenProbe(probeInput); } }