MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / InternalGet

Method InternalGet

tensorflow/core/lib/io/table.cc:129–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127}
128
129Status Table::InternalGet(const StringPiece& k, void* arg,
130 void (*saver)(void*, const StringPiece&,
131 const StringPiece&)) {
132 Status s;
133 Iterator* iiter = rep_->index_block->NewIterator();
134 iiter->Seek(k);
135 if (iiter->Valid()) {
136 Iterator* block_iter = BlockReader(this, iiter->value());
137 block_iter->Seek(k);
138 if (block_iter->Valid()) {
139 (*saver)(arg, block_iter->key(), block_iter->value());
140 }
141 s = block_iter->status();
142 delete block_iter;
143 }
144 if (s.ok()) {
145 s = iiter->status();
146 }
147 delete iiter;
148 return s;
149}
150
151uint64 Table::ApproximateOffsetOf(const StringPiece& key) const {
152 Iterator* index_iter = rep_->index_block->NewIterator();

Callers

nothing calls this directly

Calls 7

NewIteratorMethod · 0.45
SeekMethod · 0.45
ValidMethod · 0.45
valueMethod · 0.45
keyMethod · 0.45
statusMethod · 0.45
okMethod · 0.45

Tested by

no test coverage detected