/** * Move to next bucket, return true while move to a on heap bucket, return false while move to a spilled bucket * or there is no more bucket. */ private boolean moveToNextBucket() { scanCount++; if (scanCount > totalBucketNumber - 1) { return false; } // move to next bucket, update all the current bucket status with new bucket information. final int bucketArrayPos = scanCount >> this.bucketsPerSegmentBits; final int currentBucketInSegmentOffset = (scanCount & this.bucketsPerSegmentMask) << NUM_INTRA_BUCKET_BITS; MemorySegment currentBucket = this.buckets[bucketArrayPos]; final int partitionNumber = currentBucket.get(currentBucketInSegmentOffset + HEADER_PARTITION_OFFSET); final HashPartition<BT, PT> p = this.partitionsBeingBuilt.get(partitionNumber); if (p.isInMemory()) { setBucket(currentBucket, p.overflowSegments, p, currentBucketInSegmentOffset); return true; } else { return false; } }
/** * Move to next bucket, return true while move to a on heap bucket, return false while move to a spilled bucket * or there is no more bucket. */ private boolean moveToNextBucket() { scanCount++; if (scanCount > totalBucketNumber - 1) { return false; } // move to next bucket, update all the current bucket status with new bucket information. final int bucketArrayPos = scanCount >> this.bucketsPerSegmentBits; final int currentBucketInSegmentOffset = (scanCount & this.bucketsPerSegmentMask) << NUM_INTRA_BUCKET_BITS; MemorySegment currentBucket = this.buckets[bucketArrayPos]; final int partitionNumber = currentBucket.get(currentBucketInSegmentOffset + HEADER_PARTITION_OFFSET); final HashPartition<BT, PT> p = this.partitionsBeingBuilt.get(partitionNumber); if (p.isInMemory()) { setBucket(currentBucket, p.overflowSegments, p, currentBucketInSegmentOffset); return true; } else { return false; } }
/** * Move to next bucket, return true while move to a on heap bucket, return false while move to a spilled bucket * or there is no more bucket. */ private boolean moveToNextBucket() { scanCount++; if (scanCount > totalBucketNumber - 1) { return false; } // move to next bucket, update all the current bucket status with new bucket information. final int bucketArrayPos = scanCount >> this.bucketsPerSegmentBits; final int currentBucketInSegmentOffset = (scanCount & this.bucketsPerSegmentMask) << NUM_INTRA_BUCKET_BITS; MemorySegment currentBucket = this.buckets[bucketArrayPos]; final int partitionNumber = currentBucket.get(currentBucketInSegmentOffset + HEADER_PARTITION_OFFSET); final HashPartition<BT, PT> p = this.partitionsBeingBuilt.get(partitionNumber); if (p.isInMemory()) { setBucket(currentBucket, p.overflowSegments, p, currentBucketInSegmentOffset); return true; } else { return false; } }
/** * Move to next bucket, return true while move to a on heap bucket, return false while move to a spilled bucket * or there is no more bucket. */ private boolean moveToNextBucket() { scanCount++; if (scanCount > totalBucketNumber - 1) { return false; } // move to next bucket, update all the current bucket status with new bucket information. final int bucketArrayPos = scanCount >> this.bucketsPerSegmentBits; final int currentBucketInSegmentOffset = (scanCount & this.bucketsPerSegmentMask) << NUM_INTRA_BUCKET_BITS; MemorySegment currentBucket = this.buckets[bucketArrayPos]; final int partitionNumber = currentBucket.get(currentBucketInSegmentOffset + HEADER_PARTITION_OFFSET); final HashPartition<BT, PT> p = this.partitionsBeingBuilt.get(partitionNumber); if (p.isInMemory()) { setBucket(currentBucket, p.overflowSegments, p, currentBucketInSegmentOffset); return true; } else { return false; } }