Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Experimental::Detail::RPageSourceDaos Class Reference

Storage provider that reads ntuple pages from a DAOS container.

Definition at line 152 of file RPageStorageDaos.hxx.

Public Member Functions

 RPageSourceDaos (std::string_view ntupleName, std::string_view uri, const RNTupleReadOptions &options)
 
virtual ~RPageSourceDaos ()
 
std::unique_ptr< RPageSourceClone () const final
 The cloned page source creates a new connection to the pool/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 contain any pages.
 
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.
 
RPage PopulatePage (ColumnHandle_t columnHandle, const RClusterIndex &clusterIndex) final
 Another version of PopulatePage that allows to specify cluster-relative indexes.
 
RPage PopulatePage (ColumnHandle_t columnHandle, NTupleSize_t globalIndex) final
 Allocates and fills a page that contains the index-th element.
 
void ReleasePage (RPage &page) final
 Every page store needs to be able to free pages it handed out.
 
- Public Member Functions inherited from ROOT::Experimental::Detail::RPageSource
 RPageSource (const RPageSource &)=delete
 
 RPageSource (RPageSource &&)=default
 
 RPageSource (std::string_view ntupleName, const RNTupleReadOptions &fOptions)
 
virtual ~RPageSource ()
 
ColumnHandle_t AddColumn (DescriptorId_t fieldId, const RColumn &column) override
 Register a new column.
 
void Attach ()
 Open the physical storage container for the tree.
 
void DropColumn (ColumnHandle_t columnHandle) override
 Unregisters a column.
 
ColumnId_t GetColumnId (ColumnHandle_t columnHandle)
 
const RNTupleDescriptorGetDescriptor () const
 
virtual RNTupleMetricsGetMetrics () override
 Returns the default metrics object. Subclasses might alternatively override the method and provide their own metrics object.
 
NTupleSize_t GetNElements (ColumnHandle_t columnHandle)
 
NTupleSize_t GetNEntries ()
 
const RNTupleReadOptionsGetReadOptions () const
 
EPageStorageType GetType () final
 Whether the concrete implementation is a sink or a source.
 
RPageSourceoperator= (const RPageSource &)=delete
 
RPageSourceoperator= (RPageSource &&)=default
 
void UnzipCluster (RCluster *cluster)
 Parallel decompression and unpacking of the pages in the given cluster.
 
- Public Member Functions inherited from ROOT::Experimental::Detail::RPageStorage
 RPageStorage (const RPageStorage &other)=delete
 
 RPageStorage (RPageStorage &&other)=default
 
 RPageStorage (std::string_view name)
 
virtual ~RPageStorage ()
 
const std::string & GetNTupleName () const
 Returns the NTuple name.
 
RPageStorageoperator= (const RPageStorage &other)=delete
 
RPageStorageoperator= (RPageStorage &&other)=default
 
void SetTaskScheduler (RTaskScheduler *taskScheduler)
 

Protected Member Functions

RNTupleDescriptor AttachImpl () final
 
void UnzipClusterImpl (RCluster *cluster) final
 
- Protected Member Functions inherited from ROOT::Experimental::Detail::RPageSource
void EnableDefaultMetrics (const std::string &prefix)
 Enables the default set of metrics provided by RPageSource.
 
std::unique_ptr< unsigned char[]> UnsealPage (const RSealedPage &sealedPage, const RColumnElementBase &element)
 Helper for unstreaming a page.
 

Private Member Functions

RPage PopulatePageFromCluster (ColumnHandle_t columnHandle, const RClusterDescriptor &clusterDescriptor, ClusterSize_t::ValueType idxInCluster)
 

Private Attributes

std::unique_ptr< RClusterPoolfClusterPool
 The cluster pool asynchronously preloads the next few clusters.
 
RClusterfCurrentCluster = nullptr
 The last cluster from which a page got populated. Points into fClusterPool->fPool.
 
std::unique_ptr< RDaosContainerfDaosContainer
 A container that stores object data (header/footer, pages, etc.)
 
std::unique_ptr< RPageAllocatorDaosfPageAllocator
 Populated pages might be shared; the memory buffer is managed by the RPageAllocatorDaos.
 
std::shared_ptr< RPagePoolfPagePool
 The page pool might, at some point, be used by multiple page sources.
 
std::string fURI
 A URI to a DAOS pool of the form 'daos://pool-uuid:svc_replicas/container-uuid'.
 

Additional Inherited Members

- Public Types inherited from ROOT::Experimental::Detail::RPageStorage
using ColumnHandle_t = RColumnHandle
 The column handle identifies a column with the current open page storage.
 
- Static Public Member Functions inherited from ROOT::Experimental::Detail::RPageSource
static std::unique_ptr< RPageSourceCreate (std::string_view ntupleName, std::string_view location, const RNTupleReadOptions &options=RNTupleReadOptions())
 Guess the concrete derived page source from the file name (location)
 
- Protected Attributes inherited from ROOT::Experimental::Detail::RPageSource
RCluster::ColumnSet_t fActiveColumns
 The active columns are implicitly defined by the model fields or views.
 
std::unique_ptr< RCountersfCounters
 
std::unique_ptr< RNTupleDecompressorfDecompressor
 Helper to unzip pages and header/footer; comprises a 16MB (kMAXZIPBUF) unzip buffer.
 
RNTupleDescriptor fDescriptor
 
RNTupleMetrics fMetrics
 Wraps the I/O counters and is observed by the RNTupleReader metrics.
 
RNTupleReadOptions fOptions
 
- Protected Attributes inherited from ROOT::Experimental::Detail::RPageStorage
std::string fNTupleName
 
RTaskSchedulerfTaskScheduler = nullptr
 

#include <ROOT/RPageStorageDaos.hxx>

Inheritance diagram for ROOT::Experimental::Detail::RPageSourceDaos:
[legend]

Constructor & Destructor Documentation

◆ RPageSourceDaos()

ROOT::Experimental::Detail::RPageSourceDaos::RPageSourceDaos ( std::string_view  ntupleName,
std::string_view  uri,
const RNTupleReadOptions options 
)

Definition at line 318 of file RPageStorageDaos.cxx.

◆ ~RPageSourceDaos()

ROOT::Experimental::Detail::RPageSourceDaos::~RPageSourceDaos ( )
virtualdefault

Member Function Documentation

◆ AttachImpl()

ROOT::Experimental::RNTupleDescriptor ROOT::Experimental::Detail::RPageSourceDaos::AttachImpl ( )
finalprotectedvirtual

Implements ROOT::Experimental::Detail::RPageSource.

Definition at line 338 of file RPageStorageDaos.cxx.

◆ Clone()

std::unique_ptr< ROOT::Experimental::Detail::RPageSource > ROOT::Experimental::Detail::RPageSourceDaos::Clone ( ) const
finalvirtual

The cloned page source creates a new connection to the pool/container.

The meta-data (header and footer) is reread and parsed by the clone.

Implements ROOT::Experimental::Detail::RPageSource.

Definition at line 509 of file RPageStorageDaos.cxx.

◆ GetObjectClass()

std::string ROOT::Experimental::Detail::RPageSourceDaos::GetObjectClass ( ) const

Return the object class used for user data OIDs in this ntuple.

Definition at line 389 of file RPageStorageDaos.cxx.

◆ LoadClusters()

std::vector< std::unique_ptr< ROOT::Experimental::Detail::RCluster > > ROOT::Experimental::Detail::RPageSourceDaos::LoadClusters ( std::span< RCluster::RKey clusterKeys)
finalvirtual

Populates all the pages of the given cluster ids and columns; it is possible that some columns do not contain any pages.

The page source may load more columns than the minimal necessary set from columns. To indicate which columns have been loaded, LoadClusters() must mark them with SetColumnAvailable(). That includes the ones from the columns that don't have pages; otherwise subsequent requests for the cluster would assume an incomplete cluster and trigger loading again. LoadClusters() is typically called from the I/O thread of a cluster pool, i.e. the method runs concurrently to other methods of the page source.

Implements ROOT::Experimental::Detail::RPageSource.

Definition at line 516 of file RPageStorageDaos.cxx.

◆ LoadSealedPage()

void ROOT::Experimental::Detail::RPageSourceDaos::LoadSealedPage ( DescriptorId_t  columnId,
const RClusterIndex clusterIndex,
RSealedPage sealedPage 
)
finalvirtual

Read the packed and compressed bytes of a page into the memory buffer provided by selaedPage.

The sealed page can be used subsequently in a call to RPageSink::CommitSealedPage. The fSize and fNElements member of the sealedPage parameters are always set. If sealedPage.fBuffer is nullptr, no data will be copied but the returned size information can be used by the caller to allocate a large enough buffer and call LoadSealedPage again.

Implements ROOT::Experimental::Detail::RPageSource.

Definition at line 395 of file RPageStorageDaos.cxx.

◆ PopulatePage() [1/2]

ROOT::Experimental::Detail::RPage ROOT::Experimental::Detail::RPageSourceDaos::PopulatePage ( ColumnHandle_t  columnHandle,
const RClusterIndex clusterIndex 
)
finalvirtual

Another version of PopulatePage that allows to specify cluster-relative indexes.

Implements ROOT::Experimental::Detail::RPageSource.

Definition at line 489 of file RPageStorageDaos.cxx.

◆ PopulatePage() [2/2]

ROOT::Experimental::Detail::RPage ROOT::Experimental::Detail::RPageSourceDaos::PopulatePage ( ColumnHandle_t  columnHandle,
NTupleSize_t  globalIndex 
)
finalvirtual

Allocates and fills a page that contains the index-th element.

Implements ROOT::Experimental::Detail::RPageSource.

Definition at line 472 of file RPageStorageDaos.cxx.

◆ PopulatePageFromCluster()

ROOT::Experimental::Detail::RPage ROOT::Experimental::Detail::RPageSourceDaos::PopulatePageFromCluster ( ColumnHandle_t  columnHandle,
const RClusterDescriptor clusterDescriptor,
ClusterSize_t::ValueType  idxInCluster 
)
private

Definition at line 413 of file RPageStorageDaos.cxx.

◆ ReleasePage()

void ROOT::Experimental::Detail::RPageSourceDaos::ReleasePage ( RPage page)
finalvirtual

Every page store needs to be able to free pages it handed out.

But Sinks and sources have different means of allocating pages.

Implements ROOT::Experimental::Detail::RPageStorage.

Definition at line 504 of file RPageStorageDaos.cxx.

◆ UnzipClusterImpl()

void ROOT::Experimental::Detail::RPageSourceDaos::UnzipClusterImpl ( RCluster cluster)
finalprotectedvirtual

Reimplemented from ROOT::Experimental::Detail::RPageSource.

Definition at line 588 of file RPageStorageDaos.cxx.

Member Data Documentation

◆ fClusterPool

std::unique_ptr<RClusterPool> ROOT::Experimental::Detail::RPageSourceDaos::fClusterPool
private

The cluster pool asynchronously preloads the next few clusters.

Definition at line 166 of file RPageStorageDaos.hxx.

◆ fCurrentCluster

RCluster* ROOT::Experimental::Detail::RPageSourceDaos::fCurrentCluster = nullptr
private

The last cluster from which a page got populated. Points into fClusterPool->fPool.

Definition at line 160 of file RPageStorageDaos.hxx.

◆ fDaosContainer

std::unique_ptr<RDaosContainer> ROOT::Experimental::Detail::RPageSourceDaos::fDaosContainer
private

A container that stores object data (header/footer, pages, etc.)

Definition at line 162 of file RPageStorageDaos.hxx.

◆ fPageAllocator

std::unique_ptr<RPageAllocatorDaos> ROOT::Experimental::Detail::RPageSourceDaos::fPageAllocator
private

Populated pages might be shared; the memory buffer is managed by the RPageAllocatorDaos.

Definition at line 155 of file RPageStorageDaos.hxx.

◆ fPagePool

std::shared_ptr<RPagePool> ROOT::Experimental::Detail::RPageSourceDaos::fPagePool
private

The page pool might, at some point, be used by multiple page sources.

Definition at line 158 of file RPageStorageDaos.hxx.

◆ fURI

std::string ROOT::Experimental::Detail::RPageSourceDaos::fURI
private

A URI to a DAOS pool of the form 'daos://pool-uuid:svc_replicas/container-uuid'.

Definition at line 164 of file RPageStorageDaos.hxx.

  • tree/ntuple/v7/inc/ROOT/RPageStorageDaos.hxx
  • tree/ntuple/v7/src/RPageStorageDaos.cxx