FSspec Provider
Implementation of the data provider layer for fsspec supported (remote) filesystems.
This implementation only supports the old uncompressed (means ZIP) format. Thus, Zstandard related features are not implemented, including the dictionary provider.
Since the purpose of this library is to migrate from the old format to the new one, creating new job/data entries with this provider is not allowed nor implemented. Thus, this implementation only supports the read-only mode.
Classes:
Name | Description |
---|---|
- RootDataEntry |
fsspec data entry implementation |
- RootJobEntry |
fsspec job entry implementation |
- RootDataProvider |
fsspec data provider implementation |
Notes
- classes are prefixed with
Root
because these are mainly intended to be used with the CERN's EOS filesystem using the XRootD protocol
RootDataEntry
Bases: DataEntry
Fsspec data entry implementation.
Only supports the old uncompressed (means ZIP) format. Only supports read-only mode.
Source code in src/lhcbdirac_log/providers/fsspec/accessors.py
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
|
__init__(job, name)
[Internal] Initialize the data entry.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
job |
RootJobEntry
|
the job entry |
required |
name |
str
|
the data name |
required |
Source code in src/lhcbdirac_log/providers/fsspec/accessors.py
34 35 36 37 38 39 40 41 42 |
|
RootDataProvider
Bases: DataProvider[RootJobEntry]
FSspec data provider implementation.
Only supports the old uncompressed (means ZIP) format. Only supports read-only mode.
Source code in src/lhcbdirac_log/providers/fsspec/providers.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
|
driver: RootDriver
property
Get the root driver.
Returns:
Type | Description |
---|---|
RootDriver
|
the root driver |
__init__(url)
Initialize the data provider.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
url |
str
|
the root url |
required |
Source code in src/lhcbdirac_log/providers/fsspec/providers.py
37 38 39 40 41 42 43 44 |
|
RootJobEntry
Bases: JobEntry[RootDataEntry]
Fsspec job entry implementation.
Only supports the old uncompressed (means ZIP) format. Only supports read-only mode.
Source code in src/lhcbdirac_log/providers/fsspec/accessors.py
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 |
|
driver: RootDriver
property
Get the root driver.
Returns:
Type | Description |
---|---|
RootDriver
|
the root driver |
prefix: str
property
Get the job path prefix with trailing slash.
Returns:
Type | Description |
---|---|
str
|
the path prefix (e.g. "00000001/") |
reader: ZipFile
property
Get the zip-file handler.
Returns:
Type | Description |
---|---|
ZipFile
|
the zip reader |
__del__()
Close the zip-file reader.
Source code in src/lhcbdirac_log/providers/fsspec/accessors.py
171 172 173 174 175 176 177 178 179 180 |
|
__init__(driver, job)
[Internal] Initialize the job entry.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
driver |
RootDriver
|
the root driver |
required |
job |
int
|
the job id |
required |
Raises:
Type | Description |
---|---|
JobNotExistsError
|
if the job does not exist |
Source code in src/lhcbdirac_log/providers/fsspec/accessors.py
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
|