-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/fdb 389 dump tools #75
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,7 +39,7 @@ class TocEngine : public fdb5::Engine { | |
std::vector<eckit::URI> databases(const metkit::mars::MarsRequest& rq, const std::vector<eckit::PathName>& dirs, | ||
const Config& config) const; | ||
|
||
void scan_dbs(const std::string& path, std::list<std::string>& dbs) const; | ||
void scan_dbs(const std::string& path, std::list<std::string>& dbs, bool lowercase = false) const; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this can be removed |
||
|
||
protected: // methods | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1340,7 +1340,7 @@ std::vector<Index> TocHandler::loadIndexes(const Catalogue& catalogue, bool sort | |
s >> offset; | ||
s >> type; | ||
LOG_DEBUG(debug, LibFdb5) << "TocRecord TOC_INDEX " << path << " - " << offset << std::endl; | ||
tocindexes[entry.seqNo] = new TocIndex(s, catalogue, entry.datap->header_.serialisationVersion_, | ||
tocindexes[entry.seqNo] = new TocIndex(s, entry.datap->header_.serialisationVersion_, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could you remove There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not this PR but can add |
||
entry.tocDirectoryName, | ||
entry.tocDirectoryName / path, | ||
offset, preloadBTree_); | ||
|
@@ -1443,7 +1443,7 @@ void TocHandler::dump(std::ostream& out, bool simple, bool walkSubTocs) const { | |
s >> type; | ||
out << " Path: " << path << ", offset: " << offset << ", type: " << type; | ||
if(!simple) { out << std::endl; } | ||
Index index(new TocIndex(s, *(dynamic_cast<const TocCatalogue*>(this)), r->header_.serialisationVersion_, | ||
Index index(new TocIndex(s, r->header_.serialisationVersion_, | ||
currentDirectory(), currentDirectory() / path, offset)); | ||
index.dump(out, " ", simple); | ||
break; | ||
|
@@ -1500,7 +1500,7 @@ void TocHandler::dumpIndexFile(std::ostream& out, const eckit::PathName& indexFi | |
if ((currentDirectory() / path).sameAs(eckit::LocalPathName{indexFile})) { | ||
r->dump(out, true); | ||
out << std::endl << " Path: " << path << ", offset: " << offset << ", type: " << type; | ||
Index index(new TocIndex(s, *(dynamic_cast<const TocCatalogue*>(this)), r->header_.serialisationVersion_, | ||
Index index(new TocIndex(s, r->header_.serialisationVersion_, | ||
currentDirectory(), currentDirectory() / path, offset)); | ||
index.dump(out, " ", false, true); | ||
} | ||
|
@@ -1609,7 +1609,7 @@ void TocHandler::enumerateMasked(const Catalogue& catalogue, std::set<std::pair< | |
std::pair<eckit::LocalPathName, size_t> key(absPath.baseName(), offset); | ||
if (maskedEntries_.find(key) != maskedEntries_.end()) { | ||
if (absPath.exists()) { | ||
Index index(new TocIndex(s, *(dynamic_cast<const TocCatalogue*>(this)), r->header_.serialisationVersion_, directory_, absPath, offset)); | ||
Index index(new TocIndex(s, r->header_.serialisationVersion_, directory_, absPath, offset)); | ||
for (const auto& dataURI : index.dataURIs()) data.insert(dataURI); | ||
} | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -98,7 +98,7 @@ void FDBRead::execute(const eckit::option::CmdArgs &args) { | |
|
||
std::unique_ptr<eckit::DataHandle> dh(handles.dataHandle()); | ||
|
||
dh->copyTo(out); | ||
dh->saveInto(out); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why have we changed copyTo into saveInto? That changes behaviour. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm reverting to saveInto |
||
} | ||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can be moved into unnamed namespace
it's always
lowercase=true
, need it ?