MCPcopy Create free account
hub / github.com/TileDB-Inc/TileDB / load_enumeration

Method load_enumeration

tiledb/sm/array/array_directory.cc:1318–1342  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1316}
1317
1318shared_ptr<const Enumeration> ArrayDirectory::load_enumeration(
1319 const std::string& enumeration_path,
1320 const EncryptionKey& encryption_key,
1321 shared_ptr<MemoryTracker> memory_tracker) const {
1322 auto timer_se = resources_.get().stats().start_timer("sm_load_enumeration");
1323
1324 auto enmr_uri = uri_.join_path(constants::array_schema_dir_name)
1325 .join_path(constants::array_enumerations_dir_name)
1326 .join_path(enumeration_path);
1327
1328 auto tile = GenericTileIO::load(
1329 resources_, enmr_uri, 0, encryption_key, memory_tracker);
1330 resources_.get().stats().add_counter("read_enumeration_size", tile->size());
1331
1332 if (!memory_tracker->take_memory(tile->size(), MemoryType::ENUMERATION)) {
1333 throw ArrayDirectoryException(
1334 "Error loading enumeration; Insufficient memory budget; Needed " +
1335 std::to_string(tile->size()) + " but only had " +
1336 std::to_string(memory_tracker->get_memory_available()) +
1337 " from budget " + std::to_string(memory_tracker->get_memory_budget()));
1338 }
1339
1340 Deserializer deserializer(tile->data(), tile->size());
1341 return Enumeration::deserialize(deserializer, memory_tracker);
1342}
1343
1344} // namespace tiledb::sm

Callers 1

Calls 11

join_pathMethod · 0.80
add_counterMethod · 0.80
take_memoryMethod · 0.80
get_memory_availableMethod · 0.80
start_timerMethod · 0.45
statsMethod · 0.45
getMethod · 0.45
sizeMethod · 0.45
get_memory_budgetMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected