Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RPageStorageDaos.cxx
Go to the documentation of this file.
1/// \file RPageStorageDaos.cxx
2/// \ingroup NTuple ROOT7
3/// \author Javier Lopez-Gomez <j.lopez@cern.ch>
4/// \date 2020-11-03
5/// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback
6/// is welcome!
7
8/*************************************************************************
9 * Copyright (C) 1995-2021, Rene Brun and Fons Rademakers. *
10 * All rights reserved. *
11 * *
12 * For the licensing terms see $ROOTSYS/LICENSE. *
13 * For the list of contributors see $ROOTSYS/README/CREDITS. *
14 *************************************************************************/
15
16#include <ROOT/RCluster.hxx>
17#include <ROOT/RClusterPool.hxx>
18#include <ROOT/RLogger.hxx>
20#include <ROOT/RNTupleModel.hxx>
23#include <ROOT/RNTupleUtil.hxx>
24#include <ROOT/RNTupleZip.hxx>
25#include <ROOT/RPage.hxx>
27#include <ROOT/RPagePool.hxx>
28#include <ROOT/RDaos.hxx>
30
31#include <RVersion.h>
32#include <TError.h>
33
34#include <algorithm>
35#include <cstdio>
36#include <cstdlib>
37#include <cstring>
38#include <limits>
39#include <utility>
40#include <regex>
41#include <cassert>
42
43namespace {
48
49/// \brief RNTuple page-DAOS mappings
50enum EDaosMapping { kOidPerCluster, kOidPerPage };
51
52struct RDaosKey {
53 daos_obj_id_t fOid;
54 DistributionKey_t fDkey;
55 AttributeKey_t fAkey;
56};
57
58/// \brief Pre-defined keys for object store. `kDistributionKeyDefault` is the distribution key for metadata and
59/// pagelist values; optionally it can be used for ntuple pages (if under the `kOidPerPage` mapping strategy).
60/// `kAttributeKeyDefault` is the attribute key for ntuple pages under `kOidPerPage`.
61/// `kAttributeKey{Anchor,Header,Footer}` are the respective attribute keys for anchor/header/footer metadata elements.
62static constexpr DistributionKey_t kDistributionKeyDefault = 0x5a3c69f0cafe4a11;
63static constexpr AttributeKey_t kAttributeKeyDefault = 0x4243544b53444229;
64static constexpr AttributeKey_t kAttributeKeyAnchor = 0x4243544b5344422a;
65static constexpr AttributeKey_t kAttributeKeyHeader = 0x4243544b5344422b;
66static constexpr AttributeKey_t kAttributeKeyFooter = 0x4243544b5344422c;
67
68/// \brief Pre-defined 64 LSb of the OIDs for ntuple metadata (holds anchor/header/footer) and clusters' pagelists.
69static constexpr decltype(daos_obj_id_t::lo) kOidLowMetadata = -1;
70static constexpr decltype(daos_obj_id_t::lo) kOidLowPageList = -2;
71
72static constexpr daos_oclass_id_t kCidMetadata = OC_SX;
73
74static constexpr EDaosMapping kDefaultDaosMapping = kOidPerCluster;
75
76template <EDaosMapping mapping>
77RDaosKey GetPageDaosKey(ROOT::Experimental::Internal::ntuple_index_t ntplId, long unsigned clusterId,
78 long unsigned columnId, long unsigned pageCount)
79{
80 if constexpr (mapping == kOidPerCluster) {
81 return RDaosKey{daos_obj_id_t{static_cast<decltype(daos_obj_id_t::lo)>(clusterId),
82 static_cast<decltype(daos_obj_id_t::hi)>(ntplId)},
83 static_cast<DistributionKey_t>(columnId), static_cast<AttributeKey_t>(pageCount)};
84 } else if constexpr (mapping == kOidPerPage) {
85 return RDaosKey{daos_obj_id_t{static_cast<decltype(daos_obj_id_t::lo)>(pageCount),
86 static_cast<decltype(daos_obj_id_t::hi)>(ntplId)},
87 kDistributionKeyDefault, kAttributeKeyDefault};
88 }
89}
90
91struct RDaosURI {
92 /// \brief Label of the DAOS pool
93 std::string fPoolLabel;
94 /// \brief Label of the container for this RNTuple
95 std::string fContainerLabel;
96};
97
98/**
99 \brief Parse a DAOS RNTuple URI of the form 'daos://pool_id/container_id'.
100*/
101RDaosURI ParseDaosURI(std::string_view uri)
102{
103 std::regex re("daos://([^/]+)/(.+)");
104 std::cmatch m;
105 if (!std::regex_match(uri.data(), m, re))
106 throw ROOT::RException(R__FAIL("Invalid DAOS pool URI."));
107 return {m[1], m[2]};
108}
109
110/// \brief Unpacks a 64-bit RNTuple page locator address for object stores into a pair of 32-bit values:
111/// the attribute key under which the cage is stored and the offset within that cage to access the page.
112std::pair<uint32_t, uint32_t> DecodeDaosPagePosition(const ROOT::Experimental::RNTupleLocatorObject64 &address)
113{
114 auto position = static_cast<uint32_t>(address.GetLocation() & 0xFFFFFFFF);
115 auto offset = static_cast<uint32_t>(address.GetLocation() >> 32);
116 return {position, offset};
117}
118
119/// \brief Packs an attribute key together with an offset within its contents into a single 64-bit address.
120/// The offset is kept in the MSb half and defaults to zero, which is the case when caging is disabled.
121ROOT::Experimental::RNTupleLocatorObject64 EncodeDaosPagePosition(uint64_t position, uint64_t offset = 0)
122{
123 uint64_t address = (position & 0xFFFFFFFF) | (offset << 32);
125}
126
127/// \brief Helper structure concentrating the functionality required to locate an ntuple within a DAOS container.
128/// It includes a hashing function that converts the RNTuple's name into a 32-bit identifier; this value is used to
129/// index the subspace for the ntuple among all objects in the container. A zero-value hash value is reserved for
130/// storing any future metadata related to container-wide management; a zero-index ntuple is thus disallowed and
131/// remapped to "1". Once the index is computed, `InitNTupleDescriptorBuilder()` can be called to return a
132/// partially-filled builder with the ntuple's anchor, header and footer, lacking only pagelists. Upon that call,
133/// a copy of the anchor is stored in `fAnchor`.
134struct RDaosContainerNTupleLocator {
135 std::string fName{};
136 ntuple_index_t fIndex{};
137 std::optional<ROOT::Experimental::Internal::RDaosNTupleAnchor> fAnchor;
138 static const ntuple_index_t kReservedIndex = 0;
139
140 RDaosContainerNTupleLocator() = default;
141 explicit RDaosContainerNTupleLocator(const std::string &ntupleName) : fName(ntupleName), fIndex(Hash(ntupleName)){};
142
143 bool IsValid() { return fAnchor.has_value() && fAnchor->fNBytesHeader; }
144 [[nodiscard]] ntuple_index_t GetIndex() const { return fIndex; };
145 static ntuple_index_t Hash(const std::string &ntupleName)
146 {
147 // Convert string to numeric representation via `std::hash`.
148 uint64_t h = std::hash<std::string>{}(ntupleName);
149 // Fold the hash into 32-bit using `boost::hash_combine()` algorithm and magic number.
150 auto seed = static_cast<uint32_t>(h >> 32);
151 seed ^= static_cast<uint32_t>(h & 0xffffffff) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
152 auto hash = static_cast<ntuple_index_t>(seed);
153 return (hash == kReservedIndex) ? kReservedIndex + 1 : hash;
154 }
155
156 int InitNTupleDescriptorBuilder(ROOT::Experimental::Internal::RDaosContainer &cont,
158 {
159 std::unique_ptr<unsigned char[]> buffer, zipBuffer;
160 auto &anchor = fAnchor.emplace();
161 int err;
162
164 daos_obj_id_t oidMetadata{kOidLowMetadata, static_cast<decltype(daos_obj_id_t::hi)>(this->GetIndex())};
165
166 buffer = MakeUninitArray<unsigned char>(anchorSize);
167 if ((err = cont.ReadSingleAkey(buffer.get(), anchorSize, oidMetadata, kDistributionKeyDefault,
168 kAttributeKeyAnchor, kCidMetadata))) {
169 return err;
170 }
171
172 anchor.Deserialize(buffer.get(), anchorSize).Unwrap();
173 if (anchor.fVersionEpoch != ROOT::RNTuple::kVersionEpoch) {
174 throw ROOT::RException(R__FAIL("unsupported RNTuple epoch version: " + std::to_string(anchor.fVersionEpoch)));
175 }
176
177 builder.SetOnDiskHeaderSize(anchor.fNBytesHeader);
178 buffer = MakeUninitArray<unsigned char>(anchor.fLenHeader);
179 zipBuffer = MakeUninitArray<unsigned char>(anchor.fNBytesHeader);
180 if ((err = cont.ReadSingleAkey(zipBuffer.get(), anchor.fNBytesHeader, oidMetadata, kDistributionKeyDefault,
181 kAttributeKeyHeader, kCidMetadata)))
182 return err;
183 ROOT::Experimental::Internal::RNTupleDecompressor::Unzip(zipBuffer.get(), anchor.fNBytesHeader, anchor.fLenHeader,
184 buffer.get());
185 ROOT::Experimental::Internal::RNTupleSerializer::DeserializeHeader(buffer.get(), anchor.fLenHeader, builder);
186
187 builder.AddToOnDiskFooterSize(anchor.fNBytesFooter);
188 buffer = MakeUninitArray<unsigned char>(anchor.fLenFooter);
189 zipBuffer = MakeUninitArray<unsigned char>(anchor.fNBytesFooter);
190 if ((err = cont.ReadSingleAkey(zipBuffer.get(), anchor.fNBytesFooter, oidMetadata, kDistributionKeyDefault,
191 kAttributeKeyFooter, kCidMetadata)))
192 return err;
193 ROOT::Experimental::Internal::RNTupleDecompressor::Unzip(zipBuffer.get(), anchor.fNBytesFooter, anchor.fLenFooter,
194 buffer.get());
195 ROOT::Experimental::Internal::RNTupleSerializer::DeserializeFooter(buffer.get(), anchor.fLenFooter, builder);
196
197 return 0;
198 }
199
200 static std::pair<RDaosContainerNTupleLocator, ROOT::Experimental::Internal::RNTupleDescriptorBuilder>
201 LocateNTuple(ROOT::Experimental::Internal::RDaosContainer &cont, const std::string &ntupleName)
202 {
203 auto result = std::make_pair(RDaosContainerNTupleLocator(ntupleName),
205
206 auto &loc = result.first;
207 auto &builder = result.second;
208
209 if (int err = loc.InitNTupleDescriptorBuilder(cont, builder); !err) {
210 if (ntupleName.empty() || ntupleName != builder.GetDescriptor().GetName()) {
211 // Hash already taken by a differently-named ntuple.
212 throw ROOT::RException(
213 R__FAIL("LocateNTuple: ntuple name '" + ntupleName + "' unavailable in this container."));
214 }
215 }
216 return result;
217 }
218};
219
220} // anonymous namespace
221
222////////////////////////////////////////////////////////////////////////////////
223
225{
227 if (buffer != nullptr) {
228 auto bytes = reinterpret_cast<unsigned char *>(buffer);
239 }
240 return RNTupleSerializer::SerializeString(fObjClass, nullptr) + 32;
241}
242
244ROOT::Experimental::Internal::RDaosNTupleAnchor::Deserialize(const void *buffer, std::uint32_t bufSize)
245{
246 if (bufSize < 32)
247 return R__FAIL("DAOS anchor too short");
248
250 auto bytes = reinterpret_cast<const unsigned char *>(buffer);
252 if (fVersionAnchor != RDaosNTupleAnchor().fVersionAnchor) {
253 return R__FAIL("unsupported DAOS anchor version: " + std::to_string(fVersionAnchor));
254 }
255
264 auto result = RNTupleSerializer::DeserializeString(bytes, bufSize - 32, fObjClass);
265 if (!result)
266 return R__FORWARD_ERROR(result);
267 return result.Unwrap() + 32;
268}
269
271{
273}
274
275////////////////////////////////////////////////////////////////////////////////
276
277ROOT::Experimental::Internal::RPageSinkDaos::RPageSinkDaos(std::string_view ntupleName, std::string_view uri,
278 const RNTupleWriteOptions &options)
279 : RPagePersistentSink(ntupleName, options), fURI(uri)
280{
281 static std::once_flag once;
282 std::call_once(once, []() {
283 R__LOG_WARNING(NTupleLog()) << "The DAOS backend is experimental and still under development. "
284 << "Do not store real data with this version of RNTuple!";
285 });
286 fCompressor = std::make_unique<RNTupleCompressor>();
287 EnableDefaultMetrics("RPageSinkDaos");
288}
289
291
292void ROOT::Experimental::Internal::RPageSinkDaos::InitImpl(unsigned char *serializedHeader, std::uint32_t length)
293{
294 auto opts = dynamic_cast<RNTupleWriteOptionsDaos *>(fOptions.get());
295 fNTupleAnchor.fObjClass = opts ? opts->GetObjectClass() : RNTupleWriteOptionsDaos().GetObjectClass();
296 auto oclass = RDaosObject::ObjClassId(fNTupleAnchor.fObjClass);
297 if (oclass.IsUnknown())
298 throw ROOT::RException(R__FAIL("Unknown object class " + fNTupleAnchor.fObjClass));
299
300 size_t cageSz = opts ? opts->GetMaxCageSize() : RNTupleWriteOptionsDaos().GetMaxCageSize();
301 size_t pageSz = opts ? opts->GetMaxUnzippedPageSize() : RNTupleWriteOptionsDaos().GetMaxUnzippedPageSize();
302 fCageSizeLimit = std::max(cageSz, pageSz);
303
304 auto args = ParseDaosURI(fURI);
305 auto pool = std::make_shared<RDaosPool>(args.fPoolLabel);
306
307 fDaosContainer = std::make_unique<RDaosContainer>(pool, args.fContainerLabel, /*create =*/true);
308 fDaosContainer->SetDefaultObjectClass(oclass);
309
310 auto [locator, _] = RDaosContainerNTupleLocator::LocateNTuple(*fDaosContainer, fNTupleName);
311 fNTupleIndex = locator.GetIndex();
312
313 auto zipBuffer = MakeUninitArray<unsigned char>(length);
314 auto szZipHeader = fCompressor->Zip(serializedHeader, length, GetWriteOptions().GetCompression(),
315 RNTupleCompressor::MakeMemCopyWriter(zipBuffer.get()));
316 WriteNTupleHeader(zipBuffer.get(), szZipHeader, length);
317}
318
321{
322 auto element = columnHandle.fColumn->GetElement();
323 RPageStorage::RSealedPage sealedPage;
324 {
325 Detail::RNTupleAtomicTimer timer(fCounters->fTimeWallZip, fCounters->fTimeCpuZip);
326 sealedPage = SealPage(page, *element);
327 }
328
329 fCounters->fSzZip.Add(page.GetNBytes());
330 return CommitSealedPageImpl(columnHandle.fPhysicalId, sealedPage);
331}
332
335 const RPageStorage::RSealedPage &sealedPage)
336{
337 auto offsetData = fPageId.fetch_add(1);
338 DescriptorId_t clusterId = fDescriptorBuilder.GetDescriptor().GetNActiveClusters();
339
340 {
341 Detail::RNTupleAtomicTimer timer(fCounters->fTimeWallWrite, fCounters->fTimeCpuWrite);
342 RDaosKey daosKey = GetPageDaosKey<kDefaultDaosMapping>(fNTupleIndex, clusterId, physicalColumnId, offsetData);
343 fDaosContainer->WriteSingleAkey(sealedPage.GetBuffer(), sealedPage.GetBufferSize(), daosKey.fOid, daosKey.fDkey,
344 daosKey.fAkey);
345 }
346
349 result.SetNBytesOnStorage(sealedPage.GetDataSize());
350 result.SetPosition(EncodeDaosPagePosition(offsetData));
351 fCounters->fNPageCommitted.Inc();
352 fCounters->fSzWritePayload.Add(sealedPage.GetBufferSize());
353 fNBytesCurrentCluster += sealedPage.GetBufferSize();
354 return result;
355}
356
357std::vector<ROOT::Experimental::RNTupleLocator>
358ROOT::Experimental::Internal::RPageSinkDaos::CommitSealedPageVImpl(std::span<RPageStorage::RSealedPageGroup> ranges,
359 const std::vector<bool> &mask)
360{
362 std::vector<ROOT::Experimental::RNTupleLocator> locators;
363 auto nPages = mask.size();
364 locators.reserve(nPages);
365
366 const uint32_t maxCageSz = fCageSizeLimit;
367 const bool useCaging = fCageSizeLimit > 0;
368 const std::uint8_t locatorFlags = useCaging ? EDaosLocatorFlags::kCagedPage : 0;
369
370 DescriptorId_t clusterId = fDescriptorBuilder.GetDescriptor().GetNActiveClusters();
371 int64_t payloadSz = 0;
372 std::size_t positionOffset;
373 uint32_t positionIndex;
374
375 /// Aggregate batch of requests by object ID and distribution key, determined by the ntuple-DAOS mapping
376 for (auto &range : ranges) {
377 positionOffset = 0;
378 /// Under caging, the atomic page counter is fetch-incremented for every column range to get the position of its
379 /// first cage and indicate the next one, also ensuring subsequent pages of different columns do not end up caged
380 /// together. This increment is not necessary in the absence of caging, as each page is trivially caged.
381 positionIndex = useCaging ? fPageId.fetch_add(1) : fPageId.load();
382
383 for (auto sealedPageIt = range.fFirst; sealedPageIt != range.fLast; ++sealedPageIt) {
384 const RPageStorage::RSealedPage &s = *sealedPageIt;
385
386 if (positionOffset + s.GetBufferSize() > maxCageSz) {
387 positionOffset = 0;
388 positionIndex = fPageId.fetch_add(1);
389 }
390
391 d_iov_t pageIov;
392 d_iov_set(&pageIov, const_cast<void *>(s.GetBuffer()), s.GetBufferSize());
393
394 RDaosKey daosKey =
395 GetPageDaosKey<kDefaultDaosMapping>(fNTupleIndex, clusterId, range.fPhysicalColumnId, positionIndex);
396 auto odPair = RDaosContainer::ROidDkeyPair{daosKey.fOid, daosKey.fDkey};
397 auto [it, ret] = writeRequests.emplace(odPair, RDaosContainer::RWOperation(odPair));
398 it->second.Insert(daosKey.fAkey, pageIov);
399
400 RNTupleLocator locator;
402 locator.SetNBytesOnStorage(s.GetDataSize());
403 locator.SetPosition(EncodeDaosPagePosition(positionIndex, positionOffset));
404 locator.SetReserved(locatorFlags);
405 locators.push_back(locator);
406
407 positionOffset += s.GetBufferSize();
408 payloadSz += s.GetBufferSize();
409 }
410 }
411 fNBytesCurrentCluster += payloadSz;
412
413 {
414 Detail::RNTupleAtomicTimer timer(fCounters->fTimeWallWrite, fCounters->fTimeCpuWrite);
415 if (int err = fDaosContainer->WriteV(writeRequests))
416 throw ROOT::RException(R__FAIL("WriteV: error" + std::string(d_errstr(err))));
417 }
418
419 fCounters->fNPageCommitted.Add(nPages);
420 fCounters->fSzWritePayload.Add(payloadSz);
421
422 return locators;
423}
424
426{
427 return std::exchange(fNBytesCurrentCluster, 0);
428}
429
432 std::uint32_t length)
433{
434 auto bufPageListZip = MakeUninitArray<unsigned char>(length);
435 auto szPageListZip = fCompressor->Zip(serializedPageList, length, GetWriteOptions().GetCompression(),
436 RNTupleCompressor::MakeMemCopyWriter(bufPageListZip.get()));
437
438 auto offsetData = fClusterGroupId.fetch_add(1);
439 fDaosContainer->WriteSingleAkey(
440 bufPageListZip.get(), szPageListZip,
441 daos_obj_id_t{kOidLowPageList, static_cast<decltype(daos_obj_id_t::hi)>(fNTupleIndex)}, kDistributionKeyDefault,
442 offsetData, kCidMetadata);
445 result.SetNBytesOnStorage(szPageListZip);
446 result.SetPosition(RNTupleLocatorObject64{offsetData});
447 fCounters->fSzWritePayload.Add(static_cast<int64_t>(szPageListZip));
448 return result;
449}
450
452 std::uint32_t length)
453{
454 auto bufFooterZip = MakeUninitArray<unsigned char>(length);
455 auto szFooterZip = fCompressor->Zip(serializedFooter, length, GetWriteOptions().GetCompression(),
456 RNTupleCompressor::MakeMemCopyWriter(bufFooterZip.get()));
457 WriteNTupleFooter(bufFooterZip.get(), szFooterZip, length);
458 WriteNTupleAnchor();
459}
460
461void ROOT::Experimental::Internal::RPageSinkDaos::WriteNTupleHeader(const void *data, size_t nbytes, size_t lenHeader)
462{
463 fDaosContainer->WriteSingleAkey(
464 data, nbytes, daos_obj_id_t{kOidLowMetadata, static_cast<decltype(daos_obj_id_t::hi)>(fNTupleIndex)},
465 kDistributionKeyDefault, kAttributeKeyHeader, kCidMetadata);
466 fNTupleAnchor.fLenHeader = lenHeader;
467 fNTupleAnchor.fNBytesHeader = nbytes;
468}
469
470void ROOT::Experimental::Internal::RPageSinkDaos::WriteNTupleFooter(const void *data, size_t nbytes, size_t lenFooter)
471{
472 fDaosContainer->WriteSingleAkey(
473 data, nbytes, daos_obj_id_t{kOidLowMetadata, static_cast<decltype(daos_obj_id_t::hi)>(fNTupleIndex)},
474 kDistributionKeyDefault, kAttributeKeyFooter, kCidMetadata);
475 fNTupleAnchor.fLenFooter = lenFooter;
476 fNTupleAnchor.fNBytesFooter = nbytes;
477}
478
480{
481 const auto ntplSize = RDaosNTupleAnchor::GetSize();
482 auto buffer = MakeUninitArray<unsigned char>(ntplSize);
483 fNTupleAnchor.Serialize(buffer.get());
484 fDaosContainer->WriteSingleAkey(
485 buffer.get(), ntplSize, daos_obj_id_t{kOidLowMetadata, static_cast<decltype(daos_obj_id_t::hi)>(fNTupleIndex)},
486 kDistributionKeyDefault, kAttributeKeyAnchor, kCidMetadata);
487}
488
489////////////////////////////////////////////////////////////////////////////////
490
491ROOT::Experimental::Internal::RPageSourceDaos::RPageSourceDaos(std::string_view ntupleName, std::string_view uri,
492 const RNTupleReadOptions &options)
493 : RPageSource(ntupleName, options),
494 fURI(uri),
495 fClusterPool(std::make_unique<RClusterPool>(*this, options.GetClusterBunchSize()))
496{
497 EnableDefaultMetrics("RPageSourceDaos");
498
499 auto args = ParseDaosURI(uri);
500 auto pool = std::make_shared<RDaosPool>(args.fPoolLabel);
501 fDaosContainer = std::make_unique<RDaosContainer>(pool, args.fContainerLabel);
502}
503
505
507{
509 std::unique_ptr<unsigned char[]> buffer, zipBuffer;
510
511 auto [locator, descBuilder] = RDaosContainerNTupleLocator::LocateNTuple(*fDaosContainer, fNTupleName);
512 if (!locator.IsValid())
513 throw ROOT::RException(
514 R__FAIL("Attach: requested ntuple '" + fNTupleName + "' is not present in DAOS container."));
515
516 auto oclass = RDaosObject::ObjClassId(locator.fAnchor->fObjClass);
517 if (oclass.IsUnknown())
518 throw ROOT::RException(R__FAIL("Attach: unknown object class " + locator.fAnchor->fObjClass));
519
520 fDaosContainer->SetDefaultObjectClass(oclass);
521 fNTupleIndex = locator.GetIndex();
522 daos_obj_id_t oidPageList{kOidLowPageList, static_cast<decltype(daos_obj_id_t::hi)>(fNTupleIndex)};
523
524 auto desc = descBuilder.MoveDescriptor();
525
526 for (const auto &cgDesc : desc.GetClusterGroupIterable()) {
527 buffer = MakeUninitArray<unsigned char>(cgDesc.GetPageListLength());
528 zipBuffer = MakeUninitArray<unsigned char>(cgDesc.GetPageListLocator().GetNBytesOnStorage());
529 fDaosContainer->ReadSingleAkey(
530 zipBuffer.get(), cgDesc.GetPageListLocator().GetNBytesOnStorage(), oidPageList, kDistributionKeyDefault,
531 cgDesc.GetPageListLocator().GetPosition<RNTupleLocatorObject64>().GetLocation(), kCidMetadata);
532 RNTupleDecompressor::Unzip(zipBuffer.get(), cgDesc.GetPageListLocator().GetNBytesOnStorage(),
533 cgDesc.GetPageListLength(), buffer.get());
534
535 RNTupleSerializer::DeserializePageList(buffer.get(), cgDesc.GetPageListLength(), cgDesc.GetId(), desc);
536 }
537
538 return desc;
539}
540
542{
543 return fDaosContainer->GetDefaultObjectClass().ToString();
544}
545
547 RClusterIndex clusterIndex, RSealedPage &sealedPage)
548{
549 const auto clusterId = clusterIndex.GetClusterId();
550
552 {
553 auto descriptorGuard = GetSharedDescriptorGuard();
554 const auto &clusterDescriptor = descriptorGuard->GetClusterDescriptor(clusterId);
555 pageInfo = clusterDescriptor.GetPageRange(physicalColumnId).Find(clusterIndex.GetIndex());
556 }
557
558 sealedPage.SetBufferSize(pageInfo.fLocator.GetNBytesOnStorage() + pageInfo.fHasChecksum * kNBytesPageChecksum);
559 sealedPage.SetNElements(pageInfo.fNElements);
560 sealedPage.SetHasChecksum(pageInfo.fHasChecksum);
561 if (!sealedPage.GetBuffer())
562 return;
563
565 assert(!pageInfo.fHasChecksum);
566 memcpy(const_cast<void *>(sealedPage.GetBuffer()), RPage::GetPageZeroBuffer(), sealedPage.GetBufferSize());
567 return;
568 }
569
571 // Suboptimal but hard to do differently: we load the full cage up to and including the requested page.
572 // In practice, individual LoadSealedPage calls are rare and usually full clusters are buffered.
573 // The support for extracting individual pages from a cage makes testing easier, however.
574 const auto [position, offset] = DecodeDaosPagePosition(pageInfo.fLocator.GetPosition<RNTupleLocatorObject64>());
575 RDaosKey daosKey = GetPageDaosKey<kDefaultDaosMapping>(fNTupleIndex, clusterId, physicalColumnId, position);
576 const auto bufSize = offset + sealedPage.GetBufferSize();
577 auto cageHeadBuffer = MakeUninitArray<unsigned char>(bufSize);
578 fDaosContainer->ReadSingleAkey(cageHeadBuffer.get(), bufSize, daosKey.fOid, daosKey.fDkey, daosKey.fAkey);
579 memcpy(const_cast<void *>(sealedPage.GetBuffer()), cageHeadBuffer.get() + offset, sealedPage.GetBufferSize());
580 } else {
581 RDaosKey daosKey =
582 GetPageDaosKey<kDefaultDaosMapping>(fNTupleIndex, clusterId, physicalColumnId,
584 fDaosContainer->ReadSingleAkey(const_cast<void *>(sealedPage.GetBuffer()), sealedPage.GetBufferSize(),
585 daosKey.fOid, daosKey.fDkey, daosKey.fAkey);
586 }
587
589}
590
593 const RClusterInfo &clusterInfo, NTupleSize_t idxInCluster)
594{
595 const auto columnId = columnHandle.fPhysicalId;
596 const auto clusterId = clusterInfo.fClusterId;
597 const auto &pageInfo = clusterInfo.fPageInfo;
598
599 const auto element = columnHandle.fColumn->GetElement();
600 const auto elementSize = element->GetSize();
601 const auto elementInMemoryType = element->GetIdentifier().fInMemoryType;
602
603 if (pageInfo.fLocator.GetType() == RNTupleLocator::kTypePageZero) {
604 auto pageZero = fPageAllocator->NewPage(elementSize, pageInfo.fNElements);
605 pageZero.GrowUnchecked(pageInfo.fNElements);
606 memset(pageZero.GetBuffer(), 0, pageZero.GetNBytes());
607 pageZero.SetWindow(clusterInfo.fColumnOffset + pageInfo.fFirstInPage,
608 RPage::RClusterInfo(clusterId, clusterInfo.fColumnOffset));
609 return fPagePool.RegisterPage(std::move(pageZero), RPagePool::RKey{columnId, elementInMemoryType});
610 }
611
612 RSealedPage sealedPage;
613 sealedPage.SetNElements(pageInfo.fNElements);
614 sealedPage.SetHasChecksum(pageInfo.fHasChecksum);
615 sealedPage.SetBufferSize(pageInfo.fLocator.GetNBytesOnStorage() + pageInfo.fHasChecksum * kNBytesPageChecksum);
616 std::unique_ptr<unsigned char[]> directReadBuffer; // only used if cluster pool is turned off
617
618 if (fOptions.GetClusterCache() == RNTupleReadOptions::EClusterCache::kOff) {
619 if (pageInfo.fLocator.GetReserved() & EDaosLocatorFlags::kCagedPage) {
620 throw ROOT::RException(R__FAIL("accessing caged pages is only supported in conjunction with cluster cache"));
621 }
622
623 directReadBuffer = MakeUninitArray<unsigned char>(sealedPage.GetBufferSize());
624 RDaosKey daosKey = GetPageDaosKey<kDefaultDaosMapping>(
625 fNTupleIndex, clusterId, columnId, pageInfo.fLocator.GetPosition<RNTupleLocatorObject64>().GetLocation());
626 fDaosContainer->ReadSingleAkey(directReadBuffer.get(), sealedPage.GetBufferSize(), daosKey.fOid, daosKey.fDkey,
627 daosKey.fAkey);
628 fCounters->fNPageRead.Inc();
629 fCounters->fNRead.Inc();
630 fCounters->fSzReadPayload.Add(sealedPage.GetBufferSize());
631 sealedPage.SetBuffer(directReadBuffer.get());
632 } else {
633 if (!fCurrentCluster || (fCurrentCluster->GetId() != clusterId) || !fCurrentCluster->ContainsColumn(columnId))
634 fCurrentCluster = fClusterPool->GetCluster(clusterId, fActivePhysicalColumns.ToColumnSet());
635 R__ASSERT(fCurrentCluster->ContainsColumn(columnId));
636
637 auto cachedPageRef =
638 fPagePool.GetPage(RPagePool::RKey{columnId, elementInMemoryType}, RClusterIndex(clusterId, idxInCluster));
639 if (!cachedPageRef.Get().IsNull())
640 return cachedPageRef;
641
642 ROnDiskPage::Key key(columnId, pageInfo.fPageNo);
643 auto onDiskPage = fCurrentCluster->GetOnDiskPage(key);
644 R__ASSERT(onDiskPage && (sealedPage.GetBufferSize() == onDiskPage->GetSize()));
645 sealedPage.SetBuffer(onDiskPage->GetAddress());
646 }
647
648 RPage newPage;
649 {
650 Detail::RNTupleAtomicTimer timer(fCounters->fTimeWallUnzip, fCounters->fTimeCpuUnzip);
651 newPage = UnsealPage(sealedPage, *element).Unwrap();
652 fCounters->fSzUnzip.Add(elementSize * pageInfo.fNElements);
653 }
654
655 newPage.SetWindow(clusterInfo.fColumnOffset + pageInfo.fFirstInPage,
656 RPage::RClusterInfo(clusterId, clusterInfo.fColumnOffset));
657 fCounters->fNPageUnsealed.Inc();
658 return fPagePool.RegisterPage(std::move(newPage), RPagePool::RKey{columnId, elementInMemoryType});
659}
660
661std::unique_ptr<ROOT::Experimental::Internal::RPageSource>
663{
664 auto clone = new RPageSourceDaos(fNTupleName, fURI, fOptions);
665 return std::unique_ptr<RPageSourceDaos>(clone);
666}
667
668std::vector<std::unique_ptr<ROOT::Experimental::Internal::RCluster>>
670{
671 struct RDaosSealedPageLocator {
672 DescriptorId_t fClusterId = 0;
673 DescriptorId_t fColumnId = 0;
674 NTupleSize_t fPageNo = 0;
675 std::uint64_t fPosition = 0;
676 std::uint64_t fCageOffset = 0;
677 std::uint64_t fDataSize = 0; // page payload
678 std::uint64_t fBufferSize = 0; // page payload + checksum (if available)
679 };
680
681 // Prepares read requests for a single cluster; `readRequests` is modified by this function. Requests are coalesced
682 // by OID and distribution key.
683 // TODO(jalopezg): this may be a private member function; that, however, requires additional changes given that
684 // `RDaosContainer::MultiObjectRWOperation_t` cannot be forward-declared
685 auto fnPrepareSingleCluster = [&](const RCluster::RKey &clusterKey,
687 auto clusterId = clusterKey.fClusterId;
688 // Group page locators by their position in the object store; with caging enabled, this facilitates the
689 // processing of cages' requests together into a single IOV to be loaded.
690 std::unordered_map<std::uint32_t, std::vector<RDaosSealedPageLocator>> onDiskPages;
691
692 unsigned clusterBufSz = 0, nPages = 0;
693 auto pageZeroMap = std::make_unique<ROnDiskPageMap>();
694 PrepareLoadCluster(
695 clusterKey, *pageZeroMap,
696 [&](DescriptorId_t physicalColumnId, NTupleSize_t pageNo,
698 const auto &pageLocator = pageInfo.fLocator;
699 uint32_t position, offset;
700 std::tie(position, offset) = DecodeDaosPagePosition(pageLocator.GetPosition<RNTupleLocatorObject64>());
701 auto [itLoc, _] = onDiskPages.emplace(position, std::vector<RDaosSealedPageLocator>());
702 auto pageBufferSize = pageLocator.GetNBytesOnStorage() + pageInfo.fHasChecksum * kNBytesPageChecksum;
703
704 itLoc->second.push_back({clusterId, physicalColumnId, pageNo, position, offset,
705 pageLocator.GetNBytesOnStorage(), pageBufferSize});
706 ++nPages;
707 clusterBufSz += pageBufferSize;
708 });
709
710 auto clusterBuffer = new unsigned char[clusterBufSz];
711 auto pageMap = std::make_unique<ROnDiskPageMapHeap>(std::unique_ptr<unsigned char[]>(clusterBuffer));
712
713 auto cageBuffer = clusterBuffer;
714 // Fill the cluster page map and the read requests for the RDaosContainer::ReadV() call
715 for (auto &[cageIndex, pageVec] : onDiskPages) {
716 auto columnId = pageVec[0].fColumnId; // All pages in a cage belong to the same column
717 std::size_t cageSz = 0;
718
719 for (auto &s : pageVec) {
720 assert(columnId == s.fColumnId);
721 assert(cageIndex == s.fPosition);
722 // Register the on disk pages in a page map
723 ROnDiskPage::Key key(s.fColumnId, s.fPageNo);
724 pageMap->Register(key, ROnDiskPage(cageBuffer + s.fCageOffset, s.fBufferSize));
725 cageSz += s.fBufferSize;
726 }
727
728 // Prepare new read request batched up by object ID and distribution key
729 d_iov_t iov;
730 d_iov_set(&iov, cageBuffer, cageSz);
731
732 RDaosKey daosKey = GetPageDaosKey<kDefaultDaosMapping>(fNTupleIndex, clusterId, columnId, cageIndex);
733 auto odPair = RDaosContainer::ROidDkeyPair{daosKey.fOid, daosKey.fDkey};
734 auto [itReq, ret] = readRequests.emplace(odPair, RDaosContainer::RWOperation(odPair));
735 itReq->second.Insert(daosKey.fAkey, iov);
736
737 cageBuffer += cageSz;
738 }
739 fCounters->fNPageRead.Add(nPages);
740 fCounters->fSzReadPayload.Add(clusterBufSz);
741
742 auto cluster = std::make_unique<RCluster>(clusterId);
743 cluster->Adopt(std::move(pageMap));
744 cluster->Adopt(std::move(pageZeroMap));
745 for (auto colId : clusterKey.fPhysicalColumnSet)
746 cluster->SetColumnAvailable(colId);
747 return cluster;
748 };
749
750 fCounters->fNClusterLoaded.Add(clusterKeys.size());
751
752 std::vector<std::unique_ptr<ROOT::Experimental::Internal::RCluster>> clusters;
754 for (auto key : clusterKeys) {
755 clusters.emplace_back(fnPrepareSingleCluster(key, readRequests));
756 }
757
758 {
759 Detail::RNTupleAtomicTimer timer(fCounters->fTimeWallRead, fCounters->fTimeCpuRead);
760 if (int err = fDaosContainer->ReadV(readRequests))
761 throw ROOT::RException(R__FAIL("ReadV: error" + std::string(d_errstr(err))));
762 }
763 fCounters->fNReadV.Inc();
764 fCounters->fNRead.Add(readRequests.size());
765
766 return clusters;
767}
#define R__FORWARD_ERROR(res)
Short-hand to return an RResult<T> in an error state (i.e. after checking)
Definition RError.hxx:303
#define R__FAIL(msg)
Short-hand to return an RResult<T> in an error state; the RError is implicitly converted into RResult...
Definition RError.hxx:299
#define R__LOG_WARNING(...)
Definition RLogger.hxx:363
#define h(i)
Definition RSha256.hxx:106
#define R__ASSERT(e)
Checks condition e and reports a fatal error if it's false.
Definition TError.h:125
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t mask
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h offset
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h length
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t bytes
UInt_t Hash(const TString &s)
Definition TString.h:494
#define _(A, B)
Definition cfortran.h:108
Record wall time and CPU time between construction and destruction.
Managed a set of clusters containing compressed and packed pages.
RColumnElementBase * GetElement() const
Definition RColumn.hxx:337
A RDaosContainer provides read/write access to objects in a given container.
Definition RDaos.hxx:157
RDaosObject::DistributionKey_t DistributionKey_t
Definition RDaos.hxx:160
std::unordered_map< ROidDkeyPair, RWOperation, ROidDkeyPair::Hash > MultiObjectRWOperation_t
Definition RDaos.hxx:231
int ReadSingleAkey(void *buffer, std::size_t length, daos_obj_id_t oid, DistributionKey_t dkey, AttributeKey_t akey, ObjClassId_t cid)
Read data from a single object attribute key to the given buffer.
Definition RDaos.cxx:211
RDaosObject::AttributeKey_t AttributeKey_t
Definition RDaos.hxx:161
static Writer_t MakeMemCopyWriter(unsigned char *dest)
static void Unzip(const void *from, size_t nbytes, size_t dataLen, void *to)
The nbytes parameter provides the size ls of the from buffer.
A helper class for piece-wise construction of an RNTupleDescriptor.
void AddToOnDiskFooterSize(std::uint64_t size)
The real footer size also include the page list envelopes.
A helper class for serializing and deserialization of the RNTuple binary format.
static std::uint32_t DeserializeUInt16(const void *buffer, std::uint16_t &val)
static RResult< std::uint32_t > DeserializeString(const void *buffer, std::uint64_t bufSize, std::string &val)
static std::uint32_t SerializeString(const std::string &val, void *buffer)
static std::uint32_t DeserializeUInt32(const void *buffer, std::uint32_t &val)
static std::uint32_t SerializeUInt64(std::uint64_t val, void *buffer)
static RResult< void > DeserializeFooter(const void *buffer, std::uint64_t bufSize, RNTupleDescriptorBuilder &descBuilder)
static std::uint32_t DeserializeUInt64(const void *buffer, std::uint64_t &val)
static RResult< void > DeserializeHeader(const void *buffer, std::uint64_t bufSize, RNTupleDescriptorBuilder &descBuilder)
static RResult< void > DeserializePageList(const void *buffer, std::uint64_t bufSize, DescriptorId_t clusterGroupId, RNTupleDescriptor &desc)
static std::uint32_t SerializeUInt16(std::uint16_t val, void *buffer)
static std::uint32_t SerializeUInt32(std::uint32_t val, void *buffer)
A page as being stored on disk, that is packed and compressed.
Definition RCluster.hxx:42
Base class for a sink with a physical storage backend.
void EnableDefaultMetrics(const std::string &prefix)
Enables the default set of metrics provided by RPageSink.
Reference to a page stored in the page pool.
RNTupleLocator CommitClusterGroupImpl(unsigned char *serializedPageList, std::uint32_t length) final
Returns the locator of the page list envelope of the given buffer that contains the serialized page l...
RPageSinkDaos(std::string_view ntupleName, std::string_view uri, const RNTupleWriteOptions &options)
void WriteNTupleFooter(const void *data, size_t nbytes, size_t lenFooter)
std::uint64_t StageClusterImpl() final
Returns the number of bytes written to storage (excluding metadata)
void WriteNTupleHeader(const void *data, size_t nbytes, size_t lenHeader)
void InitImpl(unsigned char *serializedHeader, std::uint32_t length) final
RNTupleLocator CommitPageImpl(ColumnHandle_t columnHandle, const RPage &page) final
RNTupleLocator CommitSealedPageImpl(DescriptorId_t physicalColumnId, const RPageStorage::RSealedPage &sealedPage) final
std::vector< RNTupleLocator > CommitSealedPageVImpl(std::span< RPageStorage::RSealedPageGroup > ranges, const std::vector< bool > &mask) final
Vector commit of preprocessed pages.
std::unique_ptr< RNTupleCompressor > fCompressor
Helper to zip pages and header/footer; includes a 16MB (kMAXZIPBUF) zip buffer.
Storage provider that reads ntuple pages from a DAOS container.
std::string GetObjectClass() const
Return the object class used for user data OIDs in this ntuple.
std::vector< std::unique_ptr< RCluster > > LoadClusters(std::span< RCluster::RKey > clusterKeys) final
Populates all the pages of the given cluster ids and columns; it is possible that some columns do not...
RPageSourceDaos(std::string_view ntupleName, std::string_view uri, const RNTupleReadOptions &options)
void LoadSealedPage(DescriptorId_t physicalColumnId, RClusterIndex clusterIndex, RSealedPage &sealedPage) final
Read the packed and compressed bytes of a page into the memory buffer provided by sealedPage.
RNTupleDescriptor AttachImpl() final
LoadStructureImpl() has been called before AttachImpl() is called
RPageRef LoadPageImpl(ColumnHandle_t columnHandle, const RClusterInfo &clusterInfo, NTupleSize_t idxInCluster) final
std::unique_ptr< RDaosContainer > fDaosContainer
A container that stores object data (header/footer, pages, etc.)
std::unique_ptr< RPageSource > CloneImpl() const final
The cloned page source creates a new connection to the pool/container.
Abstract interface to read data from an ntuple.
void EnableDefaultMetrics(const std::string &prefix)
Enables the default set of metrics provided by RPageSource.
Stores information about the cluster in which this page resides.
Definition RPage.hxx:56
A page is a slice of a column that is mapped into memory.
Definition RPage.hxx:47
std::size_t GetNBytes() const
The space taken by column elements in the buffer.
Definition RPage.hxx:114
void SetWindow(const NTupleSize_t rangeFirst, const RClusterInfo &clusterInfo)
Seek the page to a certain position of the column.
Definition RPage.hxx:159
static const void * GetPageZeroBuffer()
Return a pointer to the page zero buffer used if there is no on-disk data for a particular deferred c...
Definition RPage.cxx:25
Addresses a column element or field item relative to a particular cluster, instead of a global NTuple...
DescriptorId_t GetClusterId() const
The on-storage meta-data of an ntuple.
RNTupleLocator payload that is common for object stores using 64bit location information.
Generic information about the physical location of data.
std::uint64_t GetNBytesOnStorage() const
void SetNBytesOnStorage(std::uint64_t nBytesOnStorage)
void SetReserved(std::uint8_t reserved)
void SetType(ELocatorType type)
Common user-tunable settings for reading ntuples.
DAOS-specific user-tunable settings for storing ntuples.
Common user-tunable settings for storing ntuples.
Base class for all ROOT issued exceptions.
Definition RError.hxx:79
static constexpr std::uint16_t kVersionEpoch
Definition RNTuple.hxx:79
void ThrowOnError()
Short-hand method to throw an exception in the case of errors.
Definition RError.hxx:289
The class is used as a return type for operations that can fail; wraps a value of type T or an RError...
Definition RError.hxx:197
const char * d_errstr(int rc)
static void d_iov_set(d_iov_t *iov, void *buf, size_t size)
Definition daos.h:50
uint16_t daos_oclass_id_t
Definition daos.h:135
@ OC_SX
Definition daos.h:129
std::unique_ptr< T[]> MakeUninitArray(std::size_t size)
Make an array of default-initialized elements.
RLogChannel & NTupleLog()
Log channel for RNTuple diagnostics.
std::uint64_t NTupleSize_t
Integer type long enough to hold the maximum number of entries in a column.
std::uint64_t DescriptorId_t
Distriniguishes elements of the same type within a descriptor, e.g. different fields.
The identifiers that specifies the content of a (partial) cluster.
Definition RCluster.hxx:156
A pair of <object ID, distribution key> that can be used to issue a fetch/update request for multiple...
Definition RDaos.hxx:166
Describes a read/write operation on multiple attribute keys under the same object ID and distribution...
Definition RDaos.hxx:190
Entry point for an RNTuple in a DAOS container.
std::uint32_t fNBytesFooter
The size of the compressed ntuple footer.
std::uint64_t fVersionAnchor
Allows for evolving the struct in future versions.
std::string fObjClass
The object class for user data OIDs, e.g. SX
std::uint16_t fVersionEpoch
Version of the binary format supported by the writer.
RResult< std::uint32_t > Deserialize(const void *buffer, std::uint32_t bufSize)
std::uint32_t fLenHeader
The size of the uncompressed ntuple header.
std::uint32_t fLenFooter
The size of the uncompressed ntuple footer.
std::uint32_t fNBytesHeader
The size of the compressed ntuple header.
static constexpr std::size_t kOCNameMaxLength
This limit is currently not defined in any header and any call to daos_oclass_id2name() within DAOS u...
Definition RDaos.hxx:108
On-disk pages within a page source are identified by the column and page number.
Definition RCluster.hxx:52
Summarizes cluster-level information that are necessary to load a certain page.
std::uint64_t fColumnOffset
The first element number of the page's column in the given cluster.
RClusterDescriptor::RPageRange::RPageInfoExtended fPageInfo
Location of the page on disk.
A sealed page contains the bytes of a page as written to storage (packed & compressed).
We do not need to store the element size / uncompressed page size because we know to which column the...
std::uint32_t fNElements
The sum of the elements of all the pages must match the corresponding fNElements field in fColumnRang...
bool fHasChecksum
If true, the 8 bytes following the serialized page are an xxhash of the on-disk page data.
RNTupleLocator fLocator
The meaning of fLocator depends on the storage backend.
iovec for memory buffer
Definition daos.h:37
uint64_t hi
Definition daos.h:147
uint64_t lo
Definition daos.h:146
TMarker m
Definition textangle.C:8