public BTree(IBufferCache bufferCache, IPageManager freePageManager, ITreeIndexFrameFactory interiorFrameFactory, ITreeIndexFrameFactory leafFrameFactory, IBinaryComparatorFactory[] cmpFactories, int fieldCount, FileReference file) { super(bufferCache, freePageManager, interiorFrameFactory, leafFrameFactory, cmpFactories, fieldCount, file); this.treeLatch = new ReentrantReadWriteLock(true); this.smoCounter = new AtomicInteger(); ITreeIndexFrame leafFrame = leafFrameFactory.createFrame(); ITreeIndexFrame interiorFrame = interiorFrameFactory.createFrame(); maxTupleSize = Math.min(leafFrame.getMaxTupleSize(bufferCache.getPageSize()), interiorFrame.getMaxTupleSize(bufferCache.getPageSize())); }
public RTree(IBufferCache bufferCache, IPageManager freePageManager, ITreeIndexFrameFactory interiorFrameFactory, ITreeIndexFrameFactory leafFrameFactory, IBinaryComparatorFactory[] cmpFactories, int fieldCount, FileReference file, boolean isPointMBR) { super(bufferCache, freePageManager, interiorFrameFactory, leafFrameFactory, cmpFactories, fieldCount, file); globalNsn = new AtomicLong(); ITreeIndexFrame leafFrame = leafFrameFactory.createFrame(); ITreeIndexFrame interiorFrame = interiorFrameFactory.createFrame(); maxTupleSize = Math.min(leafFrame.getMaxTupleSize(bufferCache.getPageSize()), interiorFrame.getMaxTupleSize(bufferCache.getPageSize())); this.isPointMBR = isPointMBR; }
int tupleBytes = tupleWriter.bytesRequired(tuple, 0, cmp.getKeyFieldCount()); int spaceNeeded = tupleBytes + slotSize + 4; if (tupleBytes > interiorFrame.getMaxTupleSize(BTree.this.bufferCache.getPageSize())) { throw HyracksDataException.create(ErrorCode.RECORD_IS_TOO_LARGE, tupleBytes, interiorFrame.getMaxTupleSize(BTree.this.bufferCache.getPageSize()));