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

Method getId

src/java/simpledb/storage/HeapFile.java:63–66  ·  view source on GitHub ↗

Returns an ID uniquely identifying this HeapFile. Implementation note: you will need to generate this tableid somewhere to ensure that each HeapFile has a "unique id," and that you always return the same value for a particular HeapFile. We suggest hashing the absolute file name of the file underlyin

()

Source from the content-addressed store, hash-verified

61 * @return an ID uniquely identifying this HeapFile.
62 */
63 public int getId() {
64 // some code goes here
65 return file.getAbsoluteFile().hashCode();
66 }
67
68 /**
69 * Returns the TupleDesc of the table stored in this DbFile.

Callers 13

bigOrderJoinsTestMethod · 0.95
getIdMethod · 0.95
testRewindMethod · 0.95
testTupleDescMethod · 0.95
validateInsertMethod · 0.95
validateJoinMethod · 0.95
insertTupleMethod · 0.95
convertMethod · 0.95
createEmptyHeapFileMethod · 0.95

Calls 1

hashCodeMethod · 0.65

Tested by 9

bigOrderJoinsTestMethod · 0.76
getIdMethod · 0.76
testRewindMethod · 0.76
testTupleDescMethod · 0.76
validateInsertMethod · 0.76
validateJoinMethod · 0.76