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/RField.hxx>
19#include <ROOT/RLogger.hxx>
21#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 <iostream>
38#include <limits>
39#include <utility>
40#include <regex>
41
42namespace {
45
46/// \brief RNTuple page-DAOS mappings
47enum EDaosMapping { kOidPerCluster, kOidPerPage };
48
49struct RDaosKey {
50 daos_obj_id_t fOid;
51 DistributionKey_t fDkey;
52 AttributeKey_t fAkey;
53};
54
55/// \brief Pre-defined keys for object store. `kDistributionKeyDefault` is the distribution key for metadata and
56/// pagelist values; optionally it can be used for ntuple pages (if under the `kOidPerPage` mapping strategy).
57/// `kAttributeKeyDefault` is the attribute key for ntuple pages under `kOidPerPage`.
58/// `kAttributeKey{Anchor,Header,Footer}` are the respective attribute keys for anchor/header/footer metadata elements.
59static constexpr DistributionKey_t kDistributionKeyDefault = 0x5a3c69f0cafe4a11;
60static constexpr AttributeKey_t kAttributeKeyDefault = 0x4243544b53444229;
61static constexpr AttributeKey_t kAttributeKeyAnchor = 0x4243544b5344422a;
62static constexpr AttributeKey_t kAttributeKeyHeader = 0x4243544b5344422b;
63static constexpr AttributeKey_t kAttributeKeyFooter = 0x4243544b5344422c;
64
65/// \brief Pre-defined 64 LSb of the OIDs for ntuple metadata (holds anchor/header/footer) and clusters' pagelists.
66static constexpr decltype(daos_obj_id_t::lo) kOidLowMetadata = -1;
67static constexpr decltype(daos_obj_id_t::lo) kOidLowPageList = -2;
68
69static constexpr daos_oclass_id_t kCidMetadata = OC_SX;
70
71static constexpr EDaosMapping kDefaultDaosMapping = kOidPerCluster;
72
73template <EDaosMapping mapping>
74RDaosKey GetPageDaosKey(ROOT::Experimental::Detail::ntuple_index_t ntplId, long unsigned clusterId,
75 long unsigned columnId, long unsigned pageCount)
76{
77 if constexpr (mapping == kOidPerCluster) {
78 return RDaosKey{daos_obj_id_t{static_cast<decltype(daos_obj_id_t::lo)>(clusterId),
79 static_cast<decltype(daos_obj_id_t::hi)>(ntplId)},
80 static_cast<DistributionKey_t>(columnId), static_cast<AttributeKey_t>(pageCount)};
81 } else if constexpr (mapping == kOidPerPage) {
82 return RDaosKey{daos_obj_id_t{static_cast<decltype(daos_obj_id_t::lo)>(pageCount),
83 static_cast<decltype(daos_obj_id_t::hi)>(ntplId)},
84 kDistributionKeyDefault, kAttributeKeyDefault};
85 }
86}
87
88struct RDaosURI {
89 /// \brief Label of the DAOS pool
90 std::string fPoolLabel;
91 /// \brief Label of the container for this RNTuple
92 std::string fContainerLabel;
93};
94
95/**
96 \brief Parse a DAOS RNTuple URI of the form 'daos://pool_id/container_id'.
97*/
98RDaosURI ParseDaosURI(std::string_view uri)
99{
100 std::regex re("daos://([^/]+)/(.+)");
101 std::cmatch m;
102 if (!std::regex_match(uri.data(), m, re))
103 throw ROOT::Experimental::RException(R__FAIL("Invalid DAOS pool URI."));
104 return {m[1], m[2]};
105}
106
107} // namespace
108
109////////////////////////////////////////////////////////////////////////////////
110
112{
113 using RNTupleSerializer = ROOT::Experimental::Internal::RNTupleSerializer;
114 if (buffer != nullptr) {
115 auto bytes = reinterpret_cast<unsigned char *>(buffer);
116 bytes += RNTupleSerializer::SerializeUInt32(fVersion, bytes);
117 bytes += RNTupleSerializer::SerializeUInt32(fNBytesHeader, bytes);
118 bytes += RNTupleSerializer::SerializeUInt32(fLenHeader, bytes);
119 bytes += RNTupleSerializer::SerializeUInt32(fNBytesFooter, bytes);
120 bytes += RNTupleSerializer::SerializeUInt32(fLenFooter, bytes);
121 bytes += RNTupleSerializer::SerializeString(fObjClass, bytes);
122 }
123 return RNTupleSerializer::SerializeString(fObjClass, nullptr) + 20;
124}
125
127ROOT::Experimental::Detail::RDaosNTupleAnchor::Deserialize(const void *buffer, std::uint32_t bufSize)
128{
129 if (bufSize < 20)
130 return R__FAIL("DAOS anchor too short");
131
132 using RNTupleSerializer = ROOT::Experimental::Internal::RNTupleSerializer;
133 auto bytes = reinterpret_cast<const unsigned char *>(buffer);
134 bytes += RNTupleSerializer::DeserializeUInt32(bytes, fVersion);
135 bytes += RNTupleSerializer::DeserializeUInt32(bytes, fNBytesHeader);
136 bytes += RNTupleSerializer::DeserializeUInt32(bytes, fLenHeader);
137 bytes += RNTupleSerializer::DeserializeUInt32(bytes, fNBytesFooter);
138 bytes += RNTupleSerializer::DeserializeUInt32(bytes, fLenFooter);
139 auto result = RNTupleSerializer::DeserializeString(bytes, bufSize - 20, fObjClass);
140 if (!result)
141 return R__FORWARD_ERROR(result);
142 return result.Unwrap() + 20;
143}
144
146{
147 return RDaosNTupleAnchor().Serialize(nullptr) +
149}
150
154{
155 std::unique_ptr<unsigned char[]> buffer, zipBuffer;
156 auto &anchor = fAnchor.emplace();
157 int err;
158
160 daos_obj_id_t oidMetadata{kOidLowMetadata, static_cast<decltype(daos_obj_id_t::hi)>(this->GetIndex())};
161
162 buffer = std::make_unique<unsigned char[]>(anchorSize);
163 if ((err = cont.ReadSingleAkey(buffer.get(), anchorSize, oidMetadata, kDistributionKeyDefault, kAttributeKeyAnchor,
164 kCidMetadata)))
165 return err;
166
167 anchor.Deserialize(buffer.get(), anchorSize).Unwrap();
168
169 builder.SetOnDiskHeaderSize(anchor.fNBytesHeader);
170 buffer = std::make_unique<unsigned char[]>(anchor.fLenHeader);
171 zipBuffer = std::make_unique<unsigned char[]>(anchor.fNBytesHeader);
172 if ((err = cont.ReadSingleAkey(zipBuffer.get(), anchor.fNBytesHeader, oidMetadata, kDistributionKeyDefault,
173 kAttributeKeyHeader, kCidMetadata)))
174 return err;
175 decompressor.Unzip(zipBuffer.get(), anchor.fNBytesHeader, anchor.fLenHeader, buffer.get());
176 ROOT::Experimental::Internal::RNTupleSerializer::DeserializeHeaderV1(buffer.get(), anchor.fLenHeader, builder);
177
178 builder.AddToOnDiskFooterSize(anchor.fNBytesFooter);
179 buffer = std::make_unique<unsigned char[]>(anchor.fLenFooter);
180 zipBuffer = std::make_unique<unsigned char[]>(anchor.fNBytesFooter);
181 if ((err = cont.ReadSingleAkey(zipBuffer.get(), anchor.fNBytesFooter, oidMetadata, kDistributionKeyDefault,
182 kAttributeKeyFooter, kCidMetadata)))
183 return err;
184 decompressor.Unzip(zipBuffer.get(), anchor.fNBytesFooter, anchor.fLenFooter, buffer.get());
185 ROOT::Experimental::Internal::RNTupleSerializer::DeserializeFooterV1(buffer.get(), anchor.fLenFooter, builder);
186
187 return 0;
188}
189
190std::pair<ROOT::Experimental::Detail::RDaosContainerNTupleLocator, ROOT::Experimental::RNTupleDescriptorBuilder>
192 const std::string &ntupleName,
193 RNTupleDecompressor &decompressor)
194{
195 auto result = std::make_pair(RDaosContainerNTupleLocator(ntupleName), RNTupleDescriptorBuilder());
196
197 auto &loc = result.first;
198 auto &builder = result.second;
199
200 if (int err = loc.InitNTupleDescriptorBuilder(cont, decompressor, builder); !err) {
201 if (ntupleName.empty() || ntupleName != builder.GetDescriptor().GetName()) {
202 // Hash already taken by a differently-named ntuple.
204 R__FAIL("LocateNTuple: ntuple name '" + ntupleName + "' unavailable in this container."));
205 }
206 }
207 return result;
208}
209
210////////////////////////////////////////////////////////////////////////////////
211
212ROOT::Experimental::Detail::RPageSinkDaos::RPageSinkDaos(std::string_view ntupleName, std::string_view uri,
213 const RNTupleWriteOptions &options)
214 : RPageSink(ntupleName, options), fPageAllocator(std::make_unique<RPageAllocatorHeap>()), fURI(uri)
215{
216 R__LOG_WARNING(NTupleLog()) << "The DAOS backend is experimental and still under development. "
217 << "Do not store real data with this version of RNTuple!";
218 fCompressor = std::make_unique<RNTupleCompressor>();
219 EnableDefaultMetrics("RPageSinkDaos");
220}
221
223
225 unsigned char *serializedHeader, std::uint32_t length)
226{
227 auto opts = dynamic_cast<RNTupleWriteOptionsDaos *>(fOptions.get());
228 fNTupleAnchor.fObjClass = opts ? opts->GetObjectClass() : RNTupleWriteOptionsDaos().GetObjectClass();
229 auto oclass = RDaosObject::ObjClassId(fNTupleAnchor.fObjClass);
230 if (oclass.IsUnknown())
231 throw ROOT::Experimental::RException(R__FAIL("Unknown object class " + fNTupleAnchor.fObjClass));
232
233 auto args = ParseDaosURI(fURI);
234 auto pool = std::make_shared<RDaosPool>(args.fPoolLabel);
235 fDaosContainer = std::make_unique<RDaosContainer>(pool, args.fContainerLabel, /*create =*/true);
236 fDaosContainer->SetDefaultObjectClass(oclass);
237
238 RNTupleDecompressor decompressor;
239 auto [locator, _] = RDaosContainerNTupleLocator::LocateNTuple(*fDaosContainer, fNTupleName, decompressor);
240 fNTupleIndex = locator.GetIndex();
241
242 auto zipBuffer = std::make_unique<unsigned char[]>(length);
243 auto szZipHeader = fCompressor->Zip(serializedHeader, length, GetWriteOptions().GetCompression(),
244 RNTupleCompressor::MakeMemCopyWriter(zipBuffer.get()));
245 WriteNTupleHeader(zipBuffer.get(), szZipHeader, length);
246}
247
250{
251 auto element = columnHandle.fColumn->GetElement();
252 RPageStorage::RSealedPage sealedPage;
253 {
254 RNTupleAtomicTimer timer(fCounters->fTimeWallZip, fCounters->fTimeCpuZip);
255 sealedPage = SealPage(page, *element, GetWriteOptions().GetCompression());
256 }
257
258 fCounters->fSzZip.Add(page.GetNBytes());
259 return CommitSealedPageImpl(columnHandle.fId, sealedPage);
260}
261
264 const RPageStorage::RSealedPage &sealedPage)
265{
266 auto offsetData = fPageId.fetch_add(1);
267 DescriptorId_t clusterId = fDescriptorBuilder.GetDescriptor().GetNClusters();
268
269 {
270 RNTupleAtomicTimer timer(fCounters->fTimeWallWrite, fCounters->fTimeCpuWrite);
271 RDaosKey daosKey = GetPageDaosKey<kDefaultDaosMapping>(fNTupleIndex, clusterId, columnId, offsetData);
272 fDaosContainer->WriteSingleAkey(sealedPage.fBuffer, sealedPage.fSize, daosKey.fOid, daosKey.fDkey, daosKey.fAkey);
273 }
274
276 result.fPosition = offsetData;
277 result.fBytesOnStorage = sealedPage.fSize;
278 fCounters->fNPageCommitted.Inc();
279 fCounters->fSzWritePayload.Add(sealedPage.fSize);
280 fNBytesCurrentCluster += sealedPage.fSize;
281 return result;
282}
283
284std::vector<ROOT::Experimental::RNTupleLocator>
285ROOT::Experimental::Detail::RPageSinkDaos::CommitSealedPageVImpl(std::span<RPageStorage::RSealedPageGroup> ranges)
286{
288 std::vector<ROOT::Experimental::RNTupleLocator> locators;
289 size_t nPages =
290 std::accumulate(ranges.begin(), ranges.end(), 0, [](size_t c, const RPageStorage::RSealedPageGroup &r) {
291 return c + std::distance(r.fFirst, r.fLast);
292 });
293 locators.reserve(nPages);
294
295 DescriptorId_t clusterId = fDescriptorBuilder.GetDescriptor().GetNClusters();
296 std::size_t szPayload = 0;
297
298 /// Aggregate batch of requests by object ID and distribution key, determined by the ntuple-DAOS mapping
299 for (auto &range : ranges) {
300 for (auto sealedPageIt = range.fFirst; sealedPageIt != range.fLast; ++sealedPageIt) {
301 const RPageStorage::RSealedPage &s = *sealedPageIt;
302 d_iov_t pageIov;
303 d_iov_set(&pageIov, const_cast<void *>(s.fBuffer), s.fSize);
304 auto offsetData = fPageId.fetch_add(1);
305
306 RDaosKey daosKey = GetPageDaosKey<kDefaultDaosMapping>(fNTupleIndex, clusterId, range.fColumnId, offsetData);
307 auto odPair = RDaosContainer::ROidDkeyPair{daosKey.fOid, daosKey.fDkey};
308 auto [it, ret] = writeRequests.emplace(odPair, RDaosContainer::RWOperation(odPair));
309 it->second.insert(daosKey.fAkey, pageIov);
310
311 RNTupleLocator locator;
312 locator.fPosition = offsetData;
313 locator.fBytesOnStorage = s.fSize;
314 locators.push_back(locator);
315
316 szPayload += s.fSize;
317 }
318 }
319 fNBytesCurrentCluster += szPayload;
320
321 {
322 RNTupleAtomicTimer timer(fCounters->fTimeWallWrite, fCounters->fTimeCpuWrite);
323 if (int err = fDaosContainer->WriteV(writeRequests))
324 throw ROOT::Experimental::RException(R__FAIL("WriteV: error" + std::string(d_errstr(err))));
325 }
326
327 fCounters->fNPageCommitted.Add(nPages);
328 fCounters->fSzWritePayload.Add(szPayload);
329
330 return locators;
331}
332
333std::uint64_t
335{
336 return std::exchange(fNBytesCurrentCluster, 0);
337}
338
341 std::uint32_t length)
342{
343 auto bufPageListZip = std::make_unique<unsigned char[]>(length);
344 auto szPageListZip = fCompressor->Zip(serializedPageList, length, GetWriteOptions().GetCompression(),
345 RNTupleCompressor::MakeMemCopyWriter(bufPageListZip.get()));
346
347 auto offsetData = fClusterGroupId.fetch_add(1);
348 fDaosContainer->WriteSingleAkey(
349 bufPageListZip.get(), szPageListZip,
350 daos_obj_id_t{kOidLowPageList, static_cast<decltype(daos_obj_id_t::hi)>(fNTupleIndex)}, kDistributionKeyDefault,
351 offsetData, kCidMetadata);
353 result.fPosition = offsetData;
354 result.fBytesOnStorage = szPageListZip;
355 fCounters->fSzWritePayload.Add(szPageListZip);
356 return result;
357}
358
359void ROOT::Experimental::Detail::RPageSinkDaos::CommitDatasetImpl(unsigned char *serializedFooter, std::uint32_t length)
360{
361 auto bufFooterZip = std::make_unique<unsigned char[]>(length);
362 auto szFooterZip = fCompressor->Zip(serializedFooter, length, GetWriteOptions().GetCompression(),
363 RNTupleCompressor::MakeMemCopyWriter(bufFooterZip.get()));
364 WriteNTupleFooter(bufFooterZip.get(), szFooterZip, length);
365 WriteNTupleAnchor();
366}
367
368void ROOT::Experimental::Detail::RPageSinkDaos::WriteNTupleHeader(const void *data, size_t nbytes, size_t lenHeader)
369{
370 fDaosContainer->WriteSingleAkey(
371 data, nbytes, daos_obj_id_t{kOidLowMetadata, static_cast<decltype(daos_obj_id_t::hi)>(fNTupleIndex)},
372 kDistributionKeyDefault, kAttributeKeyHeader, kCidMetadata);
373 fNTupleAnchor.fLenHeader = lenHeader;
374 fNTupleAnchor.fNBytesHeader = nbytes;
375}
376
377void ROOT::Experimental::Detail::RPageSinkDaos::WriteNTupleFooter(const void *data, size_t nbytes, size_t lenFooter)
378{
379 fDaosContainer->WriteSingleAkey(
380 data, nbytes, daos_obj_id_t{kOidLowMetadata, static_cast<decltype(daos_obj_id_t::hi)>(fNTupleIndex)},
381 kDistributionKeyDefault, kAttributeKeyFooter, kCidMetadata);
382 fNTupleAnchor.fLenFooter = lenFooter;
383 fNTupleAnchor.fNBytesFooter = nbytes;
384}
385
387{
388 const auto ntplSize = RDaosNTupleAnchor::GetSize();
389 auto buffer = std::make_unique<unsigned char[]>(ntplSize);
390 fNTupleAnchor.Serialize(buffer.get());
391 fDaosContainer->WriteSingleAkey(
392 buffer.get(), ntplSize, daos_obj_id_t{kOidLowMetadata, static_cast<decltype(daos_obj_id_t::hi)>(fNTupleIndex)},
393 kDistributionKeyDefault, kAttributeKeyAnchor, kCidMetadata);
394}
395
398{
399 if (nElements == 0)
400 throw RException(R__FAIL("invalid call: request empty page"));
401 auto elementSize = columnHandle.fColumn->GetElement()->GetSize();
402 return fPageAllocator->NewPage(columnHandle.fId, elementSize, nElements);
403}
404
406{
407 fPageAllocator->DeletePage(page);
408}
409
410////////////////////////////////////////////////////////////////////////////////
411
413ROOT::Experimental::Detail::RPageAllocatorDaos::NewPage(ColumnId_t columnId, void *mem, std::size_t elementSize,
414 std::size_t nElements)
415{
416 RPage newPage(columnId, mem, elementSize, nElements);
417 newPage.GrowUnchecked(nElements);
418 return newPage;
419}
420
422{
423 if (page.IsNull())
424 return;
425 delete[] reinterpret_cast<unsigned char *>(page.GetBuffer());
426}
427
428////////////////////////////////////////////////////////////////////////////////
429
430ROOT::Experimental::Detail::RPageSourceDaos::RPageSourceDaos(std::string_view ntupleName, std::string_view uri,
431 const RNTupleReadOptions &options)
432 : RPageSource(ntupleName, options), fPageAllocator(std::make_unique<RPageAllocatorDaos>()),
433 fPagePool(std::make_shared<RPagePool>()), fURI(uri),
434 fClusterPool(std::make_unique<RClusterPool>(*this, options.GetClusterBunchSize()))
435{
436 fDecompressor = std::make_unique<RNTupleDecompressor>();
437 EnableDefaultMetrics("RPageSourceDaos");
438
439 auto args = ParseDaosURI(uri);
440 auto pool = std::make_shared<RDaosPool>(args.fPoolLabel);
441 fDaosContainer = std::make_unique<RDaosContainer>(pool, args.fContainerLabel);
442}
443
445
447{
449 std::unique_ptr<unsigned char[]> buffer, zipBuffer;
450
451 auto [locator, descBuilder] =
452 RDaosContainerNTupleLocator::LocateNTuple(*fDaosContainer, fNTupleName, *fDecompressor);
453 if (!locator.IsValid())
455 R__FAIL("Attach: requested ntuple '" + fNTupleName + "' is not present in DAOS container."));
456
457 auto oclass = RDaosObject::ObjClassId(locator.fAnchor->fObjClass);
458 if (oclass.IsUnknown())
459 throw ROOT::Experimental::RException(R__FAIL("Attach: unknown object class " + locator.fAnchor->fObjClass));
460
461 fDaosContainer->SetDefaultObjectClass(oclass);
462 fNTupleIndex = locator.GetIndex();
463
464 ntplDesc = descBuilder.MoveDescriptor();
465 daos_obj_id_t oidPageList{kOidLowPageList, static_cast<decltype(daos_obj_id_t::hi)>(fNTupleIndex)};
466
467 for (const auto &cgDesc : ntplDesc.GetClusterGroupIterable()) {
468 buffer = std::make_unique<unsigned char[]>(cgDesc.GetPageListLength());
469 zipBuffer = std::make_unique<unsigned char[]>(cgDesc.GetPageListLocator().fBytesOnStorage);
470 fDaosContainer->ReadSingleAkey(zipBuffer.get(), cgDesc.GetPageListLocator().fBytesOnStorage, oidPageList,
471 kDistributionKeyDefault, cgDesc.GetPageListLocator().GetPosition<std::uint64_t>(),
472 kCidMetadata);
473 fDecompressor->Unzip(zipBuffer.get(), cgDesc.GetPageListLocator().fBytesOnStorage, cgDesc.GetPageListLength(),
474 buffer.get());
475
476 auto clusters = RClusterGroupDescriptorBuilder::GetClusterSummaries(ntplDesc, cgDesc.GetId());
477 Internal::RNTupleSerializer::DeserializePageListV1(buffer.get(), cgDesc.GetPageListLength(), clusters);
478 for (std::size_t i = 0; i < clusters.size(); ++i) {
479 ntplDesc.AddClusterDetails(clusters[i].MoveDescriptor().Unwrap());
480 }
481 }
482
483 return ntplDesc;
484}
485
487{
488 return fDaosContainer->GetDefaultObjectClass().ToString();
489}
490
492 const RClusterIndex &clusterIndex,
493 RSealedPage &sealedPage)
494{
495 const auto clusterId = clusterIndex.GetClusterId();
496
498 {
499 auto descriptorGuard = GetSharedDescriptorGuard();
500 const auto &clusterDescriptor = descriptorGuard->GetClusterDescriptor(clusterId);
501 pageInfo = clusterDescriptor.GetPageRange(columnId).Find(clusterIndex.GetIndex());
502 }
503
504 const auto bytesOnStorage = pageInfo.fLocator.fBytesOnStorage;
505 sealedPage.fSize = bytesOnStorage;
506 sealedPage.fNElements = pageInfo.fNElements;
507 if (sealedPage.fBuffer) {
508 RDaosKey daosKey = GetPageDaosKey<kDefaultDaosMapping>(fNTupleIndex, clusterId, columnId,
509 pageInfo.fLocator.GetPosition<std::uint64_t>());
510 fDaosContainer->ReadSingleAkey(const_cast<void *>(sealedPage.fBuffer), bytesOnStorage, daosKey.fOid,
511 daosKey.fDkey, daosKey.fAkey);
512 }
513}
514
517 const RClusterInfo &clusterInfo,
518 ClusterSize_t::ValueType idxInCluster)
519{
520 const auto columnId = columnHandle.fId;
521 const auto clusterId = clusterInfo.fClusterId;
522 const auto &pageInfo = clusterInfo.fPageInfo;
523
524 const auto element = columnHandle.fColumn->GetElement();
525 const auto elementSize = element->GetSize();
526 const auto bytesOnStorage = pageInfo.fLocator.fBytesOnStorage;
527
528 const void *sealedPageBuffer = nullptr; // points either to directReadBuffer or to a read-only page in the cluster
529 std::unique_ptr<unsigned char[]> directReadBuffer; // only used if cluster pool is turned off
530
531 if (fOptions.GetClusterCache() == RNTupleReadOptions::EClusterCache::kOff) {
532 directReadBuffer = std::make_unique<unsigned char[]>(bytesOnStorage);
533 RDaosKey daosKey = GetPageDaosKey<kDefaultDaosMapping>(fNTupleIndex, clusterId, columnId,
534 pageInfo.fLocator.GetPosition<std::uint64_t>());
535 fDaosContainer->ReadSingleAkey(directReadBuffer.get(), bytesOnStorage, daosKey.fOid, daosKey.fDkey,
536 daosKey.fAkey);
537 fCounters->fNPageLoaded.Inc();
538 fCounters->fNRead.Inc();
539 fCounters->fSzReadPayload.Add(bytesOnStorage);
540 sealedPageBuffer = directReadBuffer.get();
541 } else {
542 if (!fCurrentCluster || (fCurrentCluster->GetId() != clusterId) || !fCurrentCluster->ContainsColumn(columnId))
543 fCurrentCluster = fClusterPool->GetCluster(clusterId, fActiveColumns);
544 R__ASSERT(fCurrentCluster->ContainsColumn(columnId));
545
546 auto cachedPage = fPagePool->GetPage(columnId, RClusterIndex(clusterId, idxInCluster));
547 if (!cachedPage.IsNull())
548 return cachedPage;
549
550 ROnDiskPage::Key key(columnId, pageInfo.fPageNo);
551 auto onDiskPage = fCurrentCluster->GetOnDiskPage(key);
552 R__ASSERT(onDiskPage && (bytesOnStorage == onDiskPage->GetSize()));
553 sealedPageBuffer = onDiskPage->GetAddress();
554 }
555
556 std::unique_ptr<unsigned char[]> pageBuffer;
557 {
558 RNTupleAtomicTimer timer(fCounters->fTimeWallUnzip, fCounters->fTimeCpuUnzip);
559 pageBuffer = UnsealPage({sealedPageBuffer, bytesOnStorage, pageInfo.fNElements}, *element);
560 fCounters->fSzUnzip.Add(elementSize * pageInfo.fNElements);
561 }
562
563 auto newPage = fPageAllocator->NewPage(columnId, pageBuffer.release(), elementSize, pageInfo.fNElements);
564 newPage.SetWindow(clusterInfo.fColumnOffset + pageInfo.fFirstInPage,
565 RPage::RClusterInfo(clusterId, clusterInfo.fColumnOffset));
566 fPagePool->RegisterPage(
567 newPage,
568 RPageDeleter([](const RPage &page, void * /*userData*/) { RPageAllocatorDaos::DeletePage(page); }, nullptr));
569 fCounters->fNPagePopulated.Inc();
570 return newPage;
571}
572
575{
576 const auto columnId = columnHandle.fId;
577 auto cachedPage = fPagePool->GetPage(columnId, globalIndex);
578 if (!cachedPage.IsNull())
579 return cachedPage;
580
581 std::uint64_t idxInCluster;
582 RClusterInfo clusterInfo;
583 {
584 auto descriptorGuard = GetSharedDescriptorGuard();
585 clusterInfo.fClusterId = descriptorGuard->FindClusterId(columnId, globalIndex);
587
588 const auto &clusterDescriptor = descriptorGuard->GetClusterDescriptor(clusterInfo.fClusterId);
589 clusterInfo.fColumnOffset = clusterDescriptor.GetColumnRange(columnId).fFirstElementIndex;
590 R__ASSERT(clusterInfo.fColumnOffset <= globalIndex);
591 idxInCluster = globalIndex - clusterInfo.fColumnOffset;
592 clusterInfo.fPageInfo = clusterDescriptor.GetPageRange(columnId).Find(idxInCluster);
593 }
594 return PopulatePageFromCluster(columnHandle, clusterInfo, idxInCluster);
595}
596
599 const RClusterIndex &clusterIndex)
600{
601 const auto clusterId = clusterIndex.GetClusterId();
602 const auto idxInCluster = clusterIndex.GetIndex();
603 const auto columnId = columnHandle.fId;
604 auto cachedPage = fPagePool->GetPage(columnId, clusterIndex);
605 if (!cachedPage.IsNull())
606 return cachedPage;
607
608 R__ASSERT(clusterId != kInvalidDescriptorId);
609 RClusterInfo clusterInfo;
610 {
611 auto descriptorGuard = GetSharedDescriptorGuard();
612 const auto &clusterDescriptor = descriptorGuard->GetClusterDescriptor(clusterId);
613 clusterInfo.fClusterId = clusterId;
614 clusterInfo.fColumnOffset = clusterDescriptor.GetColumnRange(columnId).fFirstElementIndex;
615 clusterInfo.fPageInfo = clusterDescriptor.GetPageRange(columnId).Find(idxInCluster);
616 }
617
618 return PopulatePageFromCluster(columnHandle, clusterInfo, idxInCluster);
619}
620
622{
623 fPagePool->ReturnPage(page);
624}
625
626std::unique_ptr<ROOT::Experimental::Detail::RPageSource> ROOT::Experimental::Detail::RPageSourceDaos::Clone() const
627{
628 auto clone = new RPageSourceDaos(fNTupleName, fURI, fOptions);
629 return std::unique_ptr<RPageSourceDaos>(clone);
630}
631
632std::vector<std::unique_ptr<ROOT::Experimental::Detail::RCluster>>
634{
635 std::vector<std::unique_ptr<ROOT::Experimental::Detail::RCluster>> result;
636
637 struct RDaosSealedPageLocator {
638 RDaosSealedPageLocator() = default;
639 RDaosSealedPageLocator(DescriptorId_t cl, DescriptorId_t co, NTupleSize_t p, std::uint64_t o, std::uint64_t s,
640 std::size_t b)
641 : fClusterId(cl), fColumnId(co), fPageNo(p), fObjectId(o), fSize(s), fBufPos(b)
642 {
643 }
644 DescriptorId_t fClusterId = 0;
645 DescriptorId_t fColumnId = 0;
646 NTupleSize_t fPageNo = 0;
647 std::uint64_t fObjectId = 0;
648 std::uint64_t fSize = 0;
649 std::size_t fBufPos = 0;
650 };
651
652 std::vector<unsigned char *> clusterBuffers(clusterKeys.size());
653 std::vector<std::unique_ptr<ROnDiskPageMapHeap>> pageMaps(clusterKeys.size());
655
656 std::size_t szPayload = 0;
657 unsigned nPages = 0;
658
659 for (unsigned i = 0; i < clusterKeys.size(); ++i) {
660 const auto &clusterKey = clusterKeys[i];
661 auto clusterId = clusterKey.fClusterId;
662 std::vector<RDaosSealedPageLocator> onDiskClusterPages;
663
664 unsigned clusterBufSz = 0;
665 fCounters->fNClusterLoaded.Inc();
666 {
667 auto descriptorGuard = GetSharedDescriptorGuard();
668 const auto &clusterDesc = descriptorGuard->GetClusterDescriptor(clusterId);
669
670 // Collect the necessary page meta-data and sum up the total size of the compressed and packed pages
671 for (auto columnId : clusterKey.fColumnSet) {
672 const auto &pageRange = clusterDesc.GetPageRange(columnId);
673 NTupleSize_t columnPageCount = 0;
674 for (const auto &pageInfo : pageRange.fPageInfos) {
675 const auto &pageLocator = pageInfo.fLocator;
676 onDiskClusterPages.push_back(RDaosSealedPageLocator(clusterId, columnId, columnPageCount,
677 pageLocator.GetPosition<std::uint64_t>(),
678 pageLocator.fBytesOnStorage, clusterBufSz));
679 ++columnPageCount;
680 clusterBufSz += pageLocator.fBytesOnStorage;
681 }
682 nPages += columnPageCount;
683 }
684 }
685 szPayload += clusterBufSz;
686
687 clusterBuffers[i] = new unsigned char[clusterBufSz];
688 pageMaps[i] = std::make_unique<ROnDiskPageMapHeap>(std::unique_ptr<unsigned char[]>(clusterBuffers[i]));
689
690 // Fill the cluster page maps and the input dictionary for the RDaosContainer::ReadV() call
691 for (const auto &s : onDiskClusterPages) {
692 // Register the on disk pages in a page map
693 ROnDiskPage::Key key(s.fColumnId, s.fPageNo);
694 pageMaps[i]->Register(key, ROnDiskPage(clusterBuffers[i] + s.fBufPos, s.fSize));
695
696 // Prepare new read request batched up by object ID and distribution key
697 d_iov_t iov;
698 d_iov_set(&iov, clusterBuffers[i] + s.fBufPos, s.fSize);
699
700 RDaosKey daosKey = GetPageDaosKey<kDefaultDaosMapping>(fNTupleIndex, s.fClusterId, s.fColumnId, s.fObjectId);
701 auto odPair = RDaosContainer::ROidDkeyPair{daosKey.fOid, daosKey.fDkey};
702 auto [it, ret] = readRequests.emplace(odPair, RDaosContainer::RWOperation(odPair));
703 it->second.insert(daosKey.fAkey, iov);
704 }
705 }
706 fCounters->fNPageLoaded.Add(nPages);
707 fCounters->fSzReadPayload.Add(szPayload);
708
709 {
710 RNTupleAtomicTimer timer(fCounters->fTimeWallRead, fCounters->fTimeCpuRead);
711 if (int err = fDaosContainer->ReadV(readRequests))
712 throw ROOT::Experimental::RException(R__FAIL("ReadV: error" + std::string(d_errstr(err))));
713 }
714 fCounters->fNReadV.Inc();
715 fCounters->fNRead.Add(nPages);
716
717 // Assign each cluster its page map
718 for (unsigned i = 0; i < clusterKeys.size(); ++i) {
719 auto cluster = std::make_unique<RCluster>(clusterKeys[i].fClusterId);
720 cluster->Adopt(std::move(pageMaps[i]));
721 for (auto colId : clusterKeys[i].fColumnSet)
722 cluster->SetColumnAvailable(colId);
723
724 result.emplace_back(std::move(cluster));
725 }
726 return result;
727}
728
730{
731 RNTupleAtomicTimer timer(fCounters->fTimeWallUnzip, fCounters->fTimeCpuUnzip);
732 fTaskScheduler->Reset();
733
734 const auto clusterId = cluster->GetId();
735 auto descriptorGuard = GetSharedDescriptorGuard();
736 const auto &clusterDescriptor = descriptorGuard->GetClusterDescriptor(clusterId);
737
738 std::vector<std::unique_ptr<RColumnElementBase>> allElements;
739
740 const auto &columnsInCluster = cluster->GetAvailColumns();
741 for (const auto columnId : columnsInCluster) {
742 const auto &columnDesc = descriptorGuard->GetColumnDescriptor(columnId);
743
744 allElements.emplace_back(RColumnElementBase::Generate(columnDesc.GetModel().GetType()));
745
746 const auto &pageRange = clusterDescriptor.GetPageRange(columnId);
747 std::uint64_t pageNo = 0;
748 std::uint64_t firstInPage = 0;
749 for (const auto &pi : pageRange.fPageInfos) {
750 ROnDiskPage::Key key(columnId, pageNo);
751 auto onDiskPage = cluster->GetOnDiskPage(key);
752 R__ASSERT(onDiskPage && (onDiskPage->GetSize() == pi.fLocator.fBytesOnStorage));
753
754 auto taskFunc = [this, columnId, clusterId, firstInPage, onDiskPage, element = allElements.back().get(),
755 nElements = pi.fNElements,
756 indexOffset = clusterDescriptor.GetColumnRange(columnId).fFirstElementIndex]() {
757 auto pageBuffer = UnsealPage({onDiskPage->GetAddress(), onDiskPage->GetSize(), nElements}, *element);
758 fCounters->fSzUnzip.Add(element->GetSize() * nElements);
759
760 auto newPage = fPageAllocator->NewPage(columnId, pageBuffer.release(), element->GetSize(), nElements);
761 newPage.SetWindow(indexOffset + firstInPage, RPage::RClusterInfo(clusterId, indexOffset));
762 fPagePool->PreloadPage(
763 newPage,
764 RPageDeleter([](const RPage &page, void * /*userData*/) { RPageAllocatorDaos::DeletePage(page); },
765 nullptr));
766 };
767
768 fTaskScheduler->AddTask(taskFunc);
769
770 firstInPage += pi.fNElements;
771 pageNo++;
772 } // for all pages in column
773 } // for all columns in cluster
774
775 fCounters->fNPagePopulated.Add(cluster->GetNOnDiskPages());
776
777 fTaskScheduler->Wait();
778}
size_t fSize
#define R__FORWARD_ERROR(res)
Short-hand to return an RResult<T> in an error state (i.e. after checking)
Definition RError.hxx:307
#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:303
#define R__LOG_WARNING(...)
Definition RLogger.hxx:363
#define b(i)
Definition RSha256.hxx:100
#define c(i)
Definition RSha256.hxx:101
#define R__ASSERT(e)
Definition TError.h:117
winID h TVirtualViewer3D TVirtualGLPainter p
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 r
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
#define _(A, B)
Definition cfortran.h:108
Managed a set of clusters containing compressed and packed pages.
An in-memory subset of the packed and compressed pages of a cluster.
Definition RCluster.hxx:154
const ColumnSet_t & GetAvailColumns() const
Definition RCluster.hxx:198
const ROnDiskPage * GetOnDiskPage(const ROnDiskPage::Key &key) const
Definition RCluster.cxx:37
static std::unique_ptr< RColumnElementBase > Generate(EColumnType type)
RColumnElementBase * GetElement() const
Definition RColumn.hxx:308
A RDaosContainer provides read/write access to objects in a given container.
Definition RDaos.hxx:149
std::unordered_map< ROidDkeyPair, RWOperation, ROidDkeyPair::Hash > MultiObjectRWOperation_t
Definition RDaos.hxx:199
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:209
RDaosObject::DistributionKey_t DistributionKey_t
Definition RDaos.hxx:152
RDaosObject::AttributeKey_t AttributeKey_t
Definition RDaos.hxx:153
static Writer_t MakeMemCopyWriter(unsigned char *dest)
Helper class to uncompress data blocks in the ROOT compression frame format.
void Unzip(const void *from, size_t nbytes, size_t dataLen, void *to)
The nbytes parameter provides the size ls of the from buffer.
Record wall time and CPU time between construction and destruction.
A page as being stored on disk, that is packed and compressed.
Definition RCluster.hxx:43
Manages pages read from a DAOS container.
static RPage NewPage(ColumnId_t columnId, void *mem, std::size_t elementSize, std::size_t nElements)
Uses standard C++ memory allocation for the column data pages.
A closure that can free the memory associated with a mapped page.
A thread-safe cache of column pages.
Definition RPagePool.hxx:47
void ReleasePage(RPage &page) final
Every page store needs to be able to free pages it handed out.
RPageSinkDaos(std::string_view ntupleName, std::string_view uri, const RNTupleWriteOptions &options)
RNTupleLocator CommitSealedPageImpl(DescriptorId_t columnId, const RPageStorage::RSealedPage &sealedPage) final
void WriteNTupleFooter(const void *data, size_t nbytes, size_t lenFooter)
void WriteNTupleHeader(const void *data, size_t nbytes, size_t lenHeader)
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...
std::uint64_t CommitClusterImpl(NTupleSize_t nEntries) final
Returns the number of bytes written to storage (excluding metadata)
void CommitDatasetImpl(unsigned char *serializedFooter, std::uint32_t length) final
RNTupleLocator CommitPageImpl(ColumnHandle_t columnHandle, const RPage &page) final
void CreateImpl(const RNTupleModel &model, unsigned char *serializedHeader, std::uint32_t length) final
std::vector< RNTupleLocator > CommitSealedPageVImpl(std::span< RPageStorage::RSealedPageGroup > ranges) final
Vector commit of preprocessed pages.
RPage ReservePage(ColumnHandle_t columnHandle, std::size_t nElements) final
Get a new, empty page for the given column that can be filled with up to nElements.
Abstract interface to write data into an ntuple.
void EnableDefaultMetrics(const std::string &prefix)
Enables the default set of metrics provided by RPageSink.
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::unique_ptr< RDaosContainer > fDaosContainer
A container that stores object data (header/footer, pages, etc.)
void LoadSealedPage(DescriptorId_t columnId, const RClusterIndex &clusterIndex, RSealedPage &sealedPage) final
Read the packed and compressed bytes of a page into the memory buffer provided by selaedPage.
RPageSourceDaos(std::string_view ntupleName, std::string_view uri, const RNTupleReadOptions &options)
void ReleasePage(RPage &page) final
Every page store needs to be able to free pages it handed out.
void UnzipClusterImpl(RCluster *cluster) final
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...
RPage PopulatePage(ColumnHandle_t columnHandle, NTupleSize_t globalIndex) final
Allocates and fills a page that contains the index-th element.
RPage PopulatePageFromCluster(ColumnHandle_t columnHandle, const RClusterInfo &clusterInfo, ClusterSize_t::ValueType idxInCluster)
std::string GetObjectClass() const
Return the object class used for user data OIDs in this ntuple.
std::unique_ptr< RPageSource > Clone() 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.
std::unique_ptr< RNTupleDecompressor > fDecompressor
Helper to unzip pages and header/footer; comprises a 16MB (kMAXZIPBUF) unzip buffer.
Stores information about the cluster in which this page resides.
Definition RPage.hxx:46
A page is a slice of a column that is mapped into memory.
Definition RPage.hxx:41
ClusterSize_t::ValueType GetNBytes() const
The space taken by column elements in the buffer.
Definition RPage.hxx:81
void * GrowUnchecked(ClusterSize_t::ValueType nElements)
Called during writing: returns a pointer after the last element and increases the element counter in ...
Definition RPage.hxx:109
A helper class for serializing and deserialization of the RNTuple binary format.
static RResult< void > DeserializePageListV1(const void *buffer, std::uint32_t bufSize, std::vector< RClusterDescriptorBuilder > &clusters)
static RResult< void > DeserializeFooterV1(const void *buffer, std::uint32_t bufSize, RNTupleDescriptorBuilder &descBuilder)
static RResult< void > DeserializeHeaderV1(const void *buffer, std::uint32_t bufSize, RNTupleDescriptorBuilder &descBuilder)
static std::vector< RClusterDescriptorBuilder > GetClusterSummaries(const RNTupleDescriptor &ntplDesc, DescriptorId_t clusterGroupId)
Used to prepare the cluster descriptor builders when loading the page locations for a certain cluster...
Addresses a column element or field item relative to a particular cluster, instead of a global NTuple...
DescriptorId_t GetClusterId() const
ClusterSize_t::ValueType GetIndex() const
Base class for all ROOT issued exceptions.
Definition RError.hxx:78
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.
The on-storage meta-data of an ntuple.
RClusterGroupDescriptorIterable GetClusterGroupIterable() const
RResult< void > AddClusterDetails(RClusterDescriptor &&clusterDesc)
Methods to load and drop cluster details.
The RNTupleModel encapulates the schema of an ntuple.
Common user-tunable settings for reading ntuples.
DAOS-specific user-tunable settings for storing ntuples.
Common user-tunable settings for storing ntuples.
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:207
@ OC_SX
Definition daos.h:129
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
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.
std::int64_t ColumnId_t
Uniquely identifies a physical column within the scope of the current process, used to tag pages.
constexpr DescriptorId_t kInvalidDescriptorId
Helper structure concentrating the functionality required to locate an ntuple within a DAOS container...
int InitNTupleDescriptorBuilder(RDaosContainer &cont, RNTupleDecompressor &decompressor, RNTupleDescriptorBuilder &builder)
static std::pair< RDaosContainerNTupleLocator, RNTupleDescriptorBuilder > LocateNTuple(RDaosContainer &cont, const std::string &ntupleName, RNTupleDecompressor &decompressor)
A pair of <object ID, distribution key> that can be used to issue a fetch/update request for multiple...
Definition RDaos.hxx:158
Describes a read/write operation on multiple objects; see the ReadV/WriteV functions.
Definition RDaos.hxx:181
Entry point for an RNTuple in a DAOS container.
std::uint32_t fNBytesFooter
The size of the compressed ntuple footer.
std::uint32_t fNBytesHeader
The size of the compressed ntuple header.
std::string fObjClass
The object class for user data OIDs, e.g. SX
std::uint32_t fVersion
Allows for evolving the struct in future versions.
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 Serialize(void *buffer) const
std::uint32_t fLenFooter
The size of the uncompressed ntuple footer.
Wrap around a daos_oclass_id_t.
Definition RDaos.hxx:95
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:53
Summarizes cluster-level information that are necessary to populate a certain page.
RClusterDescriptor::RPageRange::RPageInfoExtended fPageInfo
Location of the page on disk.
std::uint64_t fColumnOffset
The first element number of the page's column in the given cluster.
A range of sealed pages referring to the same column that can be used for vector commit.
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...
RNTupleLocator fLocator
The meaning of fLocator depends on the storage backend.
ClusterSize_t fNElements
The sum of the elements of all the pages must match the corresponding fNElements field in fColumnRang...
Generic information about the physical location of data.
std::variant< std::uint64_t, std::string, RNTupleLocatorObject64 > fPosition
Simple on-disk locators consisting of a 64-bit offset use variant type uint64_t; extended locators ha...
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