Remove timestamp file

This commit is contained in:
Patrick Niklaus 2018-03-21 12:07:15 +00:00
parent 2b010fc6f3
commit bed53f5fd5
9 changed files with 1 additions and 45 deletions

View File

@ -17,6 +17,7 @@
- `OSRM` object accepts a new option `memory_file` that stores the memory in a file on disk. - `OSRM` object accepts a new option `memory_file` that stores the memory in a file on disk.
- Internals - Internals
- CHANGED #4845 #4968: Updated segregated intersection identification - CHANGED #4845 #4968: Updated segregated intersection identification
- REMOVED: Remove `.timestamp` file since it was unused.
- Documentation: - Documentation:
- ADDED: Add documentation about OSM node ids in nearest service response [#4436](https://github.com/Project-OSRM/osrm-backend/pull/4436) - ADDED: Add documentation about OSM node ids in nearest service response [#4436](https://github.com/Project-OSRM/osrm-backend/pull/4436)
- Performance - Performance

View File

@ -233,16 +233,6 @@ class ContiguousInternalMemoryDataFacadeBase : public BaseDataFacade
exclude_mask = m_profile_properties->excludable_classes[exclude_index]; exclude_mask = m_profile_properties->excludable_classes[exclude_index];
} }
void InitializeTimestampPointer(storage::DataLayout &data_layout, char *memory_block)
{
auto timestamp_ptr =
data_layout.GetBlockPtr<char>(memory_block, storage::DataLayout::TIMESTAMP);
m_timestamp.resize(data_layout.GetBlockSize(storage::DataLayout::TIMESTAMP));
std::copy(timestamp_ptr,
timestamp_ptr + data_layout.GetBlockSize(storage::DataLayout::TIMESTAMP),
m_timestamp.begin());
}
void InitializeChecksumPointer(storage::DataLayout &data_layout, char *memory_block) void InitializeChecksumPointer(storage::DataLayout &data_layout, char *memory_block)
{ {
m_check_sum = m_check_sum =
@ -543,7 +533,6 @@ class ContiguousInternalMemoryDataFacadeBase : public BaseDataFacade
InitializeEdgeInformationPointers(data_layout, memory_block); InitializeEdgeInformationPointers(data_layout, memory_block);
InitializeTurnPenalties(data_layout, memory_block); InitializeTurnPenalties(data_layout, memory_block);
InitializeGeometryPointers(data_layout, memory_block); InitializeGeometryPointers(data_layout, memory_block);
InitializeTimestampPointer(data_layout, memory_block);
InitializeNamePointers(data_layout, memory_block); InitializeNamePointers(data_layout, memory_block);
InitializeTurnLaneDescriptionsPointers(data_layout, memory_block); InitializeTurnLaneDescriptionsPointers(data_layout, memory_block);
InitializeProfilePropertiesPointer(data_layout, memory_block, exclude_index); InitializeProfilePropertiesPointer(data_layout, memory_block, exclude_index);
@ -851,8 +840,6 @@ class ContiguousInternalMemoryDataFacadeBase : public BaseDataFacade
return m_datasources->GetSourceName(id); return m_datasources->GetSourceName(id);
} }
std::string GetTimestamp() const override final { return m_timestamp; }
bool GetContinueStraightDefault() const override final bool GetContinueStraightDefault() const override final
{ {
return m_profile_properties->continue_straight_at_waypoint; return m_profile_properties->continue_straight_at_waypoint;

View File

@ -173,8 +173,6 @@ class BaseDataFacade
virtual StringView GetExitsForID(const NameID id) const = 0; virtual StringView GetExitsForID(const NameID id) const = 0;
virtual std::string GetTimestamp() const = 0;
virtual bool GetContinueStraightDefault() const = 0; virtual bool GetContinueStraightDefault() const = 0;
virtual double GetMapMatchingMaxSpeed() const = 0; virtual double GetMapMatchingMaxSpeed() const = 0;

View File

@ -52,7 +52,6 @@ struct ExtractorConfig final : storage::IOConfig
".osrm.names", ".osrm.names",
".osrm.tls", ".osrm.tls",
".osrm.tld", ".osrm.tld",
".osrm.timestamp",
".osrm.geometry", ".osrm.geometry",
".osrm.nbg_nodes", ".osrm.nbg_nodes",
".osrm.ebg_nodes", ".osrm.ebg_nodes",

View File

@ -50,7 +50,6 @@ const constexpr char *block_id_to_name[] = {"IGNORE_BLOCK",
"GEOMETRIES_FWD_DATASOURCES_LIST", "GEOMETRIES_FWD_DATASOURCES_LIST",
"GEOMETRIES_REV_DATASOURCES_LIST", "GEOMETRIES_REV_DATASOURCES_LIST",
"HSGR_CHECKSUM", "HSGR_CHECKSUM",
"TIMESTAMP",
"FILE_INDEX_PATH", "FILE_INDEX_PATH",
"DATASOURCES_NAMES", "DATASOURCES_NAMES",
"PROPERTIES", "PROPERTIES",
@ -131,7 +130,6 @@ class DataLayout
GEOMETRIES_FWD_DATASOURCES_LIST, GEOMETRIES_FWD_DATASOURCES_LIST,
GEOMETRIES_REV_DATASOURCES_LIST, GEOMETRIES_REV_DATASOURCES_LIST,
HSGR_CHECKSUM, HSGR_CHECKSUM,
TIMESTAMP,
FILE_INDEX_PATH, FILE_INDEX_PATH,
DATASOURCES_NAMES, DATASOURCES_NAMES,
PROPERTIES, PROPERTIES,

View File

@ -54,7 +54,6 @@ struct StorageConfig final : IOConfig
".osrm.fileIndex", ".osrm.fileIndex",
".osrm.edges", ".osrm.edges",
".osrm.geometry", ".osrm.geometry",
".osrm.timestamp",
".osrm.turn_weight_penalties", ".osrm.turn_weight_penalties",
".osrm.turn_duration_penalties", ".osrm.turn_duration_penalties",
".osrm.datasource_names", ".osrm.datasource_names",

View File

@ -407,11 +407,6 @@ Extractor::ParseOSMData(ScriptingEnvironment &scripting_environment,
timestamp = "n/a"; timestamp = "n/a";
} }
util::Log() << "timestamp: " << timestamp; util::Log() << "timestamp: " << timestamp;
storage::io::FileWriter timestamp_file(config.GetPath(".osrm.timestamp"),
storage::io::FileWriter::GenerateFingerprint);
timestamp_file.WriteFrom(timestamp.c_str(), timestamp.length());
} }
// Extraction containers and restriction parser // Extraction containers and restriction parser

View File

@ -257,14 +257,6 @@ void Storage::PopulateLayout(DataLayout &layout)
make_block<std::uint64_t>(tree_levels_size)); make_block<std::uint64_t>(tree_levels_size));
} }
// read timestampsize
{
io::FileReader timestamp_file(config.GetPath(".osrm.timestamp"),
io::FileReader::VerifyFingerprint);
const auto timestamp_size = timestamp_file.GetSize();
layout.SetBlock(DataLayout::TIMESTAMP, make_block<char>(timestamp_size));
}
std::unordered_map<std::string, DataLayout::BlockID> name_to_block_id = { std::unordered_map<std::string, DataLayout::BlockID> name_to_block_id = {
{"/mld/multilevelgraph/node_array", DataLayout::MLD_GRAPH_NODE_LIST}, {"/mld/multilevelgraph/node_array", DataLayout::MLD_GRAPH_NODE_LIST},
{"/mld/multilevelgraph/edge_array", DataLayout::MLD_GRAPH_EDGE_LIST}, {"/mld/multilevelgraph/edge_array", DataLayout::MLD_GRAPH_EDGE_LIST},
@ -642,18 +634,6 @@ void Storage::PopulateData(const DataLayout &layout, char *memory_ptr)
turn_duration_penalties); turn_duration_penalties);
} }
// store timestamp
{
io::FileReader timestamp_file(config.GetPath(".osrm.timestamp"),
io::FileReader::VerifyFingerprint);
const auto timestamp_size = timestamp_file.GetSize();
const auto timestamp_ptr =
layout.GetBlockPtr<char, true>(memory_ptr, DataLayout::TIMESTAMP);
BOOST_ASSERT(timestamp_size == layout.GetBlockEntries(DataLayout::TIMESTAMP));
timestamp_file.ReadInto(timestamp_ptr, timestamp_size);
}
// store search tree portion of rtree // store search tree portion of rtree
{ {
io::FileReader tree_node_file(config.GetPath(".osrm.ramIndex"), io::FileReader tree_node_file(config.GetPath(".osrm.ramIndex"),

View File

@ -219,7 +219,6 @@ class MockBaseDataFacade : public engine::datafacade::BaseDataFacade
StringView GetDestinationsForID(const NameID) const override final { return {}; } StringView GetDestinationsForID(const NameID) const override final { return {}; }
StringView GetExitsForID(const NameID) const override final { return {}; } StringView GetExitsForID(const NameID) const override final { return {}; }
std::string GetTimestamp() const override { return ""; }
bool GetContinueStraightDefault() const override { return true; } bool GetContinueStraightDefault() const override { return true; }
double GetMapMatchingMaxSpeed() const override { return 180 / 3.6; } double GetMapMatchingMaxSpeed() const override { return 180 / 3.6; }
const char *GetWeightName() const override final { return "duration"; } const char *GetWeightName() const override final { return "duration"; }