MCPcopy Create free account
hub / github.com/1345414527/MIT6.830 / numPages

Method numPages

src/java/simpledb/index/BTreeFile.java:163–166  ·  view source on GitHub ↗

Returns the number of pages in this BTreeFile.

()

Source from the content-addressed store, hash-verified

161 * Returns the number of pages in this BTreeFile.
162 */
163 public int numPages() {
164 // we only ever write full pages
165 return (int) ((f.length() - BTreeRootPtrPage.getPageSize())/ BufferPool.getPageSize());
166 }
167
168 /**
169 * Returns the index of the field that this B+ tree is keyed on

Callers 14

testIteratorCloseMethod · 0.95
addTupleMethod · 0.95
testSplitLeafPageMethod · 0.95
testSplitRootPageMethod · 0.95
testSplitInternalPageMethod · 0.95
testMergeLeafPagesMethod · 0.95
testDeleteRootPageMethod · 0.95
testReuseDeletedPagesMethod · 0.95
testBigFileMethod · 0.95
insertTupleMethod · 0.95
getEmptyPageNoMethod · 0.95
convertMethod · 0.95

Calls 2

getPageSizeMethod · 0.95
getPageSizeMethod · 0.95

Tested by 9

testIteratorCloseMethod · 0.76
addTupleMethod · 0.76
testSplitLeafPageMethod · 0.76
testSplitRootPageMethod · 0.76
testSplitInternalPageMethod · 0.76
testMergeLeafPagesMethod · 0.76
testDeleteRootPageMethod · 0.76
testReuseDeletedPagesMethod · 0.76
testBigFileMethod · 0.76