Repository navigation
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #305 +/- ##
===========================================
- Coverage 77.33% 77.12% -0.21%
===========================================
Files 410 411 +1
Lines 27391 27433 +42
Branches 2704 2711 +7
===========================================
- Hits 21182 21158 -24
- Misses 6209 6275 +66 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds a new fdb-adopt CLI tool to (re)index fields from an existing GRIB file into an FDB catalogue, and wires it into the tools build. Also includes a small refactor in Archiver::flush().
Changes:
- Added
src/fdb5/tools/fdb-adopt.ccto scan GRIB files, decode keys, and createreindex()entries pointing at file offsets. - Registered the new tool in
src/fdb5/CMakeLists.txtso it is built/installed with other FDB tools. - Refactored
Archiver::flush()loop to a range-based form.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
src/fdb5/tools/fdb-adopt.cc |
New CLI tool that scans GRIB input and writes reindex entries using TocFieldLocation offsets |
src/fdb5/database/Archiver.cc |
Minor loop refactor in flush() |
src/fdb5/CMakeLists.txt |
Adds fdb-adopt to the fdb5_tools executable list |
| eckit::Length length = msg.length(); | ||
| eckit::Offset offset = reader.position() - length; | ||
|
|
||
| fdb.reindex(key, fdb5::TocFieldLocation{uri, offset, length, fdb5::Key()}); |
8b3d4f6 to
36e307d
Compare
36e307d to
bb47595
Compare
bb47595 to
2288045
Compare
|
What does this do vs e.g. fdb-reindex? |
2288045 to
1a40fa6
Compare
fdb-adopt re-scans the grib messages to gather metadata. Data might be random files (not an FDB) or an FDB indexed by a different version of eccodes (thus indexing metadata might differ). |
1a40fa6 to
9228f0c
Compare
Description
Contributor Declaration
By opening this pull request, I affirm the following:
🌈🌦️📖🚧 Documentation FDB 🚧📖🌦️🌈
https://sites.ecmwf.int/docs/fdb/pull-requests/PR-305