Skip to content

Commit

Permalink
Removed ondisk2 implementation and tests, replaced with a usage warni…
Browse files Browse the repository at this point in the history
…ng. refs: #275
  • Loading branch information
spanezz committed Oct 19, 2021
1 parent de58c38 commit a2daab4
Show file tree
Hide file tree
Showing 43 changed files with 70 additions and 5,423 deletions.
15 changes: 0 additions & 15 deletions arki/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,6 @@ nobase_dist_arkiinclude_HEADERS = \
dataset/memory.h \
dataset/merged.h \
dataset/ondisk2.h \
dataset/ondisk2/index.h \
dataset/ondisk2/reader.h \
dataset/ondisk2/test-utils.h \
dataset/ondisk2/writer.h \
dataset/ondisk2/checker.h \
dataset/outbound.h \
dataset/offline.h \
dataset/simple.h \
Expand Down Expand Up @@ -538,10 +533,6 @@ libarkimet_la_SOURCES += \
dataset/iseg/writer.cc \
dataset/iseg/checker.cc \
dataset/ondisk2.cc \
dataset/ondisk2/index.cc \
dataset/ondisk2/reader.cc \
dataset/ondisk2/writer.cc \
dataset/ondisk2/checker.cc \
dataset/outbound.cc \
dataset/offline.cc \
dataset/empty.cc \
Expand Down Expand Up @@ -589,12 +580,6 @@ tests_arki_test_SOURCES += \
dataset/iseg/checker-test.cc \
dataset/iseg/maintenance-test.cc \
dataset/ondisk2-test.cc \
dataset/ondisk2/index-test.cc \
dataset/ondisk2/reader-test.cc \
dataset/ondisk2/writer-test.cc \
dataset/ondisk2/checker-test.cc \
dataset/ondisk2/test-utils.cc \
dataset/ondisk2/maintenance-test.cc \
dataset/outbound-test.cc \
dataset/offline-test.cc \
dataset/empty-test.cc \
Expand Down
5 changes: 0 additions & 5 deletions arki/dataset-checker-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,23 +56,18 @@ class TestsChecker : public FixtureTestCase<FixtureChecker<Data>>
void register_tests() override;
};

TestsChecker<GRIBData> test_checker_grib_ondisk2("arki_dataset_checker_grib_ondisk2", "type=ondisk2\n");
TestsChecker<GRIBData> test_checker_grib_simple_plain("arki_dataset_checker_grib_simple_plain", "type=simple\nindex_type=plain\n");
TestsChecker<GRIBData> test_checker_grib_simple_sqlite("arki_dataset_checker_grib_simple_sqlite", "type=simple\nindex_type=sqlite\n");
TestsChecker<GRIBData> test_checker_grib_iseg("arki_dataset_checker_grib_iseg", "type=iseg\nformat=grib\n");
TestsChecker<BUFRData> test_checker_bufr_ondisk2("arki_dataset_checker_bufr_ondisk2", "type=ondisk2\n");
TestsChecker<BUFRData> test_checker_bufr_simple_plain("arki_dataset_checker_bufr_simple_plain", "type=simple\nindex_type=plain\n");
TestsChecker<BUFRData> test_checker_bufr_simple_sqlite("arki_dataset_checker_bufr_simple_sqlite", "type=simple\nindex_type=sqlite");
TestsChecker<BUFRData> test_checker_bufr_iseg("arki_dataset_checker_bufr_iseg", "type=iseg\nformat=bufr\n");
TestsChecker<VM2Data> test_checker_vm2_ondisk2("arki_dataset_checker_vm2_ondisk2", "type=ondisk2\n");
TestsChecker<VM2Data> test_checker_vm2_simple_plain("arki_dataset_checker_vm2_simple_plain", "type=simple\nindex_type=plain\n");
TestsChecker<VM2Data> test_checker_vm2_simple_sqlite("arki_dataset_checker_vm2_simple_sqlite", "type=simple\nindex_type=sqlite");
TestsChecker<VM2Data> test_checker_vm2_iseg("arki_dataset_checker_vm2_iseg", "type=iseg\nformat=vm2\n");
TestsChecker<ODIMData> test_checker_odim_ondisk2("arki_dataset_checker_odim_ondisk2", "type=ondisk2\n");
TestsChecker<ODIMData> test_checker_odim_simple_plain("arki_dataset_checker_odim_simple_plain", "type=simple\nindex_type=plain\n");
TestsChecker<ODIMData> test_checker_odim_simple_sqlite("arki_dataset_checker_odim_simple_sqlite", "type=simple\nindex_type=sqlite");
TestsChecker<ODIMData> test_checker_odim_iseg("arki_dataset_checker_odim_iseg", "type=iseg\nformat=odimh5\n");
TestsChecker<NCData> test_checker_nc_ondisk2("arki_dataset_checker_nc_ondisk2", "type=ondisk2\n");
TestsChecker<NCData> test_checker_nc_simple_plain("arki_dataset_checker_nc_simple_plain", "type=simple\nindex_type=plain\n");
TestsChecker<NCData> test_checker_nc_simple_sqlite("arki_dataset_checker_nc_simple_sqlite", "type=simple\nindex_type=sqlite");
TestsChecker<NCData> test_checker_nc_iseg("arki_dataset_checker_nc_iseg", "type=iseg\nformat=nc\n");
Expand Down
6 changes: 1 addition & 5 deletions arki/dataset-concurrency-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -255,19 +255,15 @@ class Tests : public FixtureTestCase<FixtureWriter<Data>>
void register_tests() override;
};

Tests<GRIBData> test_concurrent_grib_ondisk2("arki_dataset_concurrent_grib_ondisk2", "type=ondisk2\n");
Tests<GRIBData> test_concurrent_grib_simple_plain("arki_dataset_concurrent_grib_simple_plain", "type=simple\nindex_type=plain\n");
Tests<GRIBData> test_concurrent_grib_simple_sqlite("arki_dataset_concurrent_grib_simple_sqlite", "type=simple\nindex_type=sqlite");
Tests<GRIBData> test_concurrent_grib_iseg("arki_dataset_concurrent_grib_iseg", "type=iseg\nformat=grib\n");
Tests<BUFRData> test_concurrent_bufr_ondisk2("arki_dataset_concurrent_bufr_ondisk2", "type=ondisk2\n");
Tests<BUFRData> test_concurrent_bufr_simple_plain("arki_dataset_concurrent_bufr_simple_plain", "type=simple\nindex_type=plain\n");
Tests<BUFRData> test_concurrent_bufr_simple_sqlite("arki_dataset_concurrent_bufr_simple_sqlite", "type=simple\nindex_type=sqlite");
Tests<BUFRData> test_concurrent_bufr_iseg("arki_dataset_concurrent_bufr_iseg", "type=iseg\nformat=bufr\n");
Tests<VM2Data> test_concurrent_vm2_ondisk2("arki_dataset_concurrent_vm2_ondisk2", "type=ondisk2\n");
Tests<VM2Data> test_concurrent_vm2_simple_plain("arki_dataset_concurrent_vm2_simple_plain", "type=simple\nindex_type=plain\n");
Tests<VM2Data> test_concurrent_vm2_simple_sqlite("arki_dataset_concurrent_vm2_simple_sqlite", "type=simple\nindex_type=sqlite");
Tests<VM2Data> test_concurrent_vm2_iseg("arki_dataset_concurrent_vm2_iseg", "type=iseg\nformat=vm2\n");
Tests<ODIMData> test_concurrent_odim_ondisk2("arki_dataset_concurrent_odim_ondisk2", "type=ondisk2\n");
Tests<ODIMData> test_concurrent_odim_simple_plain("arki_dataset_concurrent_odim_simple_plain", "type=simple\nindex_type=plain\n");
Tests<ODIMData> test_concurrent_odim_simple_sqlite("arki_dataset_concurrent_odim_simple_sqlite", "type=simple\nindex_type=sqlite");
Tests<ODIMData> test_concurrent_odim_iseg("arki_dataset_concurrent_odim_iseg", "type=iseg\nformat=odimh5\n");
Expand Down Expand Up @@ -443,7 +439,7 @@ this->add_method("write_check", [](Fixture& f) {

CheckForever<Fixture> cf(f);
cf.during([&]{
if (type == "ondisk2" || type == "simple") {
if (type == "simple") {
auto writer = wcallchecked(f.config().create_writer());
try {
writer->acquire(f.td.mds[2]);
Expand Down
5 changes: 0 additions & 5 deletions arki/dataset-reader-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -60,23 +60,18 @@ class TestsReader : public FixtureTestCase<FixtureReader<Data>>
void register_tests() override;
};

TestsReader<GRIBData> test_reader_grib_ondisk2("arki_dataset_reader_grib_ondisk2", "type=ondisk2\n");
TestsReader<GRIBData> test_reader_grib_simple_plain("arki_dataset_reader_grib_simple_plain", "type=simple\nindex_type=plain\n");
TestsReader<GRIBData> test_reader_grib_simple_sqlite("arki_dataset_reader_grib_simple_sqlite", "type=simple\nindex_type=sqlite");
TestsReader<GRIBData> test_reader_grib_iseg("arki_dataset_reader_grib_iseg", "type=iseg\nformat=grib\n");
TestsReader<BUFRData> test_reader_bufr_ondisk2("arki_dataset_reader_bufr_ondisk2", "type=ondisk2\n");
TestsReader<BUFRData> test_reader_bufr_simple_plain("arki_dataset_reader_bufr_simple_plain", "type=simple\nindex_type=plain\n");
TestsReader<BUFRData> test_reader_bufr_simple_sqlite("arki_dataset_reader_bufr_simple_sqlite", "type=simple\nindex_type=sqlite");
TestsReader<BUFRData> test_reader_bufr_iseg("arki_dataset_reader_bufr_iseg", "type=iseg\nformat=bufr\n");
TestsReader<VM2Data> test_reader_vm2_ondisk2("arki_dataset_reader_vm2_ondisk2", "type=ondisk2\n");
TestsReader<VM2Data> test_reader_vm2_simple_plain("arki_dataset_reader_vm2_simple_plain", "type=simple\nindex_type=plain\n");
TestsReader<VM2Data> test_reader_vm2_simple_sqlite("arki_dataset_reader_vm2_simple_sqlite", "type=simple\nindex_type=sqlite");
TestsReader<VM2Data> test_reader_vm2_iseg("arki_dataset_reader_vm2_iseg", "type=iseg\nformat=vm2\n");
TestsReader<ODIMData> test_reader_odim_ondisk2("arki_dataset_reader_odim_ondisk2", "type=ondisk2\n");
TestsReader<ODIMData> test_reader_odim_simple_plain("arki_dataset_reader_odim_simple_plain", "type=simple\nindex_type=plain\n");
TestsReader<ODIMData> test_reader_odim_simple_sqlite("arki_dataset_reader_odim_simple_sqlite", "type=simple\nindex_type=sqlite");
TestsReader<ODIMData> test_reader_odim_iseg("arki_dataset_reader_odim_iseg", "type=iseg\nformat=odimh5\n");
TestsReader<NCData> test_reader_nc_ondisk2("arki_dataset_reader_nc_ondisk2", "type=ondisk2\n");
TestsReader<NCData> test_reader_nc_simple_plain("arki_dataset_reader_nc_simple_plain", "type=simple\nindex_type=plain\n");
TestsReader<NCData> test_reader_nc_simple_sqlite("arki_dataset_reader_nc_simple_sqlite", "type=simple\nindex_type=sqlite");
TestsReader<NCData> test_reader_nc_iseg("arki_dataset_reader_nc_iseg", "type=iseg\nformat=nc\n");
Expand Down
1 change: 0 additions & 1 deletion arki/dataset-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ class InstantiateTests : public FixtureTestCase<Fixture>
};

InstantiateTests test_simple("arki_dataset_instantiate_simple", "type=simple\n_reader=simple\n_writer=simple\n_checker=simple\n");
InstantiateTests test_ondisk2("arki_dataset_instantiate_ondisk2", "type=ondisk2\n_reader=ondisk2\n_writer=ondisk2\n_checker=ondisk2\n");
InstantiateTests test_iseg("arki_dataset_instantiate_iseg", "type=iseg\nformat=grib\n_reader=iseg\n_writer=iseg\n_checker=iseg\n");
InstantiateTests test_error("arki_dataset_instantiate_error", "type=error\n_reader=simple\n_writer=simple\n_checker=simple\n");
InstantiateTests test_duplicates("arki_dataset_instantiate_duplicates", "type=duplicates\n_reader=simple\n_writer=simple\n_checker=simple\n");
Expand Down
6 changes: 0 additions & 6 deletions arki/dataset-writer-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ class Tests : public FixtureTestCase<DatasetTest>
void register_tests() override;
};

Tests test_writer_ondisk2("arki_dataset_writer_ondisk2", "type=ondisk2\n");
Tests test_writer_simple_plain("arki_dataset_writer_simple_plain", "type=simple\nindex_type=plain\n");
Tests test_writer_simple_sqlite("arki_dataset_writer_simple_sqlite", "type=simple\nindex_type=sqlite");
Tests test_writer_iseg("arki_dataset_writer_iseg", "type=iseg\nformat=grib");
Expand All @@ -77,23 +76,18 @@ class TestsWriter : public FixtureTestCase<FixtureWriter<Data>>
void register_tests() override;
};

TestsWriter<GRIBData> test_writer_grib_ondisk2("arki_dataset_writer_grib_ondisk2", "type=ondisk2\nformat=grib\n");
TestsWriter<GRIBData> test_writer_grib_simple_plain("arki_dataset_writer_grib_simple_plain", "type=simple\nindex_type=plain\nformat=grib\n");
TestsWriter<GRIBData> test_writer_grib_simple_sqlite("arki_dataset_writer_grib_simple_sqlite", "type=simple\nindex_type=sqlite\nformat=grib\n");
TestsWriter<GRIBData> test_writer_grib_iseg("arki_dataset_writer_grib_iseg", "type=iseg\nformat=grib\n");
TestsWriter<BUFRData> test_writer_bufr_ondisk2("arki_dataset_writer_bufr_ondisk2", "type=ondisk2\nformat=bufr\n");
TestsWriter<BUFRData> test_writer_bufr_simple_plain("arki_dataset_writer_bufr_simple_plain", "type=simple\nindex_type=plain\nformat=bufr\n");
TestsWriter<BUFRData> test_writer_bufr_simple_sqlite("arki_dataset_writer_bufr_simple_sqlite", "type=simple\nindex_type=sqlite\nformat=bufr\n");
TestsWriter<BUFRData> test_writer_bufr_iseg("arki_dataset_writer_bufr_iseg", "type=iseg\nformat=bufr\n");
TestsWriter<VM2Data> test_writer_vm2_ondisk2("arki_dataset_writer_vm2_ondisk2", "type=ondisk2\nformat=vm2\n");
TestsWriter<VM2Data> test_writer_vm2_simple_plain("arki_dataset_writer_vm2_simple_plain", "type=simple\nindex_type=plain\nformat=vm2\n");
TestsWriter<VM2Data> test_writer_vm2_simple_sqlite("arki_dataset_writer_vm2_simple_sqlite", "type=simple\nindex_type=sqlite\nformat=vm2\n");
TestsWriter<VM2Data> test_writer_vm2_iseg("arki_dataset_writer_vm2_iseg", "type=iseg\nformat=vm2\n");
TestsWriter<ODIMData> test_writer_odim_ondisk2("arki_dataset_writer_odim_ondisk2", "type=ondisk2\nformat=odimh5\n");
TestsWriter<ODIMData> test_writer_odim_simple_plain("arki_dataset_writer_odim_simple_plain", "type=simple\nindex_type=plain\nformat=odimh5\n");
TestsWriter<ODIMData> test_writer_odim_simple_sqlite("arki_dataset_writer_odim_simple_sqlite", "type=simple\nindex_type=sqlite\nformat=odimh5\n");
TestsWriter<ODIMData> test_writer_odim_iseg("arki_dataset_writer_odim_iseg", "type=iseg\nformat=odimh5\n");
TestsWriter<NCData> test_writer_nc_ondisk2("arki_dataset_writer_nc_ondisk2", "type=ondisk2\nformat=nc\n");
TestsWriter<NCData> test_writer_nc_simple_plain("arki_dataset_writer_nc_simple_plain", "type=simple\nindex_type=plain\nformat=nc\n");
TestsWriter<NCData> test_writer_nc_simple_sqlite("arki_dataset_writer_nc_simple_sqlite", "type=simple\nindex_type=sqlite\nformat=nc\n");
TestsWriter<NCData> test_writer_nc_iseg("arki_dataset_writer_nc_iseg", "type=iseg\nformat=nc\n");
Expand Down
3 changes: 2 additions & 1 deletion arki/dataset/archive-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ struct Fixture : public arki::utils::tests::Fixture
cfg.clear();
cfg.set("path", "testds");
cfg.set("name", "testds");
cfg.set("type", "ondisk2");
cfg.set("type", "iseg");
cfg.set("format", "grib");
cfg.set("step", "daily");
cfg.set("unique", "origin, reftime");
cfg.set("archive age", "7");
Expand Down
4 changes: 2 additions & 2 deletions arki/dataset/archive.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ class Dataset : public dataset::Dataset
* archived from the live dataset, and other archives maintained manually by
* moving files from "last" into them.
*
* ondisk2 dataset maintenance will therefore only write files older than
* "archive age" to the "last" archive.
* Dataset maintenance will therefore only write files older than "archive age"
* to the "last" archive.
*
* When doing archive maintenance, all archives are checked. If a file is
* manually moved from an archive to another, it will be properly deindexed and
Expand Down
7 changes: 0 additions & 7 deletions arki/dataset/fwd.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,6 @@ class Writer;
class Checker;
}

namespace ondisk2 {
class Dataset;
class Reader;
class Writer;
class Checker;
}

namespace simple {
class Reader;
class Writer;
Expand Down
27 changes: 0 additions & 27 deletions arki/dataset/index-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include "arki/matcher/parser.h"
#include "index.h"
#include "index/manifest.h"
#include "ondisk2/index.h"
#include "arki/summary.h"
#include "arki/utils/sys.h"
#include "arki/types/source/blob.h"
Expand Down Expand Up @@ -96,34 +95,8 @@ struct ManifestSqliteFixture : ManifestFixture
}
};

struct ContentsFixture : public BaseFixture
{
std::unique_ptr<dataset::Index> make_index()
{
const char* config = R"(
path = testds
type = ondisk2
name = test
step = daily
)";
auto cfg = std::make_shared<dataset::ondisk2::Dataset>(session, *core::cfg::Section::parse(config));
{
WIndex idx(cfg);
idx.open();
idx.index(mdc[0], "2007/07-08.grib", 0);
idx.index(mdc[1], "2007/07-07.grib", 0);
idx.index(mdc[2], "2007/10-09.grib", 0);
idx.flush();
}
unique_ptr<RIndex> res(new RIndex(cfg));
res->open();
return std::unique_ptr<dataset::Index>(res.release());
}
};

Tests<ManifestPlainFixture> test1("arki_dataset_index_tests_manifest_plain");
Tests<ManifestSqliteFixture> test2("arki_dataset_index_tests_manifest_sqlite");
Tests<ContentsFixture> test3("arki_dataset_index_tests_contents");


template<class FIXTURE>
Expand Down
Loading

0 comments on commit a2daab4

Please sign in to comment.