16#ifndef ROOT7_RPageStorageDaos
17#define ROOT7_RPageStorageDaos
33namespace Experimental {
38class RPageAllocatorHeap;
78 std::uint32_t
Serialize(
void *buffer)
const;
99 std::optional<ROOT::Experimental::Detail::RDaosNTupleAnchor>
fAnchor;
110 std::size_t
h = std::hash<std::string>{}(ntupleName);
112 auto seed =
static_cast<uint32_t
>(
h >> 32);
113 seed ^=
static_cast<uint32_t
>(
h & 0xffffffff) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
121 static std::pair<RDaosContainerNTupleLocator, RNTupleDescriptorBuilder>
160 std::vector<RNTupleLocator>
CommitSealedPageVImpl(std::span<RPageStorage::RSealedPageGroup> ranges)
final;
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 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
An in-memory subset of the packed and compressed pages of a cluster.
A RDaosContainer provides read/write access to objects in a given container.
Helper class to uncompress data blocks in the ROOT compression frame format.
Manages pages read from a DAOS container.
static RPage NewPage(ColumnId_t columnId, void *mem, std::size_t elementSize, std::size_t nElements)
static void DeletePage(const RPage &page)
Storage provider that writes ntuple pages to into a DAOS container.
void ReleasePage(RPage &page) final
Every page store needs to be able to free pages it handed out.
RNTupleLocator CommitSealedPageImpl(DescriptorId_t columnId, const RPageStorage::RSealedPage &sealedPage) final
std::uint64_t fNBytesCurrentCluster
Tracks the number of bytes committed to the current cluster.
void WriteNTupleFooter(const void *data, size_t nbytes, size_t lenFooter)
void WriteNTupleHeader(const void *data, size_t nbytes, size_t lenHeader)
std::string fURI
A URI to a DAOS pool of the form 'daos://pool-label/container-label'.
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...
RDaosNTupleAnchor fNTupleAnchor
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
std::atomic< std::uint64_t > fClusterGroupId
Cluster group counter for the next committed cluster pagelist; incremented in CommitClusterGroupImpl(...
~RPageSinkDaos() override
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.
std::atomic< std::uint64_t > fPageId
Page identifier for the next committed page; it is automatically incremented in CommitSealedPageImpl(...
std::unique_ptr< RDaosContainer > fDaosContainer
Underlying DAOS container.
std::unique_ptr< RPageAllocatorHeap > fPageAllocator
ntuple_index_t fNTupleIndex
Abstract interface to write data into an ntuple.
Storage provider that reads ntuple pages from a DAOS container.
ntuple_index_t fNTupleIndex
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.
RNTupleDescriptorBuilder fDescriptorBuilder
void ReleasePage(RPage &page) final
Every page store needs to be able to free pages it handed out.
std::string fURI
A URI to a DAOS pool of the form 'daos://pool-label/container-label'.
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)
RCluster * fCurrentCluster
The last cluster from which a page got populated. Points into fClusterPool->fPool.
std::string GetObjectClass() const
Return the object class used for user data OIDs in this ntuple.
RNTupleDescriptor AttachImpl() final
std::shared_ptr< RPagePool > fPagePool
The page pool might, at some point, be used by multiple page sources.
std::unique_ptr< RPageAllocatorDaos > fPageAllocator
Populated pages might be shared; the memory buffer is managed by the RPageAllocatorDaos.
std::unique_ptr< RClusterPool > fClusterPool
The cluster pool asynchronously preloads the next few clusters.
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.
RColumnHandle ColumnHandle_t
The column handle identifies a column with the current open page storage.
A page is a slice of a column that is mapped into memory.
Addresses a column element or field item relative to a particular cluster, instead of a global NTuple...
A helper class for piece-wise construction of an RNTupleDescriptor.
The on-storage meta-data of an ntuple.
The RNTupleModel encapulates the schema of an ntuple.
Common user-tunable settings for reading 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...
std::uint32_t ntuple_index_t
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.
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.
Helper structure concentrating the functionality required to locate an ntuple within a DAOS container...
RDaosContainerNTupleLocator()=default
std::optional< ROOT::Experimental::Detail::RDaosNTupleAnchor > fAnchor
ntuple_index_t GetIndex() const
static ntuple_index_t Hash(const std::string &ntupleName)
RDaosContainerNTupleLocator(const std::string &ntupleName)
int InitNTupleDescriptorBuilder(RDaosContainer &cont, RNTupleDecompressor &decompressor, RNTupleDescriptorBuilder &builder)
static const ntuple_index_t kReservedIndex
static std::pair< RDaosContainerNTupleLocator, RNTupleDescriptorBuilder > LocateNTuple(RDaosContainer &cont, const std::string &ntupleName, RNTupleDecompressor &decompressor)
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.
static std::uint32_t GetSize()
std::uint32_t Serialize(void *buffer) const
bool operator==(const RDaosNTupleAnchor &other) const
std::uint32_t fLenFooter
The size of the uncompressed ntuple footer.
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.
DescriptorId_t fClusterId
A sealed page contains the bytes of a page as written to storage (packed & compressed).
Generic information about the physical location of data.