Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RPageStorageS3.hxx
Go to the documentation of this file.
1/// \file ROOT/RPageStorageS3.hxx
2/// \author Jas Mehta <jasmehta805@gmail.com>
3/// \date 2026-06-01
4
5/*************************************************************************
6 * Copyright (C) 1995-2026, Rene Brun and Fons Rademakers. *
7 * All rights reserved. *
8 * *
9 * For the licensing terms see $ROOTSYS/LICENSE. *
10 * For the list of contributors see $ROOTSYS/README/CREDITS. *
11 *************************************************************************/
12
13#ifndef ROOT_RPageStorageS3
14#define ROOT_RPageStorageS3
15
16#include <ROOT/RError.hxx>
17#include <ROOT/RNTuple.hxx>
18
19#include <cstdint>
20#include <string>
21
22namespace ROOT {
23namespace Experimental {
24namespace Internal {
25
26// clang-format off
27/**
28\class ROOT::Experimental::Internal::RNTupleAnchorS3
29\ingroup NTuple
30\brief Entry point for an RNTuple stored in S3-compatible object storage.
31
32The anchor is serialized as a JSON object and stored at the base URL of the ntuple.
33It contains the information needed to locate and read the header and footer envelopes.
34The anchor is always the last object written during CommitDatasetImpl, ensuring atomicity:
35if the anchor exists, the entire ntuple is complete.
36*/
37// clang-format on
39 /// Allows evolving the anchor JSON schema in future versions
40 std::uint32_t fVersionAnchor = 0;
41 /// Version of the RNTuple binary format supported by the writer
46 /// Pattern for resolving object IDs to full S3 URLs.
47 /// ${baseurl} is replaced with the anchor URL, ${objid} with the numeric object ID.
48 std::string fUrlTemplate;
49 /// Object ID and byte offset of the compressed header within the S3 object
50 std::uint64_t fHeaderObjId = 0;
51 std::uint64_t fHeaderOffset = 0;
52 /// Compressed and uncompressed sizes of the header envelope
53 std::uint64_t fNBytesHeader = 0;
54 std::uint64_t fLenHeader = 0;
55 /// Object ID and byte offset of the compressed footer within the S3 object
56 std::uint64_t fFooterObjId = 0;
57 std::uint64_t fFooterOffset = 0;
58 /// Compressed and uncompressed sizes of the footer envelope
59 std::uint64_t fNBytesFooter = 0;
60 std::uint64_t fLenFooter = 0;
61
62 bool operator==(const RNTupleAnchorS3 &other) const;
63
64 /// Serialize the anchor to a JSON string suitable for storage at the base URL
65 std::string ToJSON() const;
66 /// Deserialize the anchor from a JSON string. Returns an error on malformed or incompatible input.
67 static RResult<RNTupleAnchorS3> CreateFromJSON(const std::string &json);
68};
69
70} // namespace Internal
71} // namespace Experimental
72} // namespace ROOT
73
74#endif
nlohmann::json json
static constexpr std::uint16_t kVersionPatch
Definition RNTuple.hxx:81
static constexpr std::uint16_t kVersionMajor
Definition RNTuple.hxx:79
static constexpr std::uint16_t kVersionEpoch
Definition RNTuple.hxx:78
static constexpr std::uint16_t kVersionMinor
Definition RNTuple.hxx:80
Entry point for an RNTuple stored in S3-compatible object storage.
bool operator==(const RNTupleAnchorS3 &other) const
Field-by-field equality check across all 14 anchor members.
std::uint64_t fHeaderObjId
Object ID and byte offset of the compressed header within the S3 object.
std::string fUrlTemplate
Pattern for resolving object IDs to full S3 URLs.
std::uint32_t fVersionAnchor
Allows evolving the anchor JSON schema in future versions.
std::uint16_t fVersionEpoch
Version of the RNTuple binary format supported by the writer.
std::uint64_t fNBytesHeader
Compressed and uncompressed sizes of the header envelope.
std::string ToJSON() const
Serialize the anchor to a JSON string suitable for storage at the base URL.
std::uint64_t fNBytesFooter
Compressed and uncompressed sizes of the footer envelope.
static RResult< RNTupleAnchorS3 > CreateFromJSON(const std::string &json)
Deserialize the anchor from a JSON string. Returns an error on malformed or incompatible input.
std::uint64_t fFooterObjId
Object ID and byte offset of the compressed footer within the S3 object.