#include <LcsClusterVerifier.h>
Inheritance diagram for LcsClusterVerifier:
Public Member Functions | |
LcsClusterVerifier (BTreeDescriptor const &treeDescriptor) | |
ClusterPageData & | getPageData () |
Retrieves cluster page data for the current cluster page. | |
void | setRootPageId (PageId rootPageId) |
Sets the root pageId of the underlying btree corresponding to the cluster. | |
void | initColumnReaders (uint nClusterColsInit, TupleProjection const &clusterProj) |
Initializes cluster reader with column readers. | |
void | open () |
Initializes state variables used by cluster reader. | |
void | close () |
Performs shutdown on cluster reader. | |
bool | getFirstClusterPageForRead (PConstLcsClusterNode &pBlock) |
Gets first page in a cluster. | |
bool | getNextClusterPageForRead (PConstLcsClusterNode &pBlock) |
Gets next page in a cluster, based on current position in btree. | |
bool | isPositioned () const |
Returns true if positioned within some range in a batch. | |
LcsRid | getRangeStartRid () const |
Returns first rid in a range. | |
LcsRid | getRangeEndRid () const |
Returns first rid after the end of the current range. | |
uint | getRangeSize () const |
Returns number of rids in the range. | |
uint | getRangePos () const |
Returns offset within the current range. | |
LcsRid | getCurrentRid () const |
Returns rid currently positioned at. | |
uint | getRangeRowsLeft () const |
Returns number of rids yet to be read. | |
bool | position (LcsRid rid) |
Positions scan on the rid, moving to a new range if necessary. | |
bool | nextRange () |
Positions scan on the first rid of the next range. | |
bool | advance (uint nRids) |
Moves "nRids" forward in the current range. | |
void | advanceWithinBatch (uint nRids) |
Advances nRids forward in the current batch. | |
virtual PageId | getNextPageForPrefetch (LcsRid &rid, bool &found) |
Determines the next page to be pre-fetched based on the rids that need to be read. | |
void | catchUp (uint parentBufPos, LcsRid parentNextRid) |
Resynchronizes the cluster reader's prefetch position to that of the parent scan. | |
RecordNum | getNumRows () |
| |
uint | getNumClusterCols () |
Returns number of columns in cluster. | |
void | setNumClusterCols (uint nCols) |
Sets number of columns in cluster. | |
void | unlockClusterPage () |
Unlocks cluster page. | |
virtual void | initPrefetchEntry (LcsRid &entry) |
Initializes a specific entry in the pre-fetch queue. | |
Static Public Member Functions | |
static LcsRid | getFetchRids (CircularBufferIter< LcsRidRun > &ridRunIter, LcsRid &nextRid, bool remove) |
Retrieves the current and next rids that need to be read, based on the current rid run being processed. | |
Public Attributes | |
uint | nColsToRead |
Number of cluster columns that will be read. | |
boost::scoped_array< LcsColumnReader > | clusterCols |
Column readers for each cluster column that will be read. | |
Protected Member Functions | |
LcsRid | readRid () |
Returns RID from btree tuple. | |
PageId | readClusterPageId () |
Returns cluster pageid from btree tuple. | |
void | setHdrOffsets (PConstLcsClusterNode pHdr) |
Sets pointers to offset arrays in cluster page header. | |
Protected Attributes | |
TupleData | bTreeTupleData |
Tuple data representing the btree key corresponding to the cluster page. | |
SegmentAccessor | segmentAccessor |
Accessor for segment storing both btree and cluster pages. | |
ClusterPageLock | clusterLock |
Buffer lock for the actual cluster node pages. | |
PageId | clusterPageId |
Current cluster pageid. | |
LcsRid | bTreeRid |
Current rid in btree used to access current cluster page. | |
uint | nClusterCols |
Number of columns in cluster. | |
uint16_t * | lastVal |
Offsets to the last value stored on the page for each column in cluster. | |
uint16_t * | firstVal |
Offsets to the first value stored on the page for each column in cluster. | |
uint * | nVal |
Number of distinct values in the page for each column in cluster. | |
uint16_t * | delta |
For each column in the cluster, offset used to get the real offset within the page. | |
Private Attributes | |
ClusterPageData | pageData |
Information gathered for the current cluster page. |
It reads cluster pages and gathers data regarding the page.
Definition at line 49 of file LcsClusterVerifier.h.
LcsClusterVerifier::LcsClusterVerifier | ( | BTreeDescriptor const & | treeDescriptor | ) | [explicit] |
Definition at line 28 of file LcsClusterVerifier.cpp.
00028 : 00029 LcsClusterReader(treeDescriptor) 00030 { 00031 }
ClusterPageData & LcsClusterVerifier::getPageData | ( | ) |
Retrieves cluster page data for the current cluster page.
Definition at line 33 of file LcsClusterVerifier.cpp.
References LcsClusterAccessBase::bTreeRid, ClusterPageData::bTreeRid, LcsClusterAccessBase::clusterPageId, ClusterPageData::clusterPageId, and pageData.
Referenced by LcsClusterAppendExecStreamTest::verifyClusterPages().
00034 { 00035 pageData.bTreeRid = bTreeRid; 00036 pageData.clusterPageId = clusterPageId; 00037 return pageData; 00038 }
void LcsClusterReader::setRootPageId | ( | PageId | rootPageId | ) | [inherited] |
Sets the root pageId of the underlying btree corresponding to the cluster.
rootPageId | the root pageId that's set |
Definition at line 53 of file LcsClusterReader.cpp.
References LcsClusterReader::bTreeReader.
00054 { 00055 bTreeReader->setRootPageId(rootPageId); 00056 }
void LcsClusterReader::initColumnReaders | ( | uint | nClusterColsInit, | |
TupleProjection const & | clusterProj | |||
) | [inherited] |
Initializes cluster reader with column readers.
nClusterColsInit | total number of columns in the cluster | |
clusterProj | list of columns to be read from cluster; column numbers are 0-based relative to the cluster |
Definition at line 100 of file LcsClusterReader.cpp.
References LcsClusterReader::clusterCols, LcsClusterAccessBase::nClusterCols, and LcsClusterReader::nColsToRead.
00103 { 00104 nClusterCols = nClusterColsInit; 00105 nColsToRead = clusterProj.size(); 00106 clusterCols.reset(new LcsColumnReader[nColsToRead]); 00107 for (uint i = 0; i < nColsToRead; i++) { 00108 clusterCols[i].init(this, clusterProj[i]); 00109 } 00110 }
void LcsClusterReader::open | ( | ) | [inherited] |
Initializes state variables used by cluster reader.
Definition at line 112 of file LcsClusterReader.cpp.
References LcsClusterReader::dumbPrefetch, MAXU, LcsClusterReader::nextBTreeEntry, LcsClusterReader::nextPrefetchEntry, LcsClusterReader::nextRid, LcsClusterReader::pLeaf, LcsClusterReader::pRangeBatches, CircularBufferIter< T >::reset(), and LcsClusterReader::ridRunIter.
00113 { 00114 pLeaf = NULL; 00115 pRangeBatches = NULL; 00116 ridRunIter.reset(); 00117 00118 // values of (0, MAXU) indicate that entry has not been filled in yet 00119 nextBTreeEntry.first = PageId(0); 00120 nextBTreeEntry.second = LcsRid(MAXU); 00121 00122 nextPrefetchEntry.first = PageId(0); 00123 nextPrefetchEntry.second = LcsRid(MAXU); 00124 00125 dumbPrefetch = false; 00126 nextRid = LcsRid(0); 00127 }
void LcsClusterReader::close | ( | ) | [inherited] |
Performs shutdown on cluster reader.
Definition at line 129 of file LcsClusterReader.cpp.
References LcsClusterReader::bTreeReader, and LcsClusterAccessBase::unlockClusterPage().
00130 { 00131 bTreeReader->endSearch(); 00132 unlockClusterPage(); 00133 }
bool LcsClusterReader::getFirstClusterPageForRead | ( | PConstLcsClusterNode & | pBlock | ) | [inherited] |
Gets first page in a cluster.
pBlock | output param returning cluster page |
Definition at line 71 of file LcsClusterReader.cpp.
References LcsClusterReader::bTreeReader, and LcsClusterReader::readClusterPage().
Referenced by LcsClusterAppendExecStreamTest::verifyClusterPages().
00073 { 00074 bool found; 00075 00076 found = bTreeReader->searchFirst(); 00077 if (!found) { 00078 return false; 00079 } 00080 00081 LcsClusterNode const &node = readClusterPage(); 00082 pBlock = &node; 00083 return true; 00084 }
bool LcsClusterReader::getNextClusterPageForRead | ( | PConstLcsClusterNode & | pBlock | ) | [inherited] |
Gets next page in a cluster, based on current position in btree.
pBlock | output param returning cluster page |
Definition at line 86 of file LcsClusterReader.cpp.
References LcsClusterReader::bTreeReader, and LcsClusterReader::readClusterPage().
Referenced by LcsClusterAppendExecStreamTest::verifyClusterPages().
00087 { 00088 bool found; 00089 00090 found = bTreeReader->searchNext(); 00091 if (!found) { 00092 return false; 00093 } 00094 00095 LcsClusterNode const &node = readClusterPage(); 00096 pBlock = &node; 00097 return true; 00098 }
bool LcsClusterReader::isPositioned | ( | ) | const [inline, inherited] |
Returns true if positioned within some range in a batch.
Definition at line 424 of file LcsClusterReader.h.
References LcsClusterReader::pRangeBatches.
00425 { 00426 return pRangeBatches != NULL; 00427 }
LcsRid LcsClusterReader::getRangeStartRid | ( | ) | const [inline, inherited] |
Returns first rid in a range.
Definition at line 429 of file LcsClusterReader.h.
References LcsClusterReader::rangeStartRid.
Referenced by LcsClusterReader::getCurrentRid().
00430 { 00431 return rangeStartRid; 00432 }
LcsRid LcsClusterReader::getRangeEndRid | ( | ) | const [inline, inherited] |
Returns first rid after the end of the current range.
Definition at line 434 of file LcsClusterReader.h.
References LcsClusterReader::rangeEndRid.
Referenced by LcsClusterReader::nextRange(), and LcsClusterReader::positionInBlock().
00435 { 00436 return rangeEndRid; 00437 }
uint LcsClusterReader::getRangeSize | ( | ) | const [inline, inherited] |
Returns number of rids in the range.
Definition at line 439 of file LcsClusterReader.h.
References LcsBatchDir::nRow, and LcsClusterReader::pRangeBatches.
Referenced by LcsClusterReader::getRangeRowsLeft().
00440 { 00441 return pRangeBatches->nRow; 00442 }
uint LcsClusterReader::getRangePos | ( | ) | const [inline, inherited] |
Returns offset within the current range.
E.g., 0 if at first rid in range
Definition at line 444 of file LcsClusterReader.h.
References LcsClusterReader::nRangePos.
Referenced by LcsClusterReader::getCurrentRid(), LcsColumnReader::getCurrentValueCode(), LcsColumnReader::getFixedValue(), LcsClusterReader::getRangeRowsLeft(), LcsColumnReader::getVariableValue(), and LcsColumnReader::readCompressedBatch().
00445 { 00446 return nRangePos; 00447 }
LcsRid LcsClusterReader::getCurrentRid | ( | ) | const [inline, inherited] |
Returns rid currently positioned at.
Definition at line 449 of file LcsClusterReader.h.
References LcsClusterReader::getRangePos(), and LcsClusterReader::getRangeStartRid().
00450 { 00451 return getRangeStartRid() + getRangePos(); 00452 }
uint LcsClusterReader::getRangeRowsLeft | ( | ) | const [inline, inherited] |
Returns number of rids yet to be read.
(E.g., 1 if we're at the last rid)
Definition at line 454 of file LcsClusterReader.h.
References LcsClusterReader::getRangePos(), and LcsClusterReader::getRangeSize().
Referenced by LcsColumnReader::readCompressedBatch().
00455 { 00456 return getRangeSize() - getRangePos(); 00457 }
bool LcsClusterReader::position | ( | LcsRid | rid | ) | [inherited] |
Positions scan on the rid, moving to a new range if necessary.
rid | rid to position to |
Definition at line 135 of file LcsClusterReader.cpp.
References LcsClusterReader::bTreeReader, LcsClusterReader::currRid, SegPageEntryIter< EntryT >::mapRange(), LcsClusterReader::moveToBlock(), LcsClusterReader::moveToBlockWithRid(), LcsClusterReader::noPrefetch, NULL_PAGE_ID, LcsClusterReader::pLeaf, LcsClusterReader::positionInBlock(), LcsClusterReader::prefetchQueue, LcsClusterAccessBase::readClusterPageId(), LcsClusterReader::searchForRid(), and LcsClusterAccessBase::segmentAccessor.
Referenced by LcsClusterReader::nextRange().
00136 { 00137 bool found; 00138 00139 currRid = rid; 00140 if (pLeaf) { 00141 // Scan is already in progress. Try to find the row we want in the 00142 // current block. 00143 00144 found = positionInBlock(rid); 00145 if (found) { 00146 return true; 00147 } 00148 } else { 00149 if (noPrefetch) { 00150 if (!bTreeReader->searchFirst()) { 00151 bTreeReader->endSearch(); 00152 } 00153 } else { 00154 // Initiate the first set of pre-fetches. 00155 prefetchQueue.mapRange(segmentAccessor, NULL_PAGE_ID); 00156 } 00157 } 00158 00159 if (noPrefetch) { 00160 found = searchForRid(rid); 00161 if (!found) { 00162 return false; 00163 } 00164 moveToBlock(readClusterPageId()); 00165 } else { 00166 found = moveToBlockWithRid(rid); 00167 if (!found) { 00168 return false; 00169 } 00170 } 00171 00172 found = positionInBlock(rid); 00173 // page ends before "rid"; we must be off the last block 00174 if (!found) { 00175 return false; 00176 } 00177 00178 return true; 00179 }
bool LcsClusterReader::nextRange | ( | ) | [inline, inherited] |
Positions scan on the first rid of the next range.
Definition at line 459 of file LcsClusterReader.h.
References LcsClusterReader::getRangeEndRid(), and LcsClusterReader::position().
00460 { 00461 return position(getRangeEndRid()); 00462 }
bool LcsClusterReader::advance | ( | uint | nRids | ) | [inherited] |
Moves "nRids" forward in the current range.
nRids | number of rids to move forward |
Definition at line 295 of file LcsClusterReader.cpp.
References LcsClusterReader::nRangePos.
00296 { 00297 uint newPos = nRangePos + nRids; 00298 00299 if (newPos < pRangeBatches->nRow) { 00300 nRangePos = newPos; 00301 return true; 00302 } else { 00303 return false; 00304 } 00305 }
void LcsClusterReader::advanceWithinBatch | ( | uint | nRids | ) | [inline, inherited] |
Advances nRids forward in the current batch.
nRids | number of rids to advance |
Definition at line 464 of file LcsClusterReader.h.
References LcsClusterReader::nRangePos.
PageId LcsClusterReader::getNextPageForPrefetch | ( | LcsRid & | rid, | |
bool & | found | |||
) | [virtual, inherited] |
Determines the next page to be pre-fetched based on the rids that need to be read.
[out] | rid | returns the rid corresponding to the page to be pre-fetched |
[out] | found | true if a pre-fetch page was found |
Implements SegPageEntryIterSource< LcsRid >.
Definition at line 307 of file LcsClusterReader.cpp.
References LcsClusterReader::currRid, CircularBufferIter< T >::done(), LcsClusterReader::dumbPrefetch, LcsClusterReader::getFetchRids(), LcsClusterReader::getNextBTreeEntry(), MAXU, LcsClusterReader::nextBTreeEntry, LcsClusterReader::nextRid, NULL_PAGE_ID, LcsClusterAccessBase::readClusterPageId(), LcsClusterAccessBase::readRid(), LcsClusterReader::ridRunIter, and LcsClusterReader::searchForRid().
00308 { 00309 found = true; 00310 for (;;) { 00311 if (dumbPrefetch) { 00312 rid = currRid; 00313 } else { 00314 rid = getFetchRids(ridRunIter, nextRid, false); 00315 } 00316 00317 // If the rid run buffer is exhausted and there are still rid runs 00318 // to be filled in, we're pre-fetching faster than we can fill up 00319 // the rid run buffers. So, switch to dumb pre-fetch in that case. 00320 if (rid == LcsRid(MAXU)) { 00321 if (ridRunIter.done()) { 00322 rid = LcsRid(0); 00323 return NULL_PAGE_ID; 00324 } else { 00325 // TODO - Use stricter criteria on when to switch to dumb 00326 // pre-fetch. E.g., if there are less than a certain number 00327 // of pages already pre-fetched. 00328 dumbPrefetch = true; 00329 continue; 00330 } 00331 } 00332 00333 if (!(nextBTreeEntry.second == LcsRid(MAXU) && 00334 nextBTreeEntry.first == PageId(0))) 00335 { 00336 // If we hit the end of the btree on the last iteration, then 00337 // there are no more pages. 00338 if (nextBTreeEntry.first == NULL_PAGE_ID) { 00339 rid = LcsRid(0); 00340 return NULL_PAGE_ID; 00341 } 00342 00343 // If the next rid to be read is on the same page as the last 00344 // one located, bump up the rid so we move over to the next page. 00345 // In the case of dumb pre-fetch, just use the next page in the 00346 // cluster sequence. 00347 if (rid < nextBTreeEntry.second) { 00348 if (dumbPrefetch) { 00349 rid = nextBTreeEntry.second; 00350 PageId pageId = nextBTreeEntry.first; 00351 getNextBTreeEntry(); 00352 return pageId; 00353 } 00354 nextRid = nextBTreeEntry.second; 00355 continue; 00356 } else { 00357 // TODO - optimize by avoiding search from top of btree if 00358 // desired entry is within a few entries of the current 00359 break; 00360 } 00361 } else { 00362 // We haven't located any pages yet. Initiate first btree search. 00363 break; 00364 } 00365 } 00366 00367 bool rc = searchForRid(rid); 00368 if (!rc) { 00369 return NULL_PAGE_ID; 00370 } 00371 rid = readRid(); 00372 PageId pageId = readClusterPageId(); 00373 getNextBTreeEntry(); 00374 return pageId; 00375 }
LcsRid LcsClusterReader::getFetchRids | ( | CircularBufferIter< LcsRidRun > & | ridRunIter, | |
LcsRid & | nextRid, | |||
bool | remove | |||
) | [static, inherited] |
Retrieves the current and next rids that need to be read, based on the current rid run being processed.
ridRunIter | iterator over the circular buffer that provides the rid runs | |
[in,out] | nextRid | on input, indicates the minimum rid value to be retrieved; on return, the next rid that will need to be read |
remove | if true, remove the first element from the circular buffer if the rid run buffer's position is incremented |
Definition at line 390 of file LcsClusterReader.cpp.
References CircularBufferIter< T >::end(), MAXU, LcsRidRun::nRids, CircularBufferIter< T >::removeFront(), LcsClusterReader::ridRunIter, and LcsRidRun::startRid.
Referenced by LcsRowScanExecStream::execute(), and LcsClusterReader::getNextPageForPrefetch().
00394 { 00395 for (;;) { 00396 if (ridRunIter.end()) { 00397 return LcsRid(MAXU); 00398 } 00399 00400 LcsRidRun &currRidRun = *ridRunIter; 00401 if (nextRid < currRidRun.startRid) { 00402 nextRid = currRidRun.startRid + 1; 00403 return currRidRun.startRid; 00404 } else if ( 00405 (currRidRun.nRids == RecordNum(MAXU) && 00406 nextRid >= currRidRun.startRid) || 00407 (nextRid < currRidRun.startRid + currRidRun.nRids)) 00408 { 00409 return nextRid++; 00410 } else { 00411 ++ridRunIter; 00412 if (remove) { 00413 ridRunIter.removeFront(); 00414 } 00415 } 00416 } 00417 }
void LcsClusterReader::catchUp | ( | uint | parentBufPos, | |
LcsRid | parentNextRid | |||
) | [inherited] |
Resynchronizes the cluster reader's prefetch position to that of the parent scan.
parentBufPos | buffer position of the parent scan | |
parentNextRid | next rid of the parent scan |
Definition at line 419 of file LcsClusterReader.cpp.
References CircularBufferIter< T >::getCurrPos(), LcsClusterReader::nextRid, LcsClusterReader::ridRunIter, and CircularBufferIter< T >::setCurrPos().
00420 { 00421 if (parentNextRid - 1 > nextRid) { 00422 nextRid = parentNextRid - 1; 00423 } 00424 if (parentBufPos > ridRunIter.getCurrPos()) { 00425 ridRunIter.setCurrPos(parentBufPos); 00426 } 00427 }
RecordNum LcsClusterReader::getNumRows | ( | ) | [inherited] |
Definition at line 429 of file LcsClusterReader.cpp.
References LcsClusterReader::bTreeReader, LcsClusterAccessBase::bTreeTupleData, LcsClusterNode::firstRID, LcsClusterNode::nBatch, LcsClusterAccessBase::nClusterCols, LcsClusterNode::oBatch, opaqueToInt(), and LcsClusterReader::readClusterPage().
00430 { 00431 // Read the last cluster page 00432 if (bTreeReader->searchLast() == false) { 00433 bTreeReader->endSearch(); 00434 return RecordNum(0); 00435 } 00436 bTreeReader->getTupleAccessorForRead().unmarshal(bTreeTupleData); 00437 LcsClusterNode const &node = readClusterPage(); 00438 00439 // Then count the number of rows in each batch on that page 00440 RecordNum nRows = RecordNum(opaqueToInt(node.firstRID)); 00441 PLcsBatchDir pBatch = (PLcsBatchDir) ((PBuffer) &node + node.oBatch); 00442 for (uint i = 0; i < node.nBatch; i += nClusterCols) { 00443 nRows += pBatch[i].nRow; 00444 } 00445 00446 bTreeReader->endSearch(); 00447 return nRows; 00448 }
LcsRid LcsClusterAccessBase::readRid | ( | ) | [protected, inherited] |
Returns RID from btree tuple.
Definition at line 37 of file LcsClusterAccessBase.cpp.
References LcsClusterAccessBase::bTreeTupleData.
Referenced by LcsClusterReader::getNextBTreeEntry(), LcsClusterReader::getNextPageForPrefetch(), LcsClusterReader::readClusterPage(), and LcsClusterReader::searchForRid().
00038 { 00039 return *reinterpret_cast<LcsRid const *> (bTreeTupleData[0].pData); 00040 }
PageId LcsClusterAccessBase::readClusterPageId | ( | ) | [protected, inherited] |
Returns cluster pageid from btree tuple.
Definition at line 42 of file LcsClusterAccessBase.cpp.
References LcsClusterAccessBase::bTreeTupleData.
Referenced by LcsClusterNodeWriter::getLastClusterPageForWrite(), LcsClusterReader::getNextBTreeEntry(), LcsClusterReader::getNextPageForPrefetch(), LcsClusterReader::position(), and LcsClusterReader::readClusterPage().
00043 { 00044 return *reinterpret_cast<PageId const *> (bTreeTupleData[1].pData); 00045 }
void LcsClusterAccessBase::setHdrOffsets | ( | PConstLcsClusterNode | pHdr | ) | [protected, inherited] |
Sets pointers to offset arrays in cluster page header.
pHdr | pointer to cluster node header |
Definition at line 47 of file LcsClusterAccessBase.cpp.
References LcsClusterAccessBase::delta, LcsClusterAccessBase::firstVal, LcsClusterAccessBase::lastVal, LcsClusterAccessBase::nClusterCols, and LcsClusterAccessBase::nVal.
Referenced by LcsClusterDump::dump(), LcsClusterNodeWriter::init(), and LcsClusterReader::setUpBlock().
00048 { 00049 PBuffer p = (PBuffer) pHdr; 00050 00051 lastVal = (uint16_t *) (p += sizeof(LcsClusterNode)); 00052 firstVal = (uint16_t *) (p += sizeof(uint16_t) * nClusterCols); 00053 nVal = (uint *) (p += sizeof(uint16_t) * nClusterCols); 00054 delta = (uint16_t *) (p += sizeof(uint) * nClusterCols); 00055 }
uint LcsClusterAccessBase::getNumClusterCols | ( | ) | [inline, inherited] |
Returns number of columns in cluster.
Definition at line 118 of file LcsClusterAccessBase.h.
00119 { 00120 return nClusterCols; 00121 }
void LcsClusterAccessBase::setNumClusterCols | ( | uint | nCols | ) | [inline, inherited] |
Sets number of columns in cluster.
Definition at line 126 of file LcsClusterAccessBase.h.
00127 { 00128 nClusterCols = nCols; 00129 }
void LcsClusterAccessBase::unlockClusterPage | ( | ) | [inherited] |
Unlocks cluster page.
Definition at line 57 of file LcsClusterAccessBase.cpp.
References LcsClusterAccessBase::clusterLock, and SegPageLock::unlock().
Referenced by LcsClusterReader::close().
00058 { 00059 clusterLock.unlock(); 00060 }
virtual void SegPageEntryIterSource< LcsRid >::initPrefetchEntry | ( | LcsRid & | entry | ) | [inline, virtual, inherited] |
Initializes a specific entry in the pre-fetch queue.
entry | the entry that will be initialized |
Definition at line 46 of file SegPageEntryIterSource.h.
ClusterPageData LcsClusterVerifier::pageData [private] |
Information gathered for the current cluster page.
Definition at line 55 of file LcsClusterVerifier.h.
Referenced by getPageData().
uint LcsClusterReader::nColsToRead [inherited] |
Number of cluster columns that will be read.
Definition at line 238 of file LcsClusterReader.h.
Referenced by LcsClusterReader::initColumnReaders().
boost::scoped_array<LcsColumnReader> LcsClusterReader::clusterCols [inherited] |
Column readers for each cluster column that will be read.
Definition at line 243 of file LcsClusterReader.h.
Referenced by LcsClusterReader::initColumnReaders().
TupleData LcsClusterAccessBase::bTreeTupleData [protected, inherited] |
Tuple data representing the btree key corresponding to the cluster page.
Definition at line 42 of file LcsClusterAccessBase.h.
Referenced by LcsClusterNodeWriter::allocateClusterPage(), LcsClusterNodeWriter::getLastClusterPageForWrite(), LcsClusterReader::getNextBTreeEntry(), LcsClusterReader::getNumRows(), LcsClusterAccessBase::LcsClusterAccessBase(), LcsClusterReader::readClusterPage(), LcsClusterAccessBase::readClusterPageId(), LcsClusterAccessBase::readRid(), and LcsClusterReader::searchForRid().
SegmentAccessor LcsClusterAccessBase::segmentAccessor [protected, inherited] |
Accessor for segment storing both btree and cluster pages.
Definition at line 47 of file LcsClusterAccessBase.h.
Referenced by LcsClusterNodeWriter::allocateClusterPage(), LcsClusterAccessBase::LcsClusterAccessBase(), and LcsClusterReader::position().
ClusterPageLock LcsClusterAccessBase::clusterLock [protected, inherited] |
Buffer lock for the actual cluster node pages.
Shares the same segment as the btree corresponding to the cluster.
Definition at line 53 of file LcsClusterAccessBase.h.
Referenced by LcsClusterNodeWriter::allocateClusterPage(), LcsClusterNodeWriter::close(), LcsClusterNodeWriter::getLastClusterPageForWrite(), LcsClusterAccessBase::LcsClusterAccessBase(), LcsClusterReader::moveToBlock(), LcsClusterReader::moveToBlockWithRid(), LcsClusterReader::readClusterPage(), and LcsClusterAccessBase::unlockClusterPage().
PageId LcsClusterAccessBase::clusterPageId [protected, inherited] |
Current cluster pageid.
Definition at line 58 of file LcsClusterAccessBase.h.
Referenced by LcsClusterNodeWriter::allocateClusterPage(), LcsClusterNodeWriter::getLastClusterPageForWrite(), getPageData(), LcsClusterNodeWriter::moveFromTempToIndex(), LcsClusterReader::moveToBlockWithRid(), and LcsClusterReader::readClusterPage().
LcsRid LcsClusterAccessBase::bTreeRid [protected, inherited] |
Current rid in btree used to access current cluster page.
Definition at line 63 of file LcsClusterAccessBase.h.
Referenced by LcsClusterNodeWriter::allocateClusterPage(), getPageData(), and LcsClusterReader::readClusterPage().
uint LcsClusterAccessBase::nClusterCols [protected, inherited] |
Number of columns in cluster.
Definition at line 68 of file LcsClusterAccessBase.h.
Referenced by LcsClusterNodeWriter::addValue(), LcsClusterNodeWriter::allocArrays(), LcsClusterDump::dump(), LcsClusterReader::getNumRows(), LcsClusterNodeWriter::init(), LcsClusterReader::initColumnReaders(), LcsClusterNodeWriter::LcsClusterNodeWriter(), LcsClusterNodeWriter::moveFromIndexToTemp(), LcsClusterNodeWriter::moveFromTempToIndex(), LcsClusterNodeWriter::openAppend(), LcsClusterNodeWriter::openNew(), LcsClusterReader::positionInBlock(), and LcsClusterAccessBase::setHdrOffsets().
uint16_t* LcsClusterAccessBase::lastVal [protected, inherited] |
Offsets to the last value stored on the page for each column in cluster.
Definition at line 74 of file LcsClusterAccessBase.h.
Referenced by LcsClusterNodeWriter::addValue(), LcsClusterDump::dump(), LcsClusterNodeWriter::moveFromIndexToTemp(), LcsClusterNodeWriter::moveFromTempToIndex(), LcsClusterNodeWriter::openAppend(), LcsClusterNodeWriter::openNew(), LcsClusterNodeWriter::pickCompressionMode(), LcsClusterNodeWriter::putCompressedBatch(), LcsClusterNodeWriter::putFixedVarBatch(), LcsClusterNodeWriter::rollBackLastBatch(), LcsClusterAccessBase::setHdrOffsets(), and LcsClusterNodeWriter::undoValue().
uint16_t* LcsClusterAccessBase::firstVal [protected, inherited] |
Offsets to the first value stored on the page for each column in cluster.
Points to the end of the firstVal, so subtracting lastVal from firstVal will tell you the number of bytes taken up by values for a column, since lastVals are appended in front of firstVal
Definition at line 82 of file LcsClusterAccessBase.h.
Referenced by LcsClusterDump::dump(), LcsClusterNodeWriter::moveFromIndexToTemp(), LcsClusterNodeWriter::moveFromTempToIndex(), LcsClusterNodeWriter::openNew(), and LcsClusterAccessBase::setHdrOffsets().
uint* LcsClusterAccessBase::nVal [protected, inherited] |
Number of distinct values in the page for each column in cluster.
Definition at line 87 of file LcsClusterAccessBase.h.
Referenced by LcsClusterNodeWriter::addValue(), LcsClusterDump::dump(), LcsClusterNodeWriter::moveFromIndexToTemp(), LcsClusterNodeWriter::moveFromTempToIndex(), LcsClusterNodeWriter::openAppend(), LcsClusterNodeWriter::openNew(), LcsClusterNodeWriter::pickCompressionMode(), LcsClusterNodeWriter::putCompressedBatch(), LcsClusterNodeWriter::putFixedVarBatch(), LcsClusterNodeWriter::rollBackLastBatch(), LcsClusterAccessBase::setHdrOffsets(), and LcsClusterNodeWriter::undoValue().
uint16_t* LcsClusterAccessBase::delta [protected, inherited] |
For each column in the cluster, offset used to get the real offset within the page.
Definition at line 93 of file LcsClusterAccessBase.h.
Referenced by LcsClusterDump::dump(), LcsClusterNodeWriter::moveFromTempToIndex(), LcsClusterNodeWriter::openNew(), LcsClusterAccessBase::setHdrOffsets(), and LcsColumnReader::sync().